Duplicate UDIs for a single device

Danny Kukawka danny.kukawka at web.de
Tue Apr 28 05:13:03 PDT 2009


On Mittwoch, 22. April 2009, Kay Sievers wrote:
> On Wed, Apr 22, 2009 at 22:34, Drew Moseley <dmoseley at mvista.com> wrote:
> > I'm tracking an issue in version 0.5.11.  Occasionally I see two UDIs
> > entered for my wlan device:
> >
> > # hal-find-by-capability --capability net.80211
> > /org/freedesktop/Hal/devices/net_00_13_e0_cc_c9_02_0
> > /org/freedesktop/Hal/devices/net_00_13_e0_cc_c9_02
> >
> > This appears to occur due to a race condition between the
> > coldplug_synthesize_events() loop and hotplug events coming in from udev.
> >  In the failure scenario, I am seeing a hotplug event for the device-add
> > being processed before the coldplug loop has completed.
> >
> > I see several patches in the code that appear to address multiple devices
> > and proper sequencing but none seem to fix my particular failure.
> >
> > Any idea how to fix this?  Should the hotplug events be processed before
> > the coldplug_synthesize_events loop is complete?
>
> I guess, HAL should be fixed not to add two devices with the same
> devpath, The path is unique, and HAL should reflect that. I thought
> there is code in there to do that, but it's likely broken by some
> change. If you run "udevadm trigger" you see many duplicated devices,
> that should just not happen at all in HAL.

First I would propose to check the latest HAL, this issue is maybe already 
fixed in git. 

For the problem with udevadm trigger: there is already a fix.
http://cgit.freedesktop.org/~dkukawka/hal/commit/?id=999818f10b45cf516dc7e828d2f7e2cbe615cae3

Danny


More information about the hal mailing list