Bug 249602

Summary: kernel.i686 0:2.6.22.1-27.fc7 breaks nut when using the newhidups driver
Product: [Fedora] Fedora Reporter: Brian Daniels <bitmage>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 7CC: chris.brown, triage, tschweikle, tsmetana, zaitcev
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-17 01:57:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 165247    

Description Brian Daniels 2007-07-25 18:06:09 UTC
Description of problem:
I am using nut with the driver in /etc/ups/ups.conf set to newhidups.  This
configuration has been working without problems.  After doing a 'yum update'
today, my system upgraded from kernel 2.6.21-1.3228.fc7 to 2.6.22.1-27.fc7. 
After this update, nut cannot start the ups driver.

Running newhidups in debug mode as follows:  newhidups -DDDDDD -a apc
produces the following output:

Checking device (051D/0002) (002/004)
- VendorID: 051d
- ProductID: 0002
- Manufacturer: unknown
- Product: unknown
- Serial Number: unknown
- Bus: 002
Trying to match device
Device matches
failed to claim USB device, trying 2 more time(s)...
detaching kernel driver from USB device...
failed to detach kernel driver from USB device...
trying again to claim USB device...
failed to claim USB device, trying 1 more time(s)...
detaching kernel driver from USB device...
failed to detach kernel driver from USB device...
trying again to claim USB device...
failed to claim USB device, trying 0 more time(s)...
detaching kernel driver from USB device...
failed to detach kernel driver from USB device...
trying again to claim USB device...
Unable to get HID descriptor (error sending control message: Operation not
permitted)
i=0, extra[i]=09, extra[i+1]=21
HID descriptor, method 2: (9 bytes) => 09 21 10 01 21 01 22 37 04
HID descriptor retrieved (Reportlen = 1079)
Unable to get Report descriptor (-1): Operation not permitted

Rebooting using the previous kernel version corrects the problem.
This discussion on LKML may be relevant: http://lkml.org/lkml/2007/6/2/180

Comment 1 Tomas Smetana 2007-08-15 08:33:26 UTC
Sorry for the delayed answer -- I had no UPS to test this issue...  The problem
you describe is not in nut -- it is definitely a kernel error.  I had the same
problem on FC6 and kernel upgrade helped.  However the recent rawhide kernel
fails with the same symptoms.  Until I find the exact cause I may only advise
you to try to upgrade the kernel.  Please let me know whether it helps or not.

Comment 2 Tomas Smetana 2007-08-15 12:01:32 UTC
This may be an instance of the bug 249211.

Comment 3 Brian Daniels 2007-08-15 14:11:11 UTC
It is working fine on 2.6.22.1-41.fc7.  I'll reopen the issue if a later kernel
breaks it again.


Comment 4 Tomas Smetana 2007-08-16 06:16:08 UTC
OK. I'm closing this one. If someone decides to reopen, please assign this bug
to kernel component.

Comment 5 Brian Daniels 2007-08-17 12:53:49 UTC
Ok, I thought it was working.  It was fine just after updating to -41, but as of
rebooting this morning it's failing again:

Checking device (051D/0002) (002/002)
- VendorID: 051d
- ProductID: 0002
- Manufacturer: unknown
- Product: unknown
- Serial Number: unknown
- Bus: 002
Trying to match device
Device matches
failed to claim USB device, trying 2 more time(s)...
detaching kernel driver from USB device...
failed to detach kernel driver from USB device...
trying again to claim USB device...
failed to claim USB device, trying 1 more time(s)...
detaching kernel driver from USB device...
failed to detach kernel driver from USB device...
trying again to claim USB device...
failed to claim USB device, trying 0 more time(s)...
detaching kernel driver from USB device...
failed to detach kernel driver from USB device...
trying again to claim USB device...
Unable to get HID descriptor (error sending control message: Operation not
permitted)
i=0, extra[i]=09, extra[i+1]=21
HID descriptor, method 2: (9 bytes) => 09 21 10 01 21 01 22 37 04
HID descriptor retrieved (Reportlen = 1079)
Unable to get Report descriptor (-1): Operation not permitted

Sorry for the confusion - I don't know why it worked on the previous boot.

Comment 6 Brian Daniels 2007-08-24 19:17:55 UTC
The problem still exists in 2.6.22.4-65.fc7



