-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
None
When plugging in a USB keyboad, Logitech Unifying receiver (or maybe another HID device?), lxd crashes with this output on the console (not in lxd.log):
panic: strings: negative Repeat count goroutine 234 [running]: strings.Repeat(0x14035f7, 0x1, 0xffffffffffffffff, 0xc0006c9404, 0x4) /usr/lib/go/src/strings/strings.go:533 +0x5ca main.deviceNetlinkListener.func1.2(...) /var/tmp/portage/app-emulation/lxd-3.20/work/go/src/github.com/lxc/lxd/lxd/devices.go:256 main.deviceNetlinkListener.func1(0x800, 0x19, 0xc00055d4a0, 0xc000274840, 0xc0002748a0, 0xc000274900) /var/tmp/portage/app-emulation/lxd-3.20/work/go/src/github.com/lxc/lxd/lxd/devices.go:266 +0x6b1 created by main.deviceNetlinkListener /var/tmp/portage/app-emulation/lxd-3.20/work/go/src/github.com/lxc/lxd/lxd/devices.go:96 +0x211
Also, dmesg prints the following. The messages from elogin-daemon are suspicious.
[ 4761.770344] usb 2-1.5.1: new low-speed USB device number 13 using ehci-pci [ 4761.905059] usb 2-1.5.1: New USB device found, idVendor=06a3, idProduct=8000, bcdDevice= 1.20 [ 4761.905063] usb 2-1.5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 4761.905065] usb 2-1.5.1: Product: USB Gaming Keyboard Pro [ 4761.905066] usb 2-1.5.1: Manufacturer: Chicony [ 4761.917157] input: Chicony USB Gaming Keyboard Pro as /devices/pci0000:00/0000:00:1a.0/usb2/2-1/2-1.5/2-1.5.1/2-1.5.1:1.0/0003:06A3:8000.0023/input/input36 [ 4761.974590] hid-generic 0003:06A3:8000.0023: input,hidraw6: USB HID v1.11 Keyboard [Chicony USB Gaming Keyboard Pro] on usb-0000:00:1a.0-1.5.1/input0 [ 4761.994978] input: Chicony USB Gaming Keyboard Pro Consumer Control as /devices/pci0000:00/0000:00:1a.0/usb2/2-1/2-1.5/2-1.5.1/2-1.5.1:1.1/0003:06A3:8000.0024/input/input37 [ 4762.054465] input: Chicony USB Gaming Keyboard Pro System Control as /devices/pci0000:00/0000:00:1a.0/usb2/2-1/2-1.5/2-1.5.1/2-1.5.1:1.1/0003:06A3:8000.0024/input/input38 [ 4762.054597] hid-generic 0003:06A3:8000.0024: input,hiddev1,hidraw7: USB HID v1.11 Device [Chicony USB Gaming Keyboard Pro] on usb-0000:00:1a.0-1.5.1/input1 [ 4762.065855] input: Chicony USB Gaming Keyboard Pro as /devices/pci0000:00/0000:00:1a.0/usb2/2-1/2-1.5/2-1.5.1/2-1.5.1:1.2/0003:06A3:8000.0025/input/input39 [ 4762.066014] hid-generic 0003:06A3:8000.0025: input,hidraw8: USB HID v1.11 Gamepad [Chicony USB Gaming Keyboard Pro] on usb-0000:00:1a.0-1.5.1/input2 [ 4762.132862] elogind-daemon[3868]: Watching system buttons on /dev/input/event19 (Chicony USB Gaming Keyboard Pro) [ 4762.166741] elogind-daemon[3868]: Watching system buttons on /dev/input/event21 (Chicony USB Gaming Keyboard Pro System Control)
Original description:
I am consistently getting errors like these during system shutdown.
* Stopping lxd service and containers ... Error: Get http://unix.socket/1.0: dial unix /var/lib/lxd/unix.socket: connect: no such file or directory * Could not stop all containers Error: Put http://unix.socket/internal/shutdown: dial unix /var/lib/lxd/unix.socket: connect: no such file or directory [ ok ]
This started after the lxc-3.20 upgrade, so I suspect this issue is related to the upgrade.
Further investigation reveals that running 'stopall' works gracefully.
perkins ~ # rc-service lxd stopall * Stopping lxd service and containers ... [ ok ]
However, running 'stop' followed by 'stopall' gives the errors.
perkins ~ # rc-service lxd stop * Stopping lxd service (but not containers) ... [ ok ] perkins ~ # rc-service lxd stopall * Stopping lxd service and containers ... Error: Get http://unix.socket/1.0: dial unix /var/lib/lxd/unix.socket: connect: no such file or directory * Could not stop all containers Error: Put http://unix.socket/internal/shutdown: dial unix /var/lib/lxd/unix.socket: connect: no such file or directory [ ok ]
Looking at the init script, stopall is supposed to run during shutdown.
stop() { if [ "$RC_GOINGDOWN" = "YES" ] || [ "$RC_REBOOT" = "YES" ]; then stopall else ebegin "Stopping lxd service (but not containers)" start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE} eend $? fi } stopall() { ebegin "Stopping lxd service and containers" lxc stop --all || eerror "Could not stop all containers" if "${DAEMON}" shutdown; then rm -f ${PIDFILE} eend 0 fi eend $? }