Bug 1658441 - Get "core dump" when start a vm with both hostdev and usb disk
Summary: Get "core dump" when start a vm with both hostdev and usb disk
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: ---
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-12 06:14 UTC by gaojianan
Modified: 2019-02-22 22:09 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-15 10:57:50 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
gdb backtrace info (17.86 KB, text/plain)
2018-12-12 06:14 UTC, gaojianan
no flags Details

Description gaojianan 2018-12-12 06:14:44 UTC
Created attachment 1513608 [details]
gdb backtrace info

Description of problem:
As subject

Version-Release number of selected component (if applicable):
qemu-kvm-3.1.0-0.module+el8+2266+616cf026.next.candidate.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Start the vm with both hostdev and usb disk
(The hostdev and the usb disk are using the same usb disk)
VNC server running on ::1:5900
/tmp/usb: line 1: 11843 Segmentation fault      
(core dumped) /usr/libexec/qemu-kvm -name guest=spicedemo,debug-threads=on -machine pc-i440fx-rhel7.6.0,accel=kvm,usb=off,vmport=off,dump-guest-core=off -m 1024 -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2 -device nec-usb-xhci,p2=15,p3=15,id=usb1,bus=pci.0,addr=0xa -device piix3-usb-uhci,id=usb2,bus=pci.0,addr=0x1.0x2 -device usb-ccid,id=ccid0,bus=usb.0,port=5 -drive file=/dev/sdb,format=raw,if=none,id=drive-usb-disk6 -device usb-storage,bus=usb.0,port=1,drive=drive-usb-disk6,id=usb-disk6,removable=on -device usb-host,hostbus=2,hostaddr=24,id=hostdev0,bus=usb.0,port=2


2.
3.

Actual results:
As above

Expected results:
Can start the vm successfully

Additional info:

Comment 1 Gerd Hoffmann 2019-01-10 06:58:40 UTC
(In reply to gaojianan from comment #0)
> Created attachment 1513608 [details]
> gdb backtrace info

That log doesn't say which of the threads actually segfaults.
Please add that information.

> 1.Start the vm with both hostdev and usb disk
> (The hostdev and the usb disk are using the same usb disk)

That is a rather interesting way of testing block device hotplug (assigning the stick to the guest will unbind the host driver so /dev/sdb goes away).

Probably the bug isn't usb related and it is the scsi or block layer code being upset by /dev/sdb disappearing.

Comment 2 gaojianan 2019-01-15 08:38:34 UTC
(In reply to Gerd Hoffmann from comment #1)
> (In reply to gaojianan from comment #0)
> > Created attachment 1513608 [details]
> > gdb backtrace info
> 
> That log doesn't say which of the threads actually segfaults.
> Please add that information.
> 
> > 1.Start the vm with both hostdev and usb disk
> > (The hostdev and the usb disk are using the same usb disk)
> 
> That is a rather interesting way of testing block device hotplug (assigning
> the stick to the guest will unbind the host driver so /dev/sdb goes away).
> 
> Probably the bug isn't usb related and it is the scsi or block layer code
> being upset by /dev/sdb disappearing.

Sorry,i can't reproduce the bug by libvirt or qemu in the latest version.
libvirt-4.10.0-1.module+el8+2317+367e35b5.x86_64
qemu-kvm-3.1.0-2.module+el8+2606+2c716ad7.x86_64
So maybe i need to try more times or get same the problem from others.

Comment 3 Gerd Hoffmann 2019-01-15 10:57:50 UTC
Ok, closing the bug then.
In case this happens again: reopen the bug and complete the information please.


Note You need to log in before you can comment on or make changes to this bug.