Bug 783321

Summary: qemu-kvm-0.12.1.2 shuts down guest unexpectedly
Product: Red Hat Enterprise Linux 6 Reporter: bill
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1CC: acathrow, bsarathy, jon.fairbairn, juzhang, mkenneth, pebolle, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-06 08:43:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description bill 2012-01-20 00:17:22 UTC
Description of problem:
After upgrading my SL 6.1 with qemu-kvm-0.12.1.2, one of my SL 6.1 guest servers keeps shutting down every few hours. It has a weather station attached via USB which is interrogated every few minutes.
The message in the host log is as follows:
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

How reproducible:
Run guest for several hours. 

Steps to Reproduce:
1.
2.
3.
  
Actual results:
Guest server shuts down after a random number of hours.

Expected results:
Guest server stays up.

Additional info:
I downgraded to qemu-kvm-0.12.1.2-2.160.el6_1.8.x86_64 on the host machine and the problem goes away.

I have been informed that a Red Hat Employees only bug # 740707 has been reported for a similar error message.

Comment 1 bill 2012-01-20 00:23:33 UTC
My apologies the full version of the problem item is 0.12.1.2-2.209.el6_2.1.x86_64

Comment 3 Paul Bolle 2012-01-25 11:19:37 UTC
See bug #769625 (for 0.15.1-3.fc16, ie, current qemu for Fedora 16). That report has a (backported) patch attached, which is claimed to fix this issue.

Comment 4 bill 2012-01-26 21:33:59 UTC
This seems to be fixed in qemu-kvm-0.12.1.2-2.209.el6_2.4.x86_64

Comment 5 bill 2012-01-27 02:51:34 UTC
It seems I replied too soon. After nearly 21 hours that version shut down the guest, just as before.

qemu: terminating on signal 152012-01-26 15:48:48.022: starting up
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -S -M rhel6.1.0 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name ferdinand -uuid b7935e0d-9aee-8855-91ab-f7ec7f7ebdbf -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/ferdinand.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-acpi -drive file=/mnt/ferdinand/ferdinand.img,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=threads -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=21,id=hostnet0,vhost=on,vhostfd=23 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:fb:41:03,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -usb -device usb-tablet,id=input0 -vnc 127.0.0.1:3 -vga cirrus -device usb-host,hostbus=4,hostaddr=2,id=hostdev0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
char device redirected to /dev/pts/2
husb: open device 4.2
husb: grabbed usb device 4.2
husb: config #1 need 1
husb: 1 interfaces claimed for configuration 1
husb: config #1 need 1
husb: 1 interfaces claimed for configuration 1
qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.12.1.2/hw/usb.c:345: usb_packet_complete: Assertion `p->owner != ((void *)0)' failed.
2012-01-27 12:29:20.342: shutting down

Comment 6 bill 2012-01-27 03:12:49 UTC
Can someone let me know which rpm contains the usb-hub.c as I can't find it with yum provides */usb-hub.c to test out the Fedora16 patch.

Comment 7 Paul Bolle 2012-01-27 08:24:27 UTC
(In reply to comment #6)
> Can someone let me know which rpm contains the usb-hub.c as I can't find it
> with yum provides */usb-hub.c to test out the Fedora16 patch.

0) Source packages tend to ship their source trees in compressed tarfiles (eg, *.tar.bz2). I'm pretty sure yum can't look inside compressed files in packages to see what files are inside these compressed files.

1) Something like this might be what you're looking for:
    rpm -qf --queryformat "%{SOURCERPM}\n" $(which qemu-kvm)

Comment 8 bill 2012-01-27 12:16:23 UTC
0) Red Hat/SL/Centos tends to ship their source at rpms
1) Does not make sense to me. What is SOURCERPM?

Comment 9 Paul Bolle 2012-01-27 12:43:40 UTC
(In reply to comment #8)
> 0) Red Hat/SL/Centos tends to ship their source at rpms
 
Correct. And the actual source files are (generally) inside a tarball shipped in the source rpm:
$ rpm -qpl qemu-0.15.1-3.fc16.src.rpm 
0001-char-Split-out-tcp-socket-close-code-in-a-separate-f.patch
[...]
0028-usb-redir-Don-t-try-to-write-to-the-chardev-after-a-.patch
80-kvm.rules
99-qemu-guest-agent.rules
ksm.service
ksm.sysconfig
ksmctl.c
ksmtuned
ksmtuned.conf
ksmtuned.service
kvm.modules
pc-add-a-Fedora-13-machine-type-for-backward-compat.patch
qemu-Allow-to-leave-type-on-default-in-machine.patch
qemu-guest-agent.service
qemu-kvm-0.15.1.tar.gz
qemu.binfmt
qemu.spec
 
Here that tarball is named qemu-kvm-0.15.tar.gz

> 1) Does not make sense to me. What is SOURCERPM?

See man 8 rpm (esp. the stuff about "--queryformat").

By the way, a quick way to get a source rpm is:
    yumdownloader --source qemu

Comment 10 Dor Laor 2012-02-02 16:24:31 UTC
*** Bug 784918 has been marked as a duplicate of this bug. ***

Comment 11 Gerd Hoffmann 2012-02-06 08:43:21 UTC

*** This bug has been marked as a duplicate of bug 740707 ***

Comment 12 bill 2012-02-08 06:11:58 UTC
Well thanks a lot!!!
You've marked this as a duplicate of a bug that I can't look at.
So now I don't see how it is progressing!

Comment 13 bill 2012-02-08 06:13:57 UTC
My apologies. I now see that 740707 is now visible to me.

Comment 14 Jón Fairbairn 2012-02-08 10:19:58 UTC
Seems to be invisible to me, though.