[torquedev] wrong pid getting written into the lock file

Glen Beane glen.beane at gmail.com
Mon Nov 30 21:34:17 MST 2009


Fellow torque developers,

as reported in Bugzilla bug #35, TORQUE is writing the incorrect pid
into the server.lock file. It usually turns out to be the pid of the
running pbs_server  - 1. The strange thing is, as far as I can tell
when not in HA mode the daemonize_server() function creates a new
session after forking and returns this new session ID, which should be
the pid of the newly forked process.  This session id then gets
written to the lock file.  In debug mode, if we aren't backgrounding,
daemonize_server does not do the fork() and it returns the current pid
in the sid parameter.  A lot of this code was refactored between 2.3
(which works correctly) and 2.4 and I'm not super familiar with the
changes.

I'm going to work on this when I have a chance, but I probably won't
have much time for TORQUE until after the new year (things should
significantly improve then, so I plan on ramping my contributions back
up). I figured I would throw this out to the dev list in case anyone
else wanted to fix this one.

For reference:

http://www.clusterresources.com/bugzilla/show_bug.cgi?id=35


More information about the torquedev mailing list