Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 956608

Summary: Fail to detect all the disks in guest when boot VM with more then 40 usb-storage disks
Product: Red Hat Enterprise Linux 7 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, chayang, hhuang, juzhang, kraxel, michen, mrezanin, qzhang, rhod, shuang, sluo, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-1.5.0-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:16:16 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:
Description Flags
guest dmesg log.
none
the qtree info and qemu-kvm command line. none

Description Sibiao Luo 2013-04-25 10:05:40 UTC
Description of problem:
boot guest with more than 40 usb-storage disks using the companion controller (ich9-ehci-uhci.cfg), but guest only can detect 40 usb-storage disks.
BTW, it maybe the same issue to bug 905851 in rhel6.

Version-Release number of selected component (if applicable):
host info:
kernel-3.9.0-0.rc7.53.el7.x86_64
qemu-kvm-1.4.0-2.1.el7.x86_64
seabios-1.7.2-0.2.gita810e4e7.el7.x86_64
guest info:
kernel-3.9.0-0.rc7.53.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with 41~55 usb-storage disks using the companion controller (ich9-ehci-uhci.cfg)
2.check the usb info via HMP monitor and guest.
(qemu) info usb
(qemu) info qtree
guest]# ls -l /dev/sd* 
guest]# ls -l /dev/sd* | wc -l
  
Actual results:
after guest boot up, only can detect 40 disks in guest. I will attach the qemu-kvm command line and the guest kernel logs later.
# ls -l /dev/sd*
brw-rw----. 1 root disk  8,   0 Apr 25 17:52 /dev/sda
brw-rw----. 1 root disk 65, 160 Apr 25 17:52 /dev/sdaa
brw-rw----. 1 root disk 65, 176 Apr 25 17:52 /dev/sdab
brw-rw----. 1 root disk 65, 192 Apr 25 17:52 /dev/sdac
brw-rw----. 1 root disk 65, 208 Apr 25 17:52 /dev/sdad
brw-rw----. 1 root disk 65, 224 Apr 25 17:52 /dev/sdae
brw-rw----. 1 root disk 65, 240 Apr 25 17:52 /dev/sdaf
brw-rw----. 1 root disk 66,   0 Apr 25 17:52 /dev/sdag
brw-rw----. 1 root disk 66,  16 Apr 25 17:52 /dev/sdah
brw-rw----. 1 root disk 66,  32 Apr 25 17:52 /dev/sdai
brw-rw----. 1 root disk 66,  48 Apr 25 17:52 /dev/sdaj
brw-rw----. 1 root disk 66,  64 Apr 25 17:52 /dev/sdak
brw-rw----. 1 root disk 66,  80 Apr 25 17:52 /dev/sdal
brw-rw----. 1 root disk 66,  96 Apr 25 17:52 /dev/sdam
brw-rw----. 1 root disk 66, 112 Apr 25 17:52 /dev/sdan
brw-rw----. 1 root disk  8,  16 Apr 25 17:52 /dev/sdb
brw-rw----. 1 root disk  8,  32 Apr 25 17:52 /dev/sdc
brw-rw----. 1 root disk  8,  48 Apr 25 17:52 /dev/sdd
brw-rw----. 1 root disk  8,  64 Apr 25 17:52 /dev/sde
brw-rw----. 1 root disk  8,  80 Apr 25 17:52 /dev/sdf
brw-rw----. 1 root disk  8,  96 Apr 25 17:52 /dev/sdg
brw-rw----. 1 root disk  8, 112 Apr 25 17:52 /dev/sdh
brw-rw----. 1 root disk  8, 128 Apr 25 17:52 /dev/sdi
brw-rw----. 1 root disk  8, 144 Apr 25 17:52 /dev/sdj
brw-rw----. 1 root disk  8, 160 Apr 25 17:52 /dev/sdk
brw-rw----. 1 root disk  8, 176 Apr 25 17:52 /dev/sdl
brw-rw----. 1 root disk  8, 192 Apr 25 17:52 /dev/sdm
brw-rw----. 1 root disk  8, 208 Apr 25 17:52 /dev/sdn
brw-rw----. 1 root disk  8, 224 Apr 25 17:52 /dev/sdo
brw-rw----. 1 root disk  8, 240 Apr 25 17:52 /dev/sdp
brw-rw----. 1 root disk 65,   0 Apr 25 17:52 /dev/sdq
brw-rw----. 1 root disk 65,  16 Apr 25 17:52 /dev/sdr
brw-rw----. 1 root disk 65,  32 Apr 25 17:52 /dev/sds
brw-rw----. 1 root disk 65,  48 Apr 25 17:52 /dev/sdt
brw-rw----. 1 root disk 65,  64 Apr 25 17:52 /dev/sdu
brw-rw----. 1 root disk 65,  80 Apr 25 17:52 /dev/sdv
brw-rw----. 1 root disk 65,  96 Apr 25 17:52 /dev/sdw
brw-rw----. 1 root disk 65, 112 Apr 25 17:52 /dev/sdx
brw-rw----. 1 root disk 65, 128 Apr 25 17:52 /dev/sdy
brw-rw----. 1 root disk 65, 144 Apr 25 17:52 /dev/sdz
# ls -l /dev/sd* | wc -l
40

