Bug 1381630
Summary: | QEMU segfaults when using a lot of pci bridges and USB devices | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Thomas Huth <thuth> |
Component: | qemu-kvm-rhev | Assignee: | Gerd Hoffmann <kraxel> |
Status: | CLOSED ERRATA | QA Contact: | Xujun Ma <xuma> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.3 | CC: | chayang, jinzhao, juzhang, kraxel, mdeng, michen, mrezanin, qzhang, thuth, virt-maint, xuma, yduan |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | qemu-2.8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-08-01 23:37:14 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Thomas Huth
2016-10-04 15:24:44 UTC
The problem also occurs with the latest upstream QEMU master (commit bbc4c3f4f3c624e2de64fdcb79f4dd8c1a508e9d) > Steps to Reproduce:
> Start QEMU in a shell like this:
> /usr/libexec/qemu-kvm -nographic -m 1G \
> -device pci-bridge,chassis_nr=31,id=pci0 \
> `y=0; for ((x=1;x<20;x++)) ; do \
> echo " -device pci-bridge,chassis_nr=$x,id=pci$x,bus=pci$y,addr=$x" \
> ; y=$x ; done ` \
> -device usb-ehci,id=controller0,bus=pci19,addr=1 \
> `for ((x=0;x<29;x++)); do echo -n " -device usb-mouse" ; done` \
> -device usb-tablet,id=usbtablet,bus=controller0.0
That command line is incomplete. You can't plug more than 6 devices into ehci (without companions) as ehci is usb2 and the usb-hub is usb1. Any chance you have a '-usb' somewhere so all the usb mice end up on the default uhci controller?
The command line is complete. QEMU seems to crash here before it reaches the sanity check with the free USB ports - if I decrease the number of pci-bridges, I can finally see the "-device usb-mouse: tried to attach usb device QEMU USB Mouse to a bus with no free ports" error message instead. Anyway, I can also replace the "usb-ehci" with "piix3-usb-uhci" in the above example, and I get a segfault with that, too. Patch has been merged into upstream master branch: http://git.qemu.org/?p=qemu.git;a=commitdiff;h=0136464d10f1fd9393a8 Reproduced the bug on the following build qemu-kvm-rhev-2.6.0-27.el7.x86_64 Steps, 1.boot up a guest with the following cli /usr/libexec/qemu-kvm -nographic -m 1G \ -device pci-bridge,chassis_nr=31,id=pci0 \ `y=0; for ((x=1;x<20;x++)) ; do \ echo " -device pci-bridge,chassis_nr=$x,id=pci$x,bus=pci$y,addr=$x" \ ; y=$x ; done ` \ -device usb-ehci,id=controller0,bus=pci19,addr=1 \ `for ((x=0;x<29;x++)); do echo -n " -device usb-mouse" ; done` \ -device usb-tablet,id=usbtablet,bus=controller0.0 Actual results, The qemu-kvm got coredump Expected results, There should be a message for sanity tests of free ports "-device usb-mouse: tried to attach usb device QEMU USB Mouse to a bus with no free ports" Verified bug on the following builds qemu-kvm-rhev-2.9.0-3.el7.x86_64 kernel-3.10.0-664.el7.x86_64 Steps, boot up a guest with the following cli /usr/libexec/qemu-kvm -nographic -m 1G \ -device pci-bridge,chassis_nr=31,id=pci0 \ `y=0; for ((x=1;x<20;x++)) ; do \ echo " -device pci-bridge,chassis_nr=$x,id=pci$x,bus=pci$y,addr=$x" \ ; y=$x ; done ` \ -device usb-ehci,id=controller0,bus=pci19,addr=1 \ `for ((x=0;x<29;x++)); do echo -n " -device usb-mouse" ; done` \ -device usb-tablet,id=usbtablet,bus=controller0.0 Actual results, There was not any coredump but an message was like "qemu-kvm: -device usb-mouse: tried to attach usb device QEMU USB Mouse to a bus with no free ports" Expected results, There should be a message for sanity tests of free ports "-device usb-mouse: tried to attach usb device QEMU USB Mouse to a bus with no free ports" In a summary,the original issue has been fixed already,so move it to verified Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2392 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2392 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2392 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2392 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2392 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:2392 |