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.
/* 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;
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 ======= ======= ======= ======= ======= ======= ======= ======= ==== orig/udev/ udevd.c 2011-10-06 22:14:07.000000000 -0500 udev/udevd. c 2011-10-06 22:34:12.000000000 -0500
worker_ kill(udev, 0);
=======
--- udev-173.
+++ udev-173/
@@ -1633,8 +1633,16 @@
- if (udev_list_
+ if (udev_list_
+ info(udev, "event list and worker list are empty\n");
+ }
+ if (!udev_
+ info(udev, "with udev_exit, event list not empty\n");
+ }
+ if (!udev_
+ info(udev, "with udev_exit, worker list not empty\n");
+ }