Expected results:
should can detect all the usb storage disks in guest.

Additional info:

Comment 1 Sibiao Luo 2013-04-25 10:08:32 UTC
Created attachment 739784 [details]
guest dmesg log.

Comment 2 Sibiao Luo 2013-04-25 10:09:06 UTC
Created attachment 739786 [details]
the qtree info and qemu-kvm command line.

Comment 3 Sibiao Luo 2013-04-26 02:53:28 UTC
Tried the windos2012-64 that also hit the same issue, only can detect 40 disks in guest.

Comment 4 Gerd Hoffmann 2013-05-14 12:45:49 UTC
most likaly also usb hubs nesting too deep.
qemu 1.5 will verify this (commit c24e4aac3bd7dd6591e26b77985e5d3915ecbe4b).

Comment 5 Gerd Hoffmann 2013-05-14 14:27:26 UTC
*** Bug 920108 has been marked as a duplicate of this bug. ***

Comment 6 Miroslav Rezanina 2013-05-23 11:54:19 UTC
Build in qemu-kvm-1.5.0-1.el7

Comment 7 Sibiao Luo 2013-07-08 08:42:01 UTC
Still hit it on qemu-kvm-1.5.1-2.el7.x86_64.
host info:
3.10.0-0.rc7.64.el7.x86_64
qemu-kvm-1.5.1-2.el7.x86_64
guest info:
3.10.0-0.rc7.64.el7.x86_64

Steps:
the same to comment #0.

Result:
boot guest with more than 40 usb-storage disks(e.g: 42 ) using the companion controller (ich9-ehci-uhci.cfg), but guest only can detect 40 usb-storage disks.
# ls -l /dev/sd* | wc -l
40
QEMU only has 40 disks from info usb.
(qemu) info usb
  Device 0.1, Port 1, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.2, Port 2, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.3, Port 3, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.4, Port 4, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.5, Port 5, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.1, Port 6, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.2, Port 6.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.3, Port 6.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.4, Port 6.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.5, Port 6.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.6, Port 6.5, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.7, Port 6.6, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.8, Port 6.7, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.9, 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.17, Port 6.8.5, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.6, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.7, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.0, Port 6.8.8.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.5, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.6, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.7, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.0, Port 6.8.8.8.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8.5, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8.6, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8.7, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8.8, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.0, Port 6.8.8.8.8.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8.8.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8.8.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8.8.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8.8.5, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8.8.6, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.0, Port 6.8.8.8.8.7, Speed 12 Mb/s, Product QEMU USB MSD
(qemu) 

Base on above, re-assign it again. please correct me if mistake.

Best Regards,
sluo

Comment 8 Gerd Hoffmann 2013-07-24 07:45:39 UTC
please add the exact command line to the bug.

