Bugzilla – Bug 447
sudo hangs - race condition if SIGCHLD is received immediately before we call select()
Last modified: 2011-03-03 09:53:28 MST
Sometimes sudo enters in an endless blocking state and never exits. The called program finishes successfully, but is left in "zombie" state. You have already tried to fix this by http://www.sudo.ws/repos/sudo/rev/99adc5ea7f0a . However, there's always a possibility that SIGCHLD arrives right after the "if" and just before the "select()". In order to fix this, the blocking select() must be used with a "timeout" (say one second or less). This bug is usually rarely encountered on busy systems. More details on the bug and a proposed fix can be found at my blog article about it: http://blog.famzah.net/2010/11/01/sudo-hangs-and-leaves-the-executed-program-as-zombie/ P.S. Select() is used at least at two places, so they probably should both be fixed.
This should be fixed in sudo 1.7.5 which uses a pipe for signal delivery, eliminating the race condition. I'll have a beta release of 1.7.5 out soon.
THe first beta of sudo 1.7.5 is out now. http://www.sudo.ws/sudo/dist/beta/sudo-1.7.5b1.tar.gz
Fixed in sudo 1.7.5 and 1.8.0.