[GE users] Environment leaking

rayson rayrayson at gmail.com
Wed Dec 30 05:50:14 GMT 2009


    [ The following text is in the "utf-8" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Similar to the load sensor problem discussed earlier today...

Current behavior:
1) parameter INHERIT_ENV is not set during setup by default.

2) When INHERIT_ENV is not set during setup or by the cluster admin,
the static variable inherit_env in libs/sgeobj/sge_conf.c is true,
this means mconf_get_inherit_env() would return true.

3) And in daemons/execd/exec_job.c : sge_exec_job(),
mconf_get_inherit_env() is called and the return value is passed to
shepherd config file as parameter inherit_env (different than the
static variable mentioned above).

4) Then shepherd reads from the config file, and finds that
inherit_env is true, so the function inherit_env() would return true
from this point on. A few places in builtin_starter.c call
inherit_env() and find that they should not clear the environment
inherited from the execd.


To fix this "bug":
- libs/sgeobj/sge_conf.c
static bool inherit_env = true; <- change it to false

- daemons/shepherd/builtin_starter.c
      else {
         /* This should match the default set in sgeobj/sge_conf.c. */
         inherit_environ = true; <- change it to false
      }


For future reference:
- the job, prolog, and epilog are started by shepherd, which itself is
started by execd
- the load sensor is started by execd directly.

And note that the methods used to set up the environment are different
between the 2.

To Daniel:
I think you are referring to SET_LIB_PATH's default, which is false.
As of SGE 6.2u5 (and the latest CVS), INHERIT_ENV's default is true.

And for those who want to read more about this topic, Dan's blog is a good read:
http://blogs.sun.com/templedf/entry/inheriting_job_environment

Rayson



On Wed, Dec 16, 2009 at 1:20 PM, beatrubi <beat at 0x1b.ch> wrote:
> Quoting <dan.templeton at sun.com> (15.12.09 15:50):
>> Did you do an upgrade from some older version
>> to 6.2u3?  In 6.2 you should not still be seeing false as the default.
>
> It was a clean installation of GE6.2u3 using the text mode installer.
>
> Beat
>
> --
>     \|/                           Beat Rubischon <beat at 0x1b.ch>
>   ( 0^0 )                             http://www.0x1b.ch/~beat/
> oOO--(_)--OOo---------------------------------------------------
> Meine Erlebnisse, Gedanken und Traeume: http://www.0x1b.ch/blog/
>
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=233856
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].
>

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=235532

To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list