Bugzilla – Bug 207
qsub segfault if malformed environment
Last modified: 2012-07-23 12:23:06 MDT
You need to
before you can comment on or make changes to this bug.
This was found in 4.1-fixes, but that's not a valid target in Bugzilla.
I've been having occasional segfaults when Moab is trying to 'qsub' a job as
the user. Loading the core file in GDB, it appears that envp has strings that
don't contain an '=' sign. This should never happen, but Moab is using
something like execve to manually set the environment. I'm going to file a bug
with the Moab guys, but TORQUE should protect itself from this situation.
The attached patch simply ignores environment strings that don't have an '='
sign. It compiles clean, but I haven't had a chance to fully test it yet. I
set the this situation to return PBSE_BAD_PARAMETER. Not sure if that's the
best code here, but it doesn't look like any calling functions actually use the
Created an attachment (id=113) [details]
I have modified the patch submitted by Matt and attached it here.
If we get a bad environment variable qsub will exit and print an error with the
bad environment variable.
This has been checked into 4.0-fixes, 4.1-fixes and trunk.
Created an attachment (id=114) [details]
Fixes segfault in qsub when bad environment variables are passed in.