[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian and UDEV

On Thu, May 18, 2006 at 04:50:44PM +0200, Wouter Verhelst wrote:

> Install udev on my system -> things break randomly and unreproducibly,
> due to race conditions all over the place.

This is quite in line with what I said about userspace not being ready
for hotplug. The kernel can send the events in parallel (or nearly
parallel on UP) and udev executes the events also in parallel. If the
programs udev calls don't do the neccessary locking - fix them.

> Install hotplug on my system, and make sure udev is not installed ->
> things Just Work(TM).

That does not prove that the same race conditions do not exist. It only
proves that the (quite noticable) overhead of forking a new shell for
every event changes the timing so they are less likely to be hit, thus
just papering over the bugs.

Actually, if you look at the hotplug .agent scripts you may find
artificial "sleep"s in some of them that's just seem to paper over the
race conditions you're talking about... What happens if you add the same
delays to the udev rules?


     MTA SZTAKI Computer and Automation Research Institute
                Hungarian Academy of Sciences,
     Laboratory of Parallel and Distributed Systems
     Address   : H-1132 Budapest Victor Hugo u. 18-22. Hungary
     Phone/Fax : +36 1 329-78-64 (secretary)
     W3        : http://www.lpds.sztaki.hu

Reply to: