Comment 133 for bug 19171

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

The ubuntu14 upload (just accepted into the archive and building now) should fix
both the original set of problems and all the problems I caused by trying to fix
it ...

ubuntu13 tried to fix the problem by disabling listening for events on the
netlink socket, and only receiving them from the /proc/sys/kernel/hotplug
program (udevsend)... this would have stopped the race to get the first netlink
event because they weren't being taken and thus solved the bug.

Unfortunately it seems that although udevd is *supposed* to work without the
netlink socket, it's not actually been tested properly because with that code
disabled it core dumps. This is why events were being lost, not as I guessed
earlier because the kernel wasn't sending them.

Rather than try and fix the "no netlink" code path in udevd, I've opted for a
different fix...

udevd is now started manually in S04udev, this means that by the time the first
module is loaded it's already settled and listening for events, so won't miss
any from the kernel. Debian have actually done this for a week or so now, but
didn't understand why this fixed it; now I understand the original bug, this is
a valid fix.

In fact, it's not even a hack, because in dapper we won't be using
/proc/sys/kernel/hotplug at all and relying solely on netlink events -- so we
need to start udevd somewhere anyway.

So upgrade to ubuntu14 and both sets of problems will be fixed. I'll keep this
bug open for a day or so in case anybody still has problems, but I'm really not
expecting any now <g>