7 votes

Crashing a server by charging a vape battery

While I consider this resolved at time of posting, this is one of my weirder, more unexpected tech issues I've run into and I thought y'all might enjoy it.

I'd been having issues with my (Ubuntu) server where its services were unavailable, I couldn't SSH in, and USB devices plugged in after the issues started weren't connecting (mouse LED would light up, couldn't toggle keyboard locks or interface computer with the devices). These issues were becoming a near daily occurrence.

So after the most recent incident I decided to watch it boot. After grub, it would just hang at a black screen. So I opted for the recovery mode and after waiting some minutes for services to time out, I was given a terminal and used that to check my devices, sensors, etc and all were reading fine.

Frustrated, I started reviewing what else could have possibly changed with my setup, and I found that change in my hand. I use my server's front USBs as a low current charger and had recently got a new vape battery that was charging at that moment.

I unplugged the battery, rebooted, everything was fine. Plugged the battery in, everything locked up again immediately.

I had been using a spare cable, it had data wired. Swapping for the included power only cable, and no issues.

While I'm curious as to what exactly is happening and why, I'm satisfied enough concluding it is a cheap vape (I mean, I'm having to charge the sucker near daily after all) that is transmitting junk over data and the OS doesn't handle it appropriately. I'll pull logs or do another couple tests if other folks are curious as well though.

Oh, and the battery is a Bear Rootz Sol. Come to think of it, my other worst battery at holding a charge was also a Bear Rootz.

1 comment

  1. xk3
    (edited )
    Link
    Bear.Rootz sounds like a rootkit lol... I have a really long >15m USB cable and the past couple days it has been pretty flaky but I don't get any of the issues you mentioned. I can still SSH in...

    Bear.Rootz sounds like a rootkit lol...

    I have a really long >15m USB cable and the past couple days it has been pretty flaky but I don't get any of the issues you mentioned. I can still SSH in and run dmesg:

    kern  :err   : [Dec17 11:40] usb 1-4-port1: disabled by hub (EMI?), re-enabling...
    kern  :err   : [  +0.059393] usb 1-6-port1: disabled by hub (EMI?), re-enabling...
    kern  :warn  : [  +0.009705] usb 1-4.1: Device not responding to setup address.
    kern  :warn  : [  +0.208603] usb 1-4.1: Device not responding to setup address.
    kern  :err   : [  +0.206995] usb 1-4.1: device not accepting address 26, error -71
    kern  :err   : [  +0.000477] usb 1-4-port4: disabled by hub (EMI?), re-enabling...
    kern  :err   : [  +0.111037] usb 1-6-port2: disabled by hub (EMI?), re-enabling...
    kern  :err   : [Dec17 12:48] usb 1-8.4.4.1: device descriptor read/all, error -71
    kern  :err   : [  +0.015326] usbhid 1-8.4.4.1:1.0: can't add hid device: -71
    kern  :err   : [  +0.000233] usbhid 1-8.4.4.1:1.0: probe with driver usbhid failed with error -71
    kern  :err   : [  +0.006351] usbhid 1-8.4.4.1:1.1: can't add hid device: -71
    kern  :err   : [  +0.000036] usbhid 1-8.4.4.1:1.1: probe with driver usbhid failed with error -71
    kern  :err   : [  +0.004344] usbhid 1-8.4.4.1:1.2: can't add hid device: -71
    kern  :err   : [  +0.003029] usbhid 1-8.4.4.1:1.2: probe with driver usbhid failed with error -71
    kern  :err   : [Dec17 13:03] hub 1-8:1.0: hub_ext_port_status failed (err = -71)
    kern  :err   : [  +0.208016] hub 1-8:1.0: hub_ext_port_status failed (err = -71)
    kern  :err   : [  +0.000138] usb 1-8-port4: cannot reset (err = -71)
    kern  :err   : [  +0.000125] usb 1-8-port4: cannot reset (err = -71)
    kern  :err   : [  +0.000127] usb 1-8-port4: cannot reset (err = -71)
    kern  :err   : [  +0.000001] usb 1-8-port4: Cannot enable. Maybe the USB cable is bad?
    kern  :err   : [  +0.000132] usb 1-8-port4: cannot disable (err = -71)
    

    When I run this usb_reset script then everything works again for another 10 minutes:

    #!/bin/bash
    
    if [[ $EUID != 0 ]] ; then
      echo This must be run as root!
      exit 1
    fi
    
    for xhci in /sys/bus/pci/drivers/?hci_hcd ; do
    
      if ! cd $xhci ; then
        echo Weird error. Failed to change directory to $xhci
        exit 1
      fi
    
      echo Resetting devices from $xhci...
    
      for i in ????:??:??.? ; do
        echo -n "$i" > unbind
        echo -n "$i" > bind
      done
    done
    

    But it sounds like your USB issues are lower level... probably interrupt or power!? related

    edit: potentially interesting links:

    None of those will likely help solve your problem but they were interesting to read

    4 votes