Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] [PATCH] hooks: disable malloc override inside of Gentoo sandbox
From: Jeff Squyres (jsquyres) (jsquyres_at_[hidden])
Date: 2013-07-02 08:40:16


Committed upstream at https://svn.open-mpi.org/trac/ompi/changeset/28702, and filed CMRs for the v1.6 and v1.7 series.

I don't know if there will be another release in the 1.6 series, but if there is, this will be in there.

Thank you!

On Jul 1, 2013, at 11:06 PM, Justin Bronder <jsbronder_at_[hidden]> wrote:

> As described in the comments in the source, Gentoo's own version of
> fakeroot, sandbox, also runs into hangs when malloc is overridden.
> Sandbox environments can easily be detected by looking for SANDBOX_PID
> in the environment. When detected, employ the same fix used for
> fakeroot.
>
> See https://bugs.gentoo.org/show_bug.cgi?id=462602
> ---
> opal/mca/memory/linux/hooks.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/opal/mca/memory/linux/hooks.c b/opal/mca/memory/linux/hooks.c
> index 6a1646f..ce91e76 100644
> --- a/opal/mca/memory/linux/hooks.c
> +++ b/opal/mca/memory/linux/hooks.c
> @@ -747,9 +747,16 @@ static void opal_memory_linux_malloc_init_hook(void)
> "fakeroot" build environment that allocates memory during
> stat() (see http://bugs.debian.org/531522). It may not be
> necessary any more since we're using access(), not stat(). But
> - we'll leave the check, anyway. */
> + we'll leave the check, anyway.
> +
> + This is also an issue when using Gentoo's version of 'fakeroot',
> + sandbox v2.5. Sandbox environments can also be detected fairly
> + easily by looking for SANDBOX_PID.
> + */
> +
> if (getenv("FAKEROOTKEY") != NULL ||
> - getenv("FAKED_MODE") != NULL) {
> + getenv("FAKED_MODE") != NULL ||
> + getenv("SANDBOX_PID") != NULL ) {
> return;
> }
>
> --
> 1.8.1.5
>
>
> --
> Justin Bronder
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/