Hide Forgot
Created attachment 557703 [details] /var/log/libvirt/qemu/....log Description of problem: After upgrade of qemu-kvm from 0.12.1.2-2.209.el6_2.1, VM with assigned usb network device crashes with qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.12.1.2/hw/usb.c:345: usb_packet_complete: Assertion `p->owner != ((void *)0)' failed. Version-Release number of selected component (if applicable): 0.12.1.2-2.209.el6_2.4 How reproducible: reliably, though the crash can be immediate or take a little while (probably depends on network traffic) Steps to Reproduce: 1. create a VM and assign a specific usb hardware device to it (in my case 0b95:7720 Device 001:002 ASIX Elec. Corp. AX88772 ) 2. boot up 3. wait Actual results: assertion failed, machine shuts down Expected results: vm should work and have access to the net via the usb nic Additional info: This appears to the bug for which http://repo.or.cz/w/qemu.git/commitdiff/80cf7cf74f29a219e02b50f27c12b1c792ebf99b has a patch
I tried the above mentioned patch and had the same VM crash, so it alone is not enough.
Investigation of the older logs for the VM and the yum log for the host suggests that the VM was never booted with qemu-kvm 0.12.1.2-2.209.el6_2.1 as it was running continuously from 2012-01-13 to 2012-01-26. So the non-crashing version was probably qemu-kvm-0.12.1.2-2.160.el6_1.2.x86_64. Further investigation required to determine which is the earliest version that stops it working.
Have confirmed that the fault occurs with qemu-kvm-0.12.1.2-2.209.el6_2.1 Downgrading to 0.12.1.2-2.160.el6_1.2 appears to cure the problem. Currently running with qemu-kvm-0.12.1.2-2.209.el6_2.4 patched to comment out the assertion: +++ hw/usb.c 2012-01-31 15:52:48.000000000 +0000 @@ -342,7 +342,9 @@ void usb_packet_complete(USBDevice *dev, USBPacket *p) { /* Note: p->owner != dev is possible in case dev is a hub */ + /* assert(p->owner != NULL); + */ dev->port->ops->complete(dev->port, p); p->owner = NULL; } and have not had any errors yet, which suggests that something in kvm-usb-keep-track-of-packet-owner.patch isn’t quite right, but I don’t understand the code well enough to determine what. (not attached as a patch as it’s not a real solution)
Eventually dies with qemu-kvm: /home/jf/rpmbuild/BUILD/qemu-kvm-0.12.1.2/hw/usb.c:357: usb_cancel_packet: Assertion `p->owner != ((void *)0)' failed. Now running with all the assertions in usb.c turned off (ie #define NDEBUG at top of hw/usb.c)
Which eventually dies with just “shutting down”, so there is definitely a bug rather than the assertions being over strict.
*** This bug has been marked as a duplicate of bug 783321 ***