Comment 66 for bug 818177

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: boot failures because 'udevadm exit' does not kill udevd worker threads

With initrd's scripts/init-top/udev changed to run udev with -D and > /run/initrd/udev.log 2>&1, I get this output. I also added to udev/udevd.c the following patch. Note that IIUC there are both workers and events on the list. Every time that I've tried to print out info about the remaining events, I've failed to reproduce the hang.

(This, fwiw, is on the VMs with no LVM at all)

Index: udev-173/udev/udevd.c
===================================================================
--- udev-173.orig/udev/udevd.c 2011-10-06 22:14:07.000000000 -0500
+++ udev-173/udev/udevd.c 2011-10-06 22:34:12.000000000 -0500
@@ -1633,8 +1633,16 @@
                        worker_kill(udev, 0);

                        /* exit after all has cleaned up */
- if (udev_list_is_empty(&event_list) && udev_list_is_empty(&worker_list))
+ if (udev_list_is_empty(&event_list) && udev_list_is_empty(&worker_list)) {
+ info(udev, "event list and worker list are empty\n");
                                break;
+ }
+ if (!udev_list_is_empty(&event_list)) {
+ info(udev, "with udev_exit, event list not empty\n");
+ }
+ if (!udev_list_is_empty(&worker_list)) {
+ info(udev, "with udev_exit, worker list not empty\n");
+ }

                        /* timeout at exit for workers to finish */
                        timeout = 60 * 1000;