Comment 7 Brian Daniels 2007-09-06 14:55:36 UTC
Interestingly, the ups will work if I hotplug it, i.e:

/etc/rc.d/init.d/ups stop
unplug ups USB cable
plug USB cable back in
/etc/rc.d/init.d/ups start

And it works.  But it will fail with the 'Operation not permitted' error again
on the next reboot.



Comment 8 Brian Daniels 2007-09-17 13:03:46 UTC
Still broken in 2.6.22.5-76.fc7

Comment 9 Christopher Brown 2007-09-20 14:46:38 UTC
Hello Brian,

I'm reviewing this bug as part of the kernel bug triage project, an attempt to
isolate current bugs in the fedora kernel.

http://fedoraproject.org/wiki/KernelBugTriage

I am CC'ing myself to this bug and will try and assist you in resolving it if I can.

This issue:

http://lkml.org/lkml/2007/6/2/153

indicates that this commit:

commit 9f8b17e643fe6aa505629658445849397bda4e4f

causes the breakage however it was never reverted. The same thread indicates
that setting:

  CONFIG_USB_DEVICE_CLASS=y

fixes the issue. The above is set in the latest kernel but is obviously not
working for you. Can you test with the latest rawhide kernel and see if the
issue is resolved?

Cheers
Chris

Comment 10 Brian Daniels 2007-09-20 15:40:33 UTC
Ok, installed 'yum install kernel-2.6.23 --enablerepo=development'

When running on 2.6.23-0.187.rc6.git7.fc8, trying to start driver gives an
almost-identical error (below).  The hotplug trick listed above no longer works
on the new kernel - it fails with the same error.  Reverting back to
2.6.22.5-76.fc7 gets the hotplug trick working again.

#newhidups -DDDDDD -a apc
Checking device (051D/0002) (002/002)
- VendorID: 051d
- ProductID: 0002
- Manufacturer: unknown
- Product: unknown
- Serial Number: unknown
- Bus: 002
Trying to match device
Device matches
failed to claim USB device, trying 2 more time(s)...
detaching kernel driver from USB device...
failed to detach kernel driver from USB device...
trying again to claim USB device...
failed to claim USB device, trying 1 more time(s)...
detaching kernel driver from USB device...
failed to detach kernel driver from USB device...
trying again to claim USB device...
failed to claim USB device, trying 0 more time(s)...
detaching kernel driver from USB device...
failed to detach kernel driver from USB device...
trying again to claim USB device...
Unable to get HID descriptor (error sending control message: Operation not permi
i=0, extra[i]=09, extra[i+1]=21
HID descriptor, method 2: (9 bytes) => 09 21 10 01 21 01 22 37 04
HID descriptor retrieved (Reportlen = 1079)
Unable to get Report descriptor (-1): Operation not permitted


Comment 11 Christopher Brown 2007-09-20 16:00:33 UTC
Okay, re-assigning to the relevant maintainer who might be able to shed some
light on the issue. Thanks for testing.

Cheers
Chris

Comment 12 Brian Daniels 2007-10-31 19:32:05 UTC
Installed kernel - 2.6.23.1-10.fc7.i686, which not only does not fix the issue,
but breaks the hotplug workaround described above.  This leaves no way to check
status of a USB UPS system on Fedora.

I'm getting the same 'Operation not permitted' errors as before.  Running
ls -lR /proc/bus/usb/ shows that no node is getting assigned to the 'nut' group
despite the existence of /etc/udev/rules.d/nut-usbups.rules from the nut-2.0.5-5
package.

If I force newhidups to run as root, then it works.  Something has gotten borked
here between the newer kernels, nut, and udev.

Comment 13 Christopher Brown 2007-12-13 18:49:00 UTC
*** Bug 253823 has been marked as a duplicate of this bug. ***

Comment 14 Need Real Name 2008-01-20 13:10:18 UTC
probably this is already well known, but in fedora 8 version 2.6.23.9-85.fc8 a
USB ups APC cs 650 is working perfect again

Comment 15 Bug Zapper 2008-05-14 13:40:20 UTC
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. 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 '7'.

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 7'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 7 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. 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. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 16 Bug Zapper 2008-06-17 01:57:52 UTC
Fedora 7 changed to end-of-life (EOL) status on June 13, 2008. 
Fedora 7 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.