VM suddently stopped by: kvm: ../hw/usb/core.c:433: usb_handle_packet: Assertion `QTAILQ_EMPTY(&p->ep->queue)' failed.

TCr

Member
Mar 20, 2021
1
0
21
43
Hi,

I am hunting a problem in my Proxmox installation. I am running a Home Assistent VM with a Sonoff Zigbee USB Stick. My Problem is, that for some days I struckle with that Stick. The software looses the connection to the stick. Also was the whole VM stopped - and now I had time to check that closer and found that in journalctl -e output:

Code:
Mai 23 15:43:24 pve.mgmt.lan QEMU[1312]: kvm: ../hw/usb/core.c:433: usb_handle_packet: Assertion `QTAILQ_EMPTY(&p->ep->queue)' failed.
[...]
Mai 23 15:43:25 pve.mgmt.lan qmeventd[51675]: Starting cleanup for 100
[...]
Mai 23 15:43:25 pve.mgmt.lan qmeventd[51675]: Finished cleanup for 100
Mai 23 15:43:26 pve.mgmt.lan systemd[1]: 100.scope: Deactivated successfully.
Mai 23 15:43:26 pve.mgmt.lan systemd[1]: 100.scope: Consumed 4h 17min 33.727s CPU time.

I am going right, when I say, that the usb problem should not terminate the VM process?

Code:
pve:~# qm config 100
agent: 1
bios: ovmf
boot: order=virtio0;ide2;net0
cores: 6
cpu: x86-64-v2-AES
efidisk0: local-lvm:vm-100-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:01:00,pcie=1
ide2: none,media=cdrom
localtime: 0
machine: q35
memory: 16384
meta: creation-qemu=8.1.5,ctime=1728083824
name: zentrale
net0: virtio=BC:XX:XX:XX:XX:XX,bridge=vmbr0
net1: virtio=10:XX:XX:XX:XX:XX,bridge=vmbr0,tag=10
net2: virtio=30:XX:XX:XX:XX:XX,bridge=vmbr0,tag=30
numa: 0
onboot: 1
ostype: l26
scsihw: virtio-scsi-pci
smbios1: uuid=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
sockets: 1
tablet: 1
usb0: host=1a86:55d4
usb1: host=04fa:2490
usb2: host=04fa:2490
usb3: host=04fa:2490
usb4: host=04b4:f901
usb5: host=2-4
usb6: host=2-1
usb7: host=2-2
virtio0: local-lvm:vm-100-disk-1,iothread=1,size=500G
virtio2: /dev/disk/by-partuuid/262980b7-e86e-42bd-a779-16707b8108d3,backup=0,size=2000397868544
virtio3: /dev/disk/by-partuuid/fd0fc389-eb47-483f-be14-b929a07bc989,backup=0,size=2000397868544
vmgenid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Code:
pve:~# pveversion -v
proxmox-ve: 8.4.0 (running kernel: 6.8.12-9-pve)
pve-manager: 8.4.1 (running version: 8.4.1/2a5fa54a8503f96d)
proxmox-kernel-helper: 8.1.1
proxmox-kernel-6.8.12-10-pve-signed: 6.8.12-10
proxmox-kernel-6.8: 6.8.12-10
proxmox-kernel-6.8.12-9-pve-signed: 6.8.12-9
proxmox-kernel-6.8.4-2-pve-signed: 6.8.4-2
ceph-fuse: 17.2.7-pve3
corosync: 3.1.9-pve1
criu: 3.17.1-2+deb12u1
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx11
ksm-control-daemon: 1.5-1
libjs-extjs: 7.0.0-5
libknet1: 1.30-pve2
libproxmox-acme-perl: 1.6.0
libproxmox-backup-qemu0: 1.5.1
libproxmox-rs-perl: 0.3.5
libpve-access-control: 8.2.2
libpve-apiclient-perl: 3.3.2
libpve-cluster-api-perl: 8.1.0
libpve-cluster-perl: 8.1.0
libpve-common-perl: 8.3.1
libpve-guest-common-perl: 5.2.2
libpve-http-server-perl: 5.2.2
libpve-network-perl: 0.11.2
libpve-rs-perl: 0.9.4
libpve-storage-perl: 8.3.6
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 6.0.0-1
lxcfs: 6.0.0-pve2
novnc-pve: 1.6.0-2
proxmox-backup-client: 3.4.1-1
proxmox-backup-file-restore: 3.4.1-1
proxmox-firewall: 0.7.1
proxmox-kernel-helper: 8.1.1
proxmox-mail-forward: 0.3.2
proxmox-mini-journalreader: 1.4.0
proxmox-offline-mirror-helper: 0.6.7
proxmox-widget-toolkit: 4.3.10
pve-cluster: 8.1.0
pve-container: 5.2.6
pve-docs: 8.4.0
pve-edk2-firmware: 4.2025.02-3
pve-esxi-import-tools: 0.7.4
pve-firewall: 5.1.1
pve-firmware: 3.15-3
pve-ha-manager: 4.0.7
pve-i18n: 3.4.2
pve-qemu-kvm: 9.2.0-5
pve-xtermjs: 5.5.0-2
qemu-server: 8.3.12
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0
zfsutils-linux: 2.2.7-pve2
 
Last edited:
Hi,
Code:
Mai 23 15:43:24 pve.mgmt.lan QEMU[1312]: kvm: ../hw/usb/core.c:433: usb_handle_packet: Assertion `QTAILQ_EMPTY(&p->ep->queue)' failed.

I am going right, when I say, that the usb problem should not terminate the VM process?
ideally not, but an assertion failure means that QEMU's internal logic is faulty or that it is unable to handle an unexpected error condition. Since it cannot be guaranteed that the process will function without corrupting data or behave in a well-defined manner, it is terminated.

To further debug the issue please run apt install pve-qemu-kvm-dbgsym gdb systemd-coredump. The next time a crash happens afterwards, you can run coredumpctl -1 gdb and then in the GDB prompt thread apply all backtrace. This will obtain a backtrace of the crash.