On Mon, Jul 13, 2015 at 12:52:14PM +0200, Alexandre Ratchov wrote: > On Sat, Jul 11, 2015 at 02:23:03PM +0200, Mark Kettenis wrote: > > Every now and then sndiod hangs on me. Usually I discover this as > > mplayer hangs while playing a video or hangs while opening the audio > > device on startup. Restarting sndiod using the /etc/rc.d/sndiod > > script doesn't work; it blocks trying to stop the running sndiod. I > > have to use kill -9 to get rid of it. > > > > Happened again last night and I investigated a bit. This was after I > > tried restarting it using /etc/rc.d/sndiod, but before resorting to > > kill -9. Attaching with gdb revealed that it was stuck in poll(2) > > with the 2nd argument being 0 and the last argument being -1. Since > > no file descriptors are being monitored and the timeout is infinite, > > the process just blocks forevere. > > noemally it gets periodic SIGALRM which interrupt poll(2) with > EINTR. >
Now this is fixed (interval timers aren't copied by fork(2), so after the call to daemon(3), periodic timers appeared as stopped). The hang (now fixed) occurred in the exit code-path when a hardware inconsistency was detected.
