Bug 1715801
| Summary: | qemu-kvn get SIGABRT when live attach and detach usbredir device | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Han Han <hhan> | ||||
| Component: | qemu-kvm | Assignee: | Gerd Hoffmann <kraxel> | ||||
| qemu-kvm sub component: | USB | QA Contact: | yduan | ||||
| Status: | CLOSED CURRENTRELEASE | Docs Contact: | |||||
| Severity: | medium | ||||||
| Priority: | medium | CC: | coli, dyuan, jil, jinzhao, juzhang, philmd, rbalakri, virt-maint, xuzhang | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | rc | ||||||
| Target Release: | 8.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2020-06-22 19:30:29 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: | |||||||
| Attachments: |
|
||||||
Covered by automation case usb_device.redirdev.tcp(https://github.com/autotest/tp-libvirt/pull/2175) Probably ehci_find_device() in ehci_state_fetchqh() fails (i.e. returns NULL). https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=23038991 http://brew-task-repos.usersys.redhat.com/repos/scratch/ghoffman/qemu-kvm/2.12.0/83.el8.bz1684383.3/ please test Oops, wrong repo link. Use this: http://brew-task-repos.usersys.redhat.com/repos/scratch/ghoffman/qemu-kvm/2.12.0/83.el8.bz1715801.1/ Unfortunately, I cannot reproduce this bug as comment0 with the same libvirt and qemu-kvm version. And also not reproducible with libvirt-5.3.0-1.module+el8.1.0+3225+a8268fde.x86_64 and the qemu-kvm in comment4. (In reply to Han Han from comment #5) > Unfortunately, I cannot reproduce this bug as comment0 with the same libvirt > and qemu-kvm version. And also not reproducible with > libvirt-5.3.0-1.module+el8.1.0+3225+a8268fde.x86_64 and the qemu-kvm in > comment4. Hi hanhan: I just want to double check. which usb controller is used by default in libvirt on RHEL8 ? Is it qemu-xhci ? Thanks (In reply to Michael from comment #6) > (In reply to Han Han from comment #5) > > Unfortunately, I cannot reproduce this bug as comment0 with the same libvirt > > and qemu-kvm version. And also not reproducible with > > libvirt-5.3.0-1.module+el8.1.0+3225+a8268fde.x86_64 and the qemu-kvm in > > comment4. > > Hi hanhan: > > I just want to double check. which usb controller is used by default in > libvirt on RHEL8 ? Is it qemu-xhci ? What is the exact meanings of `default` in your words? I think there may be 3 different meanings: 1. Define & Start a VM without any usb controllers or usb devices, which usb controller will be defaultly filled by libvirt? 2. Define & Start a VM with a usb controller, but its model is not set, which usb controller model will be filled by libvirt? 3. Define & Start a VM with a usb device, without any usb controller, which usb controller will be defaultly filled by libvirt? For the Q1, the logic of default usb is defined by function qemuDomainDefAddDefaultDevices as following: i. For machine type q35, check qemu-xhci, nec-xhci, echi-ich9 by order, if any model is found supported for the first time, then use it as the default usb controller model. ii. For machine type pc, the default usb controller will be set to piix3-uchi in function qemuDomainControllerDefPostParse. For Q2, the same as Q1-ii, set to piix3-uchi For Q3, the same as Q1. > > > Thanks All in all, for libvirt & qemu in rhel8: 1. if usb controller is set but model not set, model will be set to piix3-uchi 2. if usb controller is not set i. for q35 machine, set to qemu-xhci ii. for pc machine, set to piix3-uchi (In reply to Han Han from comment #8) > All in all, for libvirt & qemu in rhel8: > 1. if usb controller is set but model not set, model will be set to > piix3-uchi > 2. if usb controller is not set > i. for q35 machine, set to qemu-xhci > ii. for pc machine, set to piix3-uchi Thank you. The information is really helpful. Now I am clear about RHEL8. If there is no controller set and define & start a VM with a usb device, like the Q3, what is the default controller for RHEL7. Thank you for your time. (In reply to Michael from comment #9) > (In reply to Han Han from comment #8) > > All in all, for libvirt & qemu in rhel8: > > 1. if usb controller is set but model not set, model will be set to > > piix3-uchi > > 2. if usb controller is not set > > i. for q35 machine, set to qemu-xhci > > ii. for pc machine, set to piix3-uchi > > Thank you. The information is really helpful. > > Now I am clear about RHEL8. If there is no controller set and define & start > a VM with a usb device, like the Q3, what is the default controller for > RHEL7. For libvirt-4.5.0-23 of RHEL7, it is same to RHEL8. No significant changes. > > > Thank you for your time. QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks (In reply to Han Han from comment #5) > Unfortunately, I cannot reproduce this bug as comment0 with the same libvirt > and qemu-kvm version. And also not reproducible with > libvirt-5.3.0-1.module+el8.1.0+3225+a8268fde.x86_64 and the qemu-kvm in > comment4. Hmm, so what is the status here? Doesn't reproduce any more? In case it does still reproduce: Does it also happen with AV (qemu-kvm-4.2.0)? (In reply to Gerd Hoffmann from comment #12) > (In reply to Han Han from comment #5) > > Unfortunately, I cannot reproduce this bug as comment0 with the same libvirt > > and qemu-kvm version. And also not reproducible with > > libvirt-5.3.0-1.module+el8.1.0+3225+a8268fde.x86_64 and the qemu-kvm in > > comment4. > > Hmm, so what is the status here? Doesn't reproduce any more? > In case it does still reproduce: Does it also happen with AV > (qemu-kvm-4.2.0)? I cannot reproduce that on libvirt-6.0.0-16.module+el8.2.0+6139+d66dece5.x86_64 qemu-kvm-4.2.0-17.module+el8.2.0+6141+0f540f16.x86_64 usbredir-0.8.0-1.el8.x86_64 when attach/detach usbredir to ich9-ehci1 and qemu-xhci buses |
Created attachment 1575642 [details] all threads backtrace Description of problem: As subject Version-Release number of selected component (if applicable): usbredir-server-0.8.0-1.el8.x86_64 qemu-kvm-4.0.0-3.module+el8.1.0+3265+26c4ed71.x86_64 libvirt-5.3.0-1.module+el8.1.0+3225+a8268fde.x86_64 How reproducible: 80% Steps to Reproduce: 1. Prepare a usb device on host and setup a usbredir server: # lsusb Bus 002 Device 005: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive # usbredirserver -p 6000 090c:1000 2. Start a Vm with libvirt 3. Attach and detach following usb redir device: # cat /tmp/usbredir.xml <redirdev bus="usb" type="tcp"> <source host="localhost" mode="connect" service="6000" tls="no" /> <protocol type="raw" /> <alias name="ua-redir0e13ad0d8-d98e-4811-b3d7-814af4d9bf9d" /> <address bus="0" port="2" type="usb" /> </redirdev> # while true;do shuf -n 1 -e 1 2 3;virsh attach-device pc /tmp/usbredir.xml; shuf -n 1 -e 1 2 3;virsh detach-device pc /tmp/usbredir.xml;done Stop it when get this error: virsh detach-device pc /var/tmp/xml_utils_temp_4zv0ipkq.xml error: Failed to detach device from /tmp/usbredir.xml error: Unable to read from monitor: Connection reset by peer Then find the SIGABRT: id a4b31dc3cb8e32d338b8325586ec05cf47a33df0 reason: _nl_load_domain.cold.0(): qemu-kvm killed by SIGABRT time: Wed 29 May 2019 06:28:04 PM CST cmdline: /usr/libexec/qemu-kvm -name guest=avocado-vt-vm1,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-avocado-vt-vm1/master-key.aes -machine pc-q35-rhel8.0.0,accel=kvm,usb=off,dump-guest-core=off -cpu Opteron_G3,vme=on,x2apic=on,tsc-deadline=on,hypervisor=on,arat=on,mmxext=on,fxsr_opt=on,pdpe1gb=on,3dnowext=on,3dnow=on,cmp_legacy=on,cr8legacy=on,3dnowprefetch=on,osvw=on,monitor=off,rdtscp=off,svm=off -m 1024 -overcommit mem-lock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 82210bbf-3c3c-44e4-9ef6-3cbef3a46e68 -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=30,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on -device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,addr=0x1 -device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 -device pci-bridge,chassis_nr=3,id=pci.3,bus=pci.2,addr=0x1 -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x1d.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pcie.0,addr=0x7 -drive file=/var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2,format=qcow2,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,scsi=off,bus=pcie.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=32,id=hostnet0,vhost=on,vhostfd=33 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:09:a1:cc,bus=pcie.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,fd=34,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -chardev socket,id=charchannel1,fd=35,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc 127.0.0.1:0 -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x2 -chardev socket,id=charua-redir055e772a0-b5b9-4452-8133-9f3476f0d137,host=localhost,port=6000 -device usb-redir,chardev=charua-redir055e772a0-b5b9-4452-8133-9f3476f0d137,id=ua-redir055e772a0-b5b9-4452-8133-9f3476f0d137,bus=usb.0,port=2 -device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x6 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on package: 15:qemu-kvm-core-4.0.0-3.module+el8.1.0+3265+26c4ed71 uid: 107 (qemu) count: 10 Directory: /var/spool/abrt/ccpp-2019-05-29-18:28:04-22658 Run 'abrt-cli report /var/spool/abrt/ccpp-2019-05-29-18:28:04-22658' for creating a case in Red Hat Customer Portal Actual results: As above Expected results: No SIGABRT Additional info: No reproduced on rhel7.7: usbredir-server-0.7.1-3.el7.x86_64 libvirt-4.5.0-18.virtcov.el7.x86_64 qemu-kvm-rhev-2.12.0-30.el7.x86_64