[Bug 1483615] Re: usbhid-ups driver segfaults on discovery of UPS

davis davis65536 at yahoo.co.uk
Mon Jan 25 12:30:24 UTC 2016


Hi Charles,

I can see your thinking, but no, this isn't a VM, nor is the kernel I'm
using a Hypervisor - it's a plain old machine:

root at barnbox:~# grep -i hyper /proc/cpuinfo
root at barnbox:~# 


I updated the machine with apt-get (again) and I also updated the machine's BIOS. Prior to doing the updates I tried the lsusb command and it worked:

root at barnbox:~# lsusb -vvv -d051d:

Bus 001 Device 003: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x051d American Power Conversion
  idProduct          0x0002 Uninterruptible Power Supply
  bcdDevice            0.06
  iManufacturer           3 American Power Conversion
  iProduct                1 Back-UPS CS 350 FW:807.q10 .I USB FW:q10 
  iSerial                 2 4B1419P32390  
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode           33 US
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength    1217
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0006  1x 6 bytes
        bInterval             100
Device Status:     0x0000
  (Bus Powered)
root at barnbox:~# 



However, weirdly, since doing the update, usbhid-ups no longer segfaults - it still doesn't work, but it's interesting

Annoyingly, I never ran the intermediate stages, so I don't know which
change made the difference (I suppose it could be HP's firmware doing
something funky, but I doubt it...):

I believe this usbhid-ups command should match the UPS, but it appears
to skip it:

root at barnbox:~# /lib/nut/usbhid-ups -u nut -a apc -x bus=001 -x vendorid=051D -x productid=0002 -DDDD
Network UPS Tools - Generic HID driver 0.38 (2.7.1)
USB communication driver 0.32
   0.000000	debug level is '4'
   0.000409	upsdrv_initups...
   0.022724	Checking device (1D6B/0003) (005/001)
   0.023048	- VendorID: 1d6b
   0.023060	- ProductID: 0003
   0.023064	- Manufacturer: unknown
   0.023067	- Product: unknown
   0.023069	- Serial Number: unknown
   0.023072	- Bus: 005
   0.023075	Trying to match device
   0.023087	Device does not match - skipping
   0.023225	Checking device (1D6B/0002) (004/001)
   0.023392	- VendorID: 1d6b
   0.023405	- ProductID: 0002
   0.023409	- Manufacturer: unknown
   0.023412	- Product: unknown
   0.023414	- Serial Number: unknown
   0.023417	- Bus: 004
   0.023420	Trying to match device
   0.023424	Device does not match - skipping
   0.023492	Checking device (1D6B/0001) (003/001)
   0.054600	- VendorID: 1d6b
   0.054612	- ProductID: 0001
   0.054616	- Manufacturer: unknown
   0.054619	- Product: unknown
   0.054622	- Serial Number: unknown
   0.054624	- Bus: 003
   0.054627	Trying to match device
   0.054632	Device does not match - skipping
   0.062511	Checking device (0424/4030) (002/004)
   0.062541	- VendorID: 0424
   0.062546	- ProductID: 4030
   0.062549	- Manufacturer: unknown
   0.062552	- Product: unknown
   0.062555	- Serial Number: unknown
   0.062557	- Bus: 002
   0.062560	Trying to match device
   0.062564	Device does not match - skipping
   0.062570	Checking device (0424/2660) (002/003)
   0.062580	- VendorID: 0424
   0.062583	- ProductID: 2660
   0.062586	- Manufacturer: unknown
   0.062588	- Product: unknown
   0.062591	- Serial Number: unknown
   0.062593	- Bus: 002
   0.062596	Trying to match device
   0.062599	Device does not match - skipping
   0.062603	Checking device (8087/0024) (002/002)
   0.062611	- VendorID: 8087
   0.062614	- ProductID: 0024
   0.062617	- Manufacturer: unknown
   0.062619	- Product: unknown
   0.062622	- Serial Number: unknown
   0.062624	- Bus: 002
   0.062627	Trying to match device
   0.062630	Device does not match - skipping
   0.062634	Checking device (1D6B/0002) (002/001)
   0.062644	- VendorID: 1d6b
   0.062647	- ProductID: 0002
   0.062649	- Manufacturer: unknown
   0.062652	- Product: unknown
   0.062655	- Serial Number: unknown
   0.062657	- Bus: 002
   0.062659	Trying to match device
   0.062662	Device does not match - skipping
   0.062667	Checking device (051D/0002) (001/003)
   0.100598	- VendorID: 051d
   0.100611	- ProductID: 0002
   0.100615	- Manufacturer: American Power Conversion
   0.100618	- Product: Back-UPS CS 350 FW:807.q10 .I USB FW:q10 
   0.100621	- Serial Number: 4B1419P32390  
   0.100624	- Bus: 001
   0.100626	Trying to match device
   0.100668	Device does not match - skipping
   0.100679	Checking device (8087/0024) (001/002)
   0.100694	- VendorID: 8087
   0.100697	- ProductID: 0024
   0.100700	- Manufacturer: unknown
   0.100703	- Product: unknown
   0.100705	- Serial Number: unknown
   0.100708	- Bus: 001
   0.100710	Trying to match device
   0.100714	Device does not match - skipping
   0.100719	Checking device (1D6B/0002) (001/001)
   0.100731	- VendorID: 1d6b
   0.100734	- ProductID: 0002
   0.100737	- Manufacturer: unknown
   0.100739	- Product: unknown
   0.100742	- Serial Number: unknown
   0.100744	- Bus: 001
   0.100747	Trying to match device
   0.100749	Device does not match - skipping
   0.100754	No appropriate HID device found
   0.100758	No matching HID UPS found


Still, at least it doesn't segfault!

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to nut in Ubuntu.
https://bugs.launchpad.net/bugs/1483615

Title:
  usbhid-ups driver segfaults on discovery of UPS

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nut/+bug/1483615/+subscriptions



More information about the Ubuntu-server-bugs mailing list