|
Bugzilla – Full Text Bug Listing |
| Summary: | sudo hangs and leaves the executed program as “zombie” | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | sander.vrijders |
| Component: | Sudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | evangelos, tharrin |
| Priority: | low | ||
| Version: | 1.8.21 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
sander.vrijders
2017-09-06 03:02:08 MDT
Forgot to mention that I saw the bug on 1.8.21 and 1.8.21p1. (I am on ArchLinux). These versions were not selectable in the bug report, so I just chose the latest version there. Sounds like sudo is not seeing the SIGCHLD for some reason. Do you have log_output or use_pty set in sudoers? If not, does setting use_pty change the behavior? I don't have use_pty set, nor log_output. Setting use_pty seems to worsen the problem. Bisecting points to: https://www.sudo.ws/repos/sudo/rev/d94e202b8e57 Used the following as a test and the hang is easily reproducible: $ while true; do sudo true && echo -n .; done Thanks for tracking that down. It takes a while to reproduce here but does eventually hang. Even with d94e202b8e57 backed out I get an eventual hang but this points to where the race is hiding. My bad for not testing more thoroughly. d94e202b8e57 makes the hang easier to reproduce for me but the real issue must lie within its parent commit. [1] [1] https://www.sudo.ws/repos/sudo/rev/841e2ca6a4a6 Found it. The underlying problem is that the wrong ends of the signal pipe were being used. In other words, the read side was being written to and the write side was being read from. On systems with directional pipes this was not an issue but Linux appears to have traditional Unix pipe semantics. It took quite a while for me to figure out why I was getting EBADF when I knew the descriptor was valid. This is fixed by: https://www.sudo.ws/repos/sudo/rev/7668f93e6544 Great job tracking down the real cause! *** Bug 802 has been marked as a duplicate of this bug. *** Sudo 1.8.21p2 is out now which includes the fix. |