Red Hat Bugzilla – Bug 494246
hidp remove events have wrong path
Last modified: 2010-06-28 07:42:18 EDT
The reason I hit bug #494245 so reliably is because when I turn off my Bluetooth mouse, the HAL DeviceRemoved notification never actually comes.
This is because the generated udev events have the wrong path -- the sysfs device for the connection has gone away already, so the input devices which were its children now appear with a truncated path.
This is when I use 'hidd -K', and things work correctly:
UEVENT[1238958724.914237] remove /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.1/3-1.1:1.0/bluetooth/hci0/hci0:11/input29/mouse1 (input)
UEVENT[1238958724.918827] remove /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.1/3-1.1:1.0/bluetooth/hci0/hci0:11/input29/event6 (input)
UEVENT[1238958724.924149] remove /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.1/3-1.1:1.0/bluetooth/hci0/hci0:11/input29 (input)
UEVENT[1238958724.926257] remove /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.1/3-1.1:1.0/bluetooth/hci0/hci0:11/0005:0000:0000.0016 (hid)
And this is with 'hcitool dc 00:0A:94:C0:7E:17':
UEVENT[1238958770.313405] remove /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.1/3-1.1:1.0/bluetooth/hci0/hci0:11 (bluetooth)
UEVENT[1238958770.313954] remove /hci0:11/input30/mouse1 (input)
UEVENT[1238958770.319588] remove /hci0:11/input30/event6 (input)
UEVENT[1238958770.325164] remove /hci0:11/input30 (input)
UEVENT[1238958770.325952] remove /hci0:11/0005:0000:0000.0017 (hid)
The lifetime rules for the struct hci_conn seem fairly screwed to me, overall.
For example, what stops it from going away while hidp_get_device() has a reference to it? A damn small window, admittedly... but a window nonetheless.
Making the hci_sysfs_del_conn() use device_move() for the input devices seems like it might be doing something vaguely reasonable, but X still crashed -- I suspect it treats 'move' the same as 'add' and doesn't remove the old device.
This eventually leads to the mouse failing to return, because there are so many duplicate devices:
(EE) Too many input devices. Ignoring Bluetooth Mouse
(II) UnloadModule: "evdev"
(EE) config/hal: NewInputDeviceRequest failed (11)
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.
More information and reason for this action is here:
I have exactly the same problem. The only workaround I have found till now is to restart my X-server
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '11'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 11's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 11 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.