Re: [Qemu-devel] qemu assertion failed with usb on current git master!
On February 27, 2012 at 5:53 PM Erik Rull erik.r...@rdsoftware.de wrote: Gerd Hoffmann wrote: Hi, I'm really sorry, but I don't understand what's happening - I copied the qemu executable on my target system before executing it, but gdb complains that the core file does not match the executable! But except the file paths they are identical. warning: core file may not match specified executable file. Core was generated by `/disc/qemu-system-x86_64 -machine kernel_irqchip=on -serial /dev/ttyS2 -usb -de'. Program terminated with signal 6, Aborted. #0 0xe424 in __kernel_vsyscall () Strange. The backtrace is bogus too. I don't know how to proceed here. Lets try plan b: add a printf right before the assert: --- a/hw/usb.c +++ b/hw/usb.c @@ -356,6 +356,7 @@ void usb_packet_complete(USBDevice *dev, USBPacket *p) while (!QTAILQ_EMPTY(ep-queue)) { p = QTAILQ_FIRST(ep-queue); +fprintf(stderr, %s: packet %p\n, __func__, p); assert(p-state == USB_PACKET_QUEUED); ret = usb_process_one(p); if (ret == USB_RET_ASYNC) { Don't you run into this problem (crash on USB plug in) on your system? I tested it with a Linux guest, there it does not crash! Only with a Windows XP guest! I test with Linux most of the time, but even with windows xp guest it doesn't reproduce here. cheers, Gerd That's a good idea - will test that tomorrow and send the new result file. Have you ever tested a USB CD or DVD drive attached to your guests? I have issues with Windows XP (I get everything running and detected beside the drive letter in Windows Explorer) but it works fine for Linux. Best regards, Erik Find attached the usb.txt = I gzip'ed it to reduce the transfer size. I added the p-state to the fprintf, maybe this helps. fprintf(stderr, %s: packet: %p %d\n, __func__, p,p?p-state:-1); Best regards, Erik usb.txt.gz Description: GNU Zip compressed data
Re: [Qemu-devel] qemu assertion failed with usb on current git master!
qemu-system-x86_64: /home/erik/qemu/hw/usb.c:358 usb_packet_complete: Assertion 'p-state == USB_PACKET_QUEUED' failed. Stacktrace? What kind of device? Hi Gerd, attached the usb logger dump as requested. Stacktrace - I tried that without real success using the gdbserver - I had issues with the symbol resolving, no idea what went wrong... You don't need gdbserver, that one is for debugging the guest, not for debugging qemu. Just use gdb on the qemu core dump. And please also print p (packet pointer) which fails the assertion, so we can match it with the packet pointers printed in the log. thanks, Gerd
Re: [Qemu-devel] qemu assertion failed with usb on current git master!
On February 27, 2012 at 1:48 PM Gerd Hoffmann kra...@redhat.com wrote: qemu-system-x86_64: /home/erik/qemu/hw/usb.c:358 usb_packet_complete: Assertion 'p-state == USB_PACKET_QUEUED' failed. Stacktrace? What kind of device? Hi Gerd, attached the usb logger dump as requested. Stacktrace - I tried that without real success using the gdbserver - I had issues with the symbol resolving, no idea what went wrong... You don't need gdbserver, that one is for debugging the guest, not for debugging qemu. Just use gdb on the qemu core dump. And please also print p (packet pointer) which fails the assertion, so we can match it with the packet pointers printed in the log. thanks, Gerd I'm really sorry, but I don't understand what's happening - I copied the qemu executable on my target system before executing it, but gdb complains that the core file does not match the executable! But except the file paths they are identical. Here the gdb output: warning: core file may not match specified executable file. Core was generated by `/disc/qemu-system-x86_64 -machine kernel_irqchip=on -serial /dev/ttyS2 -usb -de'. Program terminated with signal 6, Aborted. #0 0xe424 in __kernel_vsyscall () (gdb) bt #0 0xe424 in __kernel_vsyscall () #1 0xb705f671 in ?? () #2 0xb714bff4 in ?? () #3 0xb6faf6b0 in ?? () #4 0xbfe8b514 in ?? () #5 0xb7060cf9 in ?? () #6 0x0006 in ?? () #7 0xbfe8b488 in ?? () #8 0x in ?? () (gdb) p The history is empty. (gdb) I don't know how to proceed here. Don't you run into this problem (crash on USB plug in) on your system? I tested it with a Linux guest, there it does not crash! Only with a Windows XP guest! Best regards, Erik
Re: [Qemu-devel] qemu assertion failed with usb on current git master!
Hi, I'm really sorry, but I don't understand what's happening - I copied the qemu executable on my target system before executing it, but gdb complains that the core file does not match the executable! But except the file paths they are identical. warning: core file may not match specified executable file. Core was generated by `/disc/qemu-system-x86_64 -machine kernel_irqchip=on -serial /dev/ttyS2 -usb -de'. Program terminated with signal 6, Aborted. #0 0xe424 in __kernel_vsyscall () Strange. The backtrace is bogus too. I don't know how to proceed here. Lets try plan b: add a printf right before the assert: --- a/hw/usb.c +++ b/hw/usb.c @@ -356,6 +356,7 @@ void usb_packet_complete(USBDevice *dev, USBPacket *p) while (!QTAILQ_EMPTY(ep-queue)) { p = QTAILQ_FIRST(ep-queue); +fprintf(stderr, %s: packet %p\n, __func__, p); assert(p-state == USB_PACKET_QUEUED); ret = usb_process_one(p); if (ret == USB_RET_ASYNC) { Don't you run into this problem (crash on USB plug in) on your system? I tested it with a Linux guest, there it does not crash! Only with a Windows XP guest! I test with Linux most of the time, but even with windows xp guest it doesn't reproduce here. cheers, Gerd
Re: [Qemu-devel] qemu assertion failed with usb on current git master!
Gerd Hoffmann wrote: Hi, I'm really sorry, but I don't understand what's happening - I copied the qemu executable on my target system before executing it, but gdb complains that the core file does not match the executable! But except the file paths they are identical. warning: core file may not match specified executable file. Core was generated by `/disc/qemu-system-x86_64 -machine kernel_irqchip=on -serial /dev/ttyS2 -usb -de'. Program terminated with signal 6, Aborted. #0 0xe424 in __kernel_vsyscall () Strange. The backtrace is bogus too. I don't know how to proceed here. Lets try plan b: add a printf right before the assert: --- a/hw/usb.c +++ b/hw/usb.c @@ -356,6 +356,7 @@ void usb_packet_complete(USBDevice *dev, USBPacket *p) while (!QTAILQ_EMPTY(ep-queue)) { p = QTAILQ_FIRST(ep-queue); +fprintf(stderr, %s: packet %p\n, __func__, p); assert(p-state == USB_PACKET_QUEUED); ret = usb_process_one(p); if (ret == USB_RET_ASYNC) { Don't you run into this problem (crash on USB plug in) on your system? I tested it with a Linux guest, there it does not crash! Only with a Windows XP guest! I test with Linux most of the time, but even with windows xp guest it doesn't reproduce here. cheers, Gerd That's a good idea - will test that tomorrow and send the new result file. Have you ever tested a USB CD or DVD drive attached to your guests? I have issues with Windows XP (I get everything running and detected beside the drive letter in Windows Explorer) but it works fine for Linux. Best regards, Erik
[Qemu-devel] qemu assertion failed with usb on current git master!
When running qemu with -device usb-host an assertion failed caused by attaching a new usb device to the host that gets routed to the guest. The assertion that fails is: qemu-system-x86_64: /home/erik/qemu/hw/usb.c:358 usb_packet_complete: Assertion 'p-state == USB_PACKET_QUEUED' failed. It was working with the master ~1-2 weeks ago. Best regards, Erik
Re: [Qemu-devel] qemu assertion failed with usb on current git master!
On 02/23/12 12:38, Erik Rull wrote: When running qemu with -device usb-host an assertion failed caused by attaching a new usb device to the host that gets routed to the guest. The assertion that fails is: qemu-system-x86_64: /home/erik/qemu/hw/usb.c:358 usb_packet_complete: Assertion 'p-state == USB_PACKET_QUEUED' failed. Stacktrace? What kind of device? Can you enable the debug logging code in usb_packet_set_state() and send a log? thanks, Gerd
Re: [Qemu-devel] qemu assertion failed with usb on current git master!
Gerd Hoffmann wrote: On 02/23/12 12:38, Erik Rull wrote: When running qemu with -device usb-host an assertion failed caused by attaching a new usb device to the host that gets routed to the guest. The assertion that fails is: qemu-system-x86_64: /home/erik/qemu/hw/usb.c:358 usb_packet_complete: Assertion 'p-state == USB_PACKET_QUEUED' failed. Stacktrace? What kind of device? Can you enable the debug logging code in usb_packet_set_state() and send a log? thanks, Gerd I don't have gdb installed on my target system. May take some time until I have the backtrace, maybe remote debugging will work. I just plugged in a USB key with 8 Gig, but happens with another USB key with 2 Gig from another manufacturer as well. Both are USB 2.0 devices. Best regards, Erik