RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 905851 - Fail to start guest which contains more than 51 usbs disk with multifunction
Summary: Fail to start guest which contains more than 51 usbs disk with multifunction
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.4
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: 2013-01-30 10:14 UTC by zhenfeng wang
Modified: 2013-11-21 06:32 UTC (History)
17 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.372.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-21 06:32:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The guest's xml with 52 usb disks (16.01 KB, text/plain)
2013-01-30 10:14 UTC, zhenfeng wang
no flags Details
The qemu's log about guest (8.65 KB, text/plain)
2013-01-30 10:24 UTC, zhenfeng wang
no flags Details
qemu-kvm-command-line and qtree/usb info. (88.58 KB, text/plain)
2013-01-31 05:27 UTC, Sibiao Luo
no flags Details
The guest's xml with 55 ehci usb disks (12.02 KB, text/plain)
2013-02-04 05:09 UTC, zhenfeng wang
no flags Details
the qemu-kvm 's info while start a guest with 55 ehci usb (4.14 KB, text/plain)
2013-02-04 06:05 UTC, zhenfeng wang
no flags Details
rhel6.4 guest xml (12.21 KB, text/plain)
2013-04-26 03:32 UTC, zhenfeng wang
no flags Details
qemu-kvm command line (6.93 KB, text/plain)
2013-07-01 15:13 UTC, FuXiangChun
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1553 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2013-11-20 21:40:29 UTC

Description zhenfeng wang 2013-01-30 10:14:20 UTC
Created attachment 690264 [details]
The guest's xml with 52 usb disks

Description of problem:
Fail to start  guest which contains more than 51 usbs disk with multifunction enable

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-0.12.1.2-2.352.el6.x86_64
kernel-2.6.32-355.el6.x86_64
libvirt-0.10.2-18.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1 Prepare the guest xml with 52 usb disks with multifunction 
2 Create disk images with

# mkdir /var/lib/libvirt/images/usb-img

# for i in {a..i}; do for j in {a..z}; do qemu-img create /var/lib/libvirt/images/usb-img/usb-$i-$j.img 10M; done; done
3 Define guest using the xml

#virsh define usb-all.xml

4.Dump xml of the guest,and the check usb number.

#virsh dumpxml usb
# virsh dumpxml usb|grep 'sd'|wc -l
52

5.Start guest

