[torquedev] wrong pid getting written into the lock file

Ken Nielson knielson at adaptivecomputing.com
Tue Dec 1 09:41:16 MST 2009

Glen Beane wrote:
> 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
> _______________________________________________
> torquedev mailing list
> torquedev at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torquedev

David Beer made these changes in 2.4. The new way works quite well. But 
it looks like there is some tweaking that needs to be done. I have 
copied David on this e-mail so he can look at it.


More information about the torquedev mailing list