Comment 9 Sibiao Luo 2013-07-24 08:11:22 UTC
(In reply to Gerd Hoffmann from comment #8)
> please add the exact command line to the bug.
please refer to attachment 739786 [details] for qemu-kvm command line and info qtree.
and the attachment 739784 [details] for guest dmesg log.

Best Regards,
sluo

Comment 10 Gerd Hoffmann 2013-07-24 12:47:28 UTC
Doesn't match what I see in testing.  qemu refuses to start with "qemu-system-x86_64: -device usb-storage,drive=usbstick-41,removable=on: usb hub chain too deep" for me, which is the expected behavior.  Please double-check.

Comment 11 Sibiao Luo 2013-07-25 02:39:21 UTC
(In reply to Gerd Hoffmann from comment #10)
> Doesn't match what I see in testing.  qemu refuses to start with
> "qemu-system-x86_64: -device usb-storage,drive=usbstick-41,removable=on: usb
> hub chain too deep" for me, which is the expected behavior.  Please
> double-check.
yes, retried it again, just expected result now.
host info:
3.10.0-0.rc7.64.el7.x86_64
qemu-kvm-1.5.1-2.el7.x86_64
guest info:
3.10.0-0.rc7.64.el7.x86_64

If i start 42 usb-storage, qemu will quit with prompt that usb hub chain too deep.
QEMU 1.5.1 monitor - type 'help' for more information
(qemu) qemu-kvm: -device usb-storage,drive=drive-usb-0-41,id=usb-0-41,removable=on: usb hub chain too deep
qemu-kvm: -device usb-storage,drive=drive-usb-0-41,id=usb-0-41,removable=on: Device initialization failed.
qemu-kvm: -device usb-storage,drive=drive-usb-0-41,id=usb-0-41,removable=on: Failed to initialize USB device 'usb-hub'
qemu-kvm: -device usb-storage,drive=drive-usb-0-42,id=usb-0-42,removable=on: Error: tried to attach usb device QEMU USB MSD to a bus with no free ports
qemu-kvm: -device usb-storage,drive=drive-usb-0-42,id=usb-0-42,removable=on: Device initialization failed.
qemu-kvm: -device usb-storage,drive=drive-usb-0-42,id=usb-0-42,removable=on: Device 'usb-storage' could not be initialized
/etc/qemu-ifdown: could not launch network script

If i start 41 usb-storage, guest can boot up successfully and all the 41 usb-storage can be detected in guest correctly.
# ls -l /dev/sd* | wc -l
41

Base on above, this issue has been fixed correctly, So please ignore comment #7.

Comment 12 juzhang 2013-07-25 02:42:28 UTC
According to comment11, back to ON_QA status.

Comment 13 Sibiao Luo 2014-01-02 06:05:20 UTC
Verify this issue on qemu-kvm-1.5.3-30.el7.x86_64 with the same comment #0 and comment #10. QEMU will give a warning message that usb hub chain too deep when boot guest with more than 41 usb-storage. If boot guest with 40 usb-storage that can boot up successfully without any problem, and all the 40 usb-storage disk can be detected in guest correctly.

host info:
# uname -r && rpm -q qemu-kvm
3.10.0-64.el7.x86_64
qemu-kvm-1.5.3-30.el7.x86_64
guest info:
3.10.0-64.el7.x86_64

e.g:
Warning: option deprecated, use lost_tick_policy property of kvm-pit instead.
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) qemu-kvm: -device usb-storage,drive=drive-usb-0-41,id=usb-0-41,removable=on: usb hub chain too deep
qemu-kvm: -device usb-storage,drive=drive-usb-0-41,id=usb-0-41,removable=on: Device initialization failed.
qemu-kvm: -device usb-storage,drive=drive-usb-0-41,id=usb-0-41,removable=on: Failed to initialize USB device 'usb-hub'
(/usr/libexec/qemu-kvm:24332): SpiceWorker-Warning **: red_worker.c:11464:dev_destroy_primary_surface: double destroy of primary surface
(/usr/libexec/qemu-kvm:24332): SpiceWorker-Warning **: red_worker.c:9650:red_create_surface: condition `surface->context.canvas' reached

(qemu)

Base on above, this issue has been fixed successfully, move to VERIFIED status.

Best Regards,
sluo

Comment 16 Ludek Smid 2014-06-13 11:16:16 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.