# virsh start usb
error: Failed to start domain usb
error: internal error process exited while connecting to monitor: qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.12.1.2/savevm.c:1295: vmstate_register: Assertion `!se->compat || se->instance_id == 0' failed.
  
Actual results:
Can't start the guest while the guest contains more than 51 usb disks,however, the guest start successfully while the guest contains less then 52 usb disks

Expected results:
The guest can start successfully with more than 51 usb disks with multifunction enable

Additional info:
It works well on qemu-kvm-0.12.1.2-2.335.el6.x86_64 before,However I'm not clear that why can I  reproduce this issue on that version in snapshot 4.

Comment 1 zhenfeng wang 2013-01-30 10:23:29 UTC
Hi juzhang
  I saw you report a bug 735018 which is similiar with mine ,can you help me confirm it whether it is a regression bug ?  thanks

Comment 2 zhenfeng wang 2013-01-30 10:24:16 UTC
Created attachment 690265 [details]
The qemu's log about guest

Comment 3 juzhang 2013-01-30 10:27:19 UTC
(In reply to comment #1)
> Hi juzhang
>   I saw you report a bug 735018 which is similiar with mine ,can you help me
> confirm it whether it is a regression bug ?  thanks

Hi, zhengfeng

Can you hit problem with multifunction disabled? If you can not hit this issue with multifunction disabled, I do not think it's same issue.

Best Regards & Thanks,
Junyi

Comment 5 FuXiangChun 2013-01-30 10:58:59 UTC
1.I tested by using qemu-kvm-0.12.1.2-2.335.el6.x86_64 and qemu-kvm-0.12.1.2-2.352.el6.x86_64. Both can hit this issue. So this bug is not regression

2. This issue happens with usb 1.1 controller(piix3-usb-uhci), usb-ehci don't hit this issue.

Comment 6 Sibiao Luo 2013-01-31 05:26:10 UTC
Hi all,

   I gave a quickly testing about this issue using the ich9-ehci-uhci.cfg ( http://git.engineering.redhat.com/?p=users/ehabkost/qemu-kvm-rhel6.git;a=blob;f=docs/ich9-ehci-uhci.cfg;hb=HEAD ) configure file, and it can boot up guest successfully without any problem, I think we should use this configure file for testing the usb-storage, as it's very hard to specify the using controller. 
Btw, in the guest only can discover 40 disk, the develp have gave a reason, but i forget it, could you help me indicate it ? 
I will attach the qemu-kvm command line later.

host info:
# uname -r && rpm -q qemu-kvm
2.6.32-356.el6.x86_64
qemu-kvm-0.12.1.2-2.355.el6.x86_64
guest info:
# uname -r
2.6.32-356.el6.x86_64

(qemu) info usb
  Device 0.2, Port 1, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.3, Port 2, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.4, Port 3, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.5, Port 4, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.6, Port 5, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.2, Port 6, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.3, Port 6.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.4, Port 6.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.5, Port 6.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.6, Port 6.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.7, Port 6.5, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.8, Port 6.6, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.9, Port 6.7, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.10, Port 6.8, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.11, Port 6.8.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.12, Port 6.8.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.13, Port 6.8.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.14, Port 6.8.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.15, Port 6.8.5, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.16, Port 6.8.6, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.17, Port 6.8.7, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.18, Port 6.8.8, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.19, Port 6.8.8.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.20, Port 6.8.8.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.21, Port 6.8.8.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.22, Port 6.8.8.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.23, Port 6.8.8.5, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.24, Port 6.8.8.6, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.25, Port 6.8.8.7, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.26, Port 6.8.8.8, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.27, Port 6.8.8.8.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.28, Port 6.8.8.8.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.29, Port 6.8.8.8.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.30, Port 6.8.8.8.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.31, Port 6.8.8.8.5, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.32, Port 6.8.8.8.6, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.33, Port 6.8.8.8.7, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.34, Port 6.8.8.8.8, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.35, Port 6.8.8.8.8.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.36, Port 6.8.8.8.8.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.37, Port 6.8.8.8.8.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.38, Port 6.8.8.8.8.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.39, Port 6.8.8.8.8.5, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.40, Port 6.8.8.8.8.6, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.41, Port 6.8.8.8.8.7, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.42, Port 6.8.8.8.8.8, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.42, Port 6.8.8.8.8.8.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.43, Port 6.8.8.8.8.8.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.44, Port 6.8.8.8.8.8.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.45, Port 6.8.8.8.8.8.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.46, Port 6.8.8.8.8.8.5, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.47, Port 6.8.8.8.8.8.6, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.48, Port 6.8.8.8.8.8.7, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.49, Port 6.8.8.8.8.8.8, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.50, Port 6.8.8.8.8.8.8.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.51, Port 6.8.8.8.8.8.8.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.52, Port 6.8.8.8.8.8.8.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.53, Port 6.8.8.8.8.8.8.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.54, Port 6.8.8.8.8.8.8.5, Speed 12 Mb/s, Product QEMU USB MSD
(qemu)

Best Regards.
sluo

Comment 7 Sibiao Luo 2013-01-31 05:27:25 UTC
Created attachment 690738 [details]
qemu-kvm-command-line and qtree/usb info.

Comment 8 zhenfeng wang 2013-02-04 05:07:25 UTC
I test this senario with the ehci ,when the usb disks number exceed 55, the guest can't start ether. and report the same eror

hostinfo
kernel-2.6.32-358.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.355.el6.x86_64
libvirt-0.10.2-18.el6.x86_64


start a guest with 55 usb disks in guest's xml
# virsh start usb
Domain usb started
qemu      7972 95.6  0.0 822164 17468 ?        Sl   00:01   0:16 /usr/libexec/qemu-kvm -name usb -S -M rhel6.2.0 -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -uuid 52b59a38-5265-7c32-468c-9ea4ee25c220 -nographic -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/usb.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x6 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,addr=0x7 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x8 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x9 -drive file=/var/lib/libvirt/images/kvm-rhel6.3-x86_64-qcow2.img,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive file=/var/lib/libvirt/images/usb-img/usb-a-a.img,if=none,id=drive-usb-disk26,format=raw -device usb-storage,drive=drive-usb-disk26,id=usb-disk26 -drive file=/var/lib/libvirt/images/usb-img/usb-a-b.img,if=none,id=drive-usb-disk27,format=raw -device usb-storage,drive=drive-usb-disk27,id=usb-disk27 -drive file=/var/lib/libvirt/images/usb-img/usb-a-c.img,if=none,id=drive-usb-disk28,format=raw -device usb-storage,drive=drive-usb-disk28,id=usb-disk28 -drive file=/var/lib/libvirt/images/usb-img/usb-a-d.img,if=none,id=drive-usb-disk29,format=raw -device usb-storage,drive=drive-usb-disk29,id=usb-disk29 -drive file=/var/lib/libvirt/images/usb-img/usb-a-e.img,if=none,id=drive-usb-disk30,format=raw -device usb-storage,drive=drive-usb-disk30,id=usb-disk30 -drive file=/var/lib/libvirt/images/usb-img/usb-a-f.img,--------
 


start a guest with 56 usb disks in guest's xml

# virsh start usb
error: Failed to start domain usb
error: internal error process exited while connecting to monitor: qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.12.1.2/savevm.c:1295: vmstate_register: Assertion `!se->compat || se->instance_id == 0' failed

