Bug 494246 - hidp remove events have wrong path
hidp remove events have wrong path
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
: MoveUpstream
Depends On:
  Show dependency treegraph
Reported: 2009-04-05 19:45 EDT by David Woodhouse
Modified: 2010-06-28 07:42 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-06-28 07:42:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Woodhouse 2009-04-05 19:45:48 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.
Comment 1 David Woodhouse 2009-05-05 18:25:01 EDT
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)
Comment 2 Bug Zapper 2009-06-09 09:19:05 EDT
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:
Comment 3 Arnaud Kleinveld 2010-01-16 02:57:35 EST
I have exactly the same problem. The only workaround I have found till now is to restart my X-server
Comment 4 Bug Zapper 2010-04-27 09:30:55 EDT
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: 
Comment 5 Bug Zapper 2010-06-28 07:42:18 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.