Comment 60 for bug 818177

Revision history for this message
Steve Langasek (vorlon) wrote : Re: boot failures because 'udevadm exit' does not kill udevd worker threads

The output in comment #57 is pretty conclusive. The call to 'udevadm exit' is killing the parent process, but leaving all the worker threads running... and these worker threads are holding /dev open, preventing the mount -o move from working.

The use of 'udevadm exit' is a recent (oneiric-cycle) change, in response to bug #787610 / Debian bug #624469. Previously we used pkill, which would kill *all* the processes named 'udevd', ensuring that the children worker threads were also killed; but pkill is asynchronous (since all it does is send a signal), so that's also a race condition.

I see two possible fixes:

1) fix 'udevadm exit' to reap its children (but that may not be correct vis-à-vis upstream)
2) call 'udevadm exit', and then *also* call pkill udevd to reap any remaining children

James, please check the udev upstream source to see if there are any changes there already to make 'udevadm exit' handle its children more robustly. If there is, we should cherry-pick that fix. If there isn't, we should go with option 2) as a fallback. Option 2 is still racy because the child processes aren't guaranteed to die immediately either, but this will close the race as best as we can on short notice. If we do have to go with option 2, we should pursue a more robust 'udevadm exit' implementation with upstream.