Comment 9 zhenfeng wang 2013-02-04 05:09:26 UTC
Created attachment 692607 [details]
The guest's xml with 55 ehci usb disks

Comment 10 Suqin Huang 2013-02-04 05:19:17 UTC
(In reply to comment #6)
> Hi all,
> 
>    I gave a quickly testing about this issue using the ich9-ehci-uhci.cfg (
> http://git.engineering.redhat.com/?p=users/ehabkost/qemu-kvm-rhel6.git;
> a=blob;f=docs/ich9-ehci-uhci.cfg;hb=HEAD ) configure file, and it can boot
> up guest successfully without any problem, I think we should use this
> configure file for testing the usb-storage, as it's very hard to specify the
> using controller. 
> Btw, in the guest only can discover 40 disk, the develp have gave a reason,
> but i forget it, could you help me indicate it ? 
> I will attach the qemu-kvm command line later.
> 
> host info:
> # uname -r && rpm -q qemu-kvm
> 2.6.32-356.el6.x86_64
> qemu-kvm-0.12.1.2-2.355.el6.x86_64
> guest info:
> # uname -r
> 2.6.32-356.el6.x86_64
> 
> (qemu) info usb
>   Device 0.2, Port 1, Speed 480 Mb/s, Product QEMU USB MSD
>   Device 0.3, Port 2, Speed 480 Mb/s, Product QEMU USB MSD
>   Device 0.4, Port 3, Speed 480 Mb/s, Product QEMU USB MSD


you use Companion Controller, ehci, and uhci controller use the same usb bus. 
there are some diff between Companion controller and multifunction without companion controller.


I don't think we need to test so many usb devices, but libvirt need to provice a limition.

Thanks
Suqin

Comment 11 juzhang 2013-02-04 05:22:07 UTC
(In reply to comment #8)
> I test this senario with the ehci ,when the usb disks number exceed 55, the
> guest can't start ether. and report the same eror
> 
> hostinfo
> kernel-2.6.32-358.el6.x86_64
> qemu-kvm-rhev-0.12.1.2-2.355.el6.x86_64
> libvirt-0.10.2-18.el6.x86_64
> 
> 
> start a guest with 55 usb disks in guest's xml
> # virsh start usb
> Domain usb started
> qemu      7972 95.6  0.0 822164 17468 ?        Sl   00:01   0:16
> /usr/libexec/qemu-kvm -name usb -S -M rhel6.2.0 -enable-kvm -m 512 

1. Please replace -M rhel6.2.0 as -M rhel6.4.0 and have a try?

2. Can you use companion Controller like comment6 and have a try?

Best Regards,
Junyi

Comment 12 Suqin Huang 2013-02-04 05:48:03 UTC
(In reply to comment #8)
> I test this senario with the ehci ,when the usb disks number exceed 55, the
> guest can't start ether. and report the same eror
> 
> hostinfo
> kernel-2.6.32-358.el6.x86_64
> qemu-kvm-rhev-0.12.1.2-2.355.el6.x86_64
> libvirt-0.10.2-18.el6.x86_64
> 
> 
> start a guest with 55 usb disks in guest's xml
> # virsh start usb
> Domain usb started
> qemu      7972 95.6  0.0 822164 17468 ?        Sl   00:01   0:16
> /usr/libexec/qemu-kvm -name usb -S -M rhel6.2.0 -enable-kvm -m 512 -smp
> 1,sockets=1,cores=1,threads=1 -uuid 52b59a38-5265-7c32-468c-9ea4ee25c220
> -nographic -nodefconfig -nodefaults -chardev
> socket,id=charmonitor,path=/var/lib/libvirt/qemu/usb.monitor,server,nowait
> -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown
> -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x6 -device
> ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,addr=0x7 -device
> ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x8 -device
> ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x9 -drive


I'm confused for this cmd.

ich9-usb-ehci1, ich9-usb-uhci1, ich9-usb-uhci2, ich9-usb-uhci3 are using same usb bus usb.0, but they are in diff slots.

and I only find ich9-usb-ehci1, ich9-usb-uhci1, ich9-usb-uhci2, ich9-usb-uhci3 controllers in xml file, how can you add 54 devices to 6 usb ports

Comment 13 zhenfeng wang 2013-02-04 06:05:56 UTC
Created attachment 692624 [details]
the qemu-kvm 's info while start a guest with 55 ehci usb

Comment 14 Suqin Huang 2013-02-04 06:18:10 UTC
(In reply to comment #13)
> Created attachment 692624 [details]
> the qemu-kvm 's info while start a guest with 55 ehci usb

Can you give a summary:
1. how many slots did you use
2. how many functions every slot you use
3. hot many ports every function you use

cc libvirt developer and Gerd:
How many usb devices do we need to test, will libvirt provide a limition?
   
we can boot hunderds of usb devices, but as we know we no need to test all.

total: 29(slots) * 8 functions * 6 ports * 8 usb hub ports

Comment 15 Sibiao Luo 2013-02-04 10:47:07 UTC
(In reply to comment #6)
> Hi all,
> 
>    I gave a quickly testing about this issue using the ich9-ehci-uhci.cfg (
> http://git.engineering.redhat.com/?p=users/ehabkost/qemu-kvm-rhel6.git;
> a=blob;f=docs/ich9-ehci-uhci.cfg;hb=HEAD ) configure file, and it can boot
> up guest successfully without any problem, I think we should use this
> configure file for testing the usb-storage, as it's very hard to specify the
> using controller. 
> Btw, in the guest only can discover 40 disk, the develp have gave a reason,
> but i forget it, could you help me indicate it ? 
> I will attach the qemu-kvm command line later.
> 
Hi all, 

   it can boot guest with 55 usb-storage using the companion controller (ich9-ehci-uhci.cfg) successfully, but the qemu will core dump when add more than 56 usb-storage using the companion controller. 

# uname -r && rpm -q qemu-kvm
2.6.32-356.el6.x86_64
qemu-kvm-0.12.1.2-2.355.el6.x86_64
guest info:
# uname -r
2.6.32-356.el6.x86_64

qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.12.1.2/savevm.c:1295: vmstate_register: Assertion `!se->compat || se->instance_id == 0' failed.
script.sh: line 1:  4618 Aborted                 (core dumped)

(gdb) bt
#0  0x00007f07d37708a5 in raise () from /lib64/libc.so.6
#1  0x00007f07d3772085 in abort () from /lib64/libc.so.6
#2  0x00007f07d3769a1e in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007f07d3769ae0 in __assert_fail () from /lib64/libc.so.6
#4  0x00007f07d5e93827 in vmstate_register (dev=<value optimized out>, instance_id=<value optimized out>, vmsd=<value optimized out>, opaque=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/savevm.c:1295
#5  0x00007f07d5e95f11 in qdev_init (dev=0x7f07daa25e10) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/qdev.c:294
#6  0x00007f07d5e8664d in scsi_bus_legacy_add_drive (bus=<value optimized out>, bdrv=0x7f07dd39be30, unit=0, removable=false, bootindex=-1)
    at /usr/src/debug/qemu-kvm-0.12.1.2/hw/scsi-bus.c:207
#7  0x00007f07d5e841db in usb_msd_initfn (dev=0x7f07ddfe9560) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/usb-msd.c:588
#8  0x00007f07d5e82ac2 in usb_qdev_init (qdev=0x7f07ddfe9560, base=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/usb-bus.c:96
#9  0x00007f07d5e95ed8 in qdev_init (dev=0x7f07ddfe9560) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/qdev.c:284
#10 0x00007f07d5e962ef in qdev_device_add (opts=0x7f07d8708540) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/qdev.c:259
#11 0x00007f07d5e0b059 in device_init_func (opts=<value optimized out>, opaque=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4706
#12 0x00007f07d5e421ba in qemu_opts_foreach (list=<value optimized out>, func=0x7f07d5e0b050 <device_init_func>, opaque=0x0, abort_on_failure=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/qemu-option.c:1004
#13 0x00007f07d5e0f56c in main (argc=262, argv=<value optimized out>, envp=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:6331
(gdb) bt full
#0  0x00007f07d37708a5 in raise () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007f07d3772085 in abort () from /lib64/libc.so.6
No symbol table info available.
#2  0x00007f07d3769a1e in __assert_fail_base () from /lib64/libc.so.6
No symbol table info available.
#3  0x00007f07d3769ae0 in __assert_fail () from /lib64/libc.so.6
No symbol table info available.
#4  0x00007f07d5e93827 in vmstate_register (dev=<value optimized out>, instance_id=<value optimized out>, vmsd=<value optimized out>, opaque=<value optimized out>)
    at /usr/src/debug/qemu-kvm-0.12.1.2/savevm.c:1295
        se = 0x7f07daa36010
        __PRETTY_FUNCTION__ = "vmstate_register"
#5  0x00007f07d5e95f11 in qdev_init (dev=0x7f07daa25e10) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/qdev.c:294
        rc = <value optimized out>
        __PRETTY_FUNCTION__ = "qdev_init"
#6  0x00007f07d5e8664d in scsi_bus_legacy_add_drive (bus=<value optimized out>, bdrv=0x7f07dd39be30, unit=0, removable=false, bootindex=-1)
    at /usr/src/debug/qemu-kvm-0.12.1.2/hw/scsi-bus.c:207
        driver = <value optimized out>
        dev = 0x7f07daa25e10
#7  0x00007f07d5e841db in usb_msd_initfn (dev=0x7f07ddfe9560) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/usb-msd.c:588
        s = 0x7f07ddfe9560
        bs = 0x7f07dd39be30
        dinfo = <value optimized out>
#8  0x00007f07d5e82ac2 in usb_qdev_init (qdev=0x7f07ddfe9560, base=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/usb-bus.c:96
        dev = 0x7f07ddfe9560
        info = <value optimized out>
        rc = 0
#9  0x00007f07d5e95ed8 in qdev_init (dev=0x7f07ddfe9560) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/qdev.c:284
        rc = <value optimized out>
        __PRETTY_FUNCTION__ = "qdev_init"
#10 0x00007f07d5e962ef in qdev_device_add (opts=0x7f07d8708540) at /usr/src/debug/qemu-kvm-0.12.1.2/hw/qdev.c:259
        driver = 0x7f07d8708610 "usb-storage"
        path = 0x0
        id = <value optimized out>
        info = 0x7f07d6301360
        qdev = 0x7f07ddfe9560
        bus = <value optimized out>
        __func__ = "qdev_device_add"
#11 0x00007f07d5e0b059 in device_init_func (opts=<value optimized out>, opaque=<value optimized out>) at /usr/src/debug/qemu-kvm-0.12.1.2/vl.c:4706
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) q

Best Regards.
sluo

Comment 17 Gerd Hoffmann 2013-04-02 11:50:32 UTC
> 
> 1. Please replace -M rhel6.2.0 as -M rhel6.4.0 and have a try?
> 

Should make this go away, please verify.

It is a bug in older rhel versions, and for live migration compatibility reasons we must carry it forward with -M $old.

Comment 18 Sibiao Luo 2013-04-26 02:14:19 UTC
Hi, kraxel,

  Does the comment #15 is the same issue, I think the qemu core dump is a different issue when add more than 56 usb-storage using the companion controller. Should we need to open a new bug to tracing it? BTW, i also met it in rhel7(bug 956598).

Best Regards.
sluo

Comment 19 zhenfeng wang 2013-04-26 03:30:35 UTC
Hi, Gerd,
 Sorry to reply you so late,I didn't notice this needinfo previous. I just try it with  -M rhel6.4.0, and i can still hit the issue, Also  i met it in rhel7

For rhel6.4
pkginfo
kernel-2.6.32-358.2.1.el6.x86_64
libvirt-0.10.2-18.el6_4.4.x86_64
kernel-2.6.32-358.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.355.el6_4.2.x86_64

steps

# virsh start rhel6usb
error: Failed to start domain rhel6usb
error: internal error process exited while connecting to monitor: qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.12.1.2/savevm.c:1295: vmstate_register: Assertion `!se->compat || se->instance_id == 0' failed

The guest's xml ,you can see the rhel6.4usb.xml

For rhel7.0
pkginfo
kernel-3.7.0-0.36.el7.x86_64
qemu-kvm-1.3.0-6.el7.x86_64
libvirt-1.0.2-1.el7.x86_64
steps
#virsh start rhel7usb
error: Failed to start domain rhel7usb
error: internal error process exited while connecting to monitor: qemu-kvm: /builddir/build/BUILD/qemu-1.3.0/savevm.c:1397: vmstate_register_with_alias_id: Assertion `!se->compat || se->instance_id == 0' failed.
2013-04-26 03:10:33.045+0000: shutting down

The guest's xml, you can see the rhel7usb.xml

Comment 20 zhenfeng wang 2013-04-26 03:32:10 UTC
Created attachment 740188 [details]
rhel6.4 guest xml

Comment 21 Sibiao Luo 2013-04-26 04:44:46 UTC
(In reply to comment #18)
> Hi, kraxel,
> 
>   Does the comment #15 is the same issue, I think the qemu core dump is a
> different issue when add more than 56 usb-storage using the companion
> controller. Should we need to open a new bug to tracing it? BTW, i also met
> it in rhel7(bug 956598).
> 
ignore this comment, it's the same.
btw, it was existing in the rhel7 bug 956598.

Comment 22 Gerd Hoffmann 2013-05-13 15:22:15 UTC
patches posted.

Comment 29 FuXiangChun 2013-07-01 15:10:20 UTC
reproduce this bug with qemu-kvm-0.12.1.2-2.356.el6.x86_64

#sh cli-690265 
qemu-kvm: /builddir/build/BUILD/qemu-kvm-0.12.1.2/savevm.c:1295: vmstate_register: Assertion `!se->compat || se->instance_id == 0' failed

verify this bug with qemu-kvm-0.12.1.2-2.376.el6.x86_64

# sh cli-690265 
qemu-kvm: -device usb-storage,drive=drive-usb-disk214,id=usb-disk214: usb hub chain too deep
qemu-kvm: -device usb-storage,drive=drive-usb-disk214,id=usb-disk214: Failed to initialize USB device 'usb-hub'

qemu-kvm: -device usb-storage,drive=drive-usb-disk215,id=usb-disk215: Error: tried to attach usb device QEMU USB MSD to a bus with no free ports

qemu-kvm: -device usb-storage,drive=drive-usb-disk215,id=usb-disk215: Device 'usb-storage' could not be initialized


Base on this result above.  I think this bug is fixed.

Comment 30 FuXiangChun 2013-07-01 15:13:53 UTC
Created attachment 767433 [details]
qemu-kvm command line

Comment 31 FuXiangChun 2013-07-01 15:16:38 UTC
command line script name is cli-905851, I have attached to attachment.

Comment 33 errata-xmlrpc 2013-11-21 06:32:43 UTC
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.

http://rhn.redhat.com/errata/RHSA-2013-1553.html


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