Bug 980833 - xhci: FIXME: endpoint stopped w/ xfers running, data might be lost
xhci: FIXME: endpoint stopped w/ xfers running, data might be lost
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Gerd Hoffmann
Virtualization Bugs
:
Depends On:
Blocks: 1103193 1146483 1146486
  Show dependency treegraph
 
Reported: 2013-07-03 06:14 EDT by Sibiao Luo
Modified: 2015-03-05 03:01 EST (History)
15 users (show)

See Also:
Fixed In Version: qemu-kvm-1.5.3-76.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 03:01:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2013-07-03 06:14:38 EDT
Description of problem:
passthrough USB2.0 stick to guest var xhci controller, then mkfs.ext4 to the disk in guest, the HMP monitor will output '(qemu) xhci: FIXME: endpoint stopped w/ xfers running, data might be lost'.

Version-Release number of selected component (if applicable):
host info:
3.10.0-0.rc7.64.el7.x86_64
qemu-kvm-1.5.1-1.el7.x86_64
guest info:
3.10.0-0.rc7.64.el7.x86_64

How reproducible:
2/2

Steps to Reproduce:
1.insert a USB2.0 stick to host var physically XHCI controller.
2.get the bus and addr of usb2.0 stick info.
# lsusb
Bus 003 Device 006: ID 0951:1642 Kingston Technology DT101 G2
3.pathrough USB2.0 stick to guest var xhci controller.
# /usr/libexec/qemu-kvm -M q35 -cpu SandyBridge -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -name sluo -uuid 355a2475-4e03-4cdd-bf7b-5d6a59edaa61 -rtc base=localtime,clock=host,driftfix=slew -device pci-bridge,bus=pcie.0,id=bridge1,chassis_nr=1,addr=0x3 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=bridge1,addr=0x4 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/home/RHEL-7.0-20130628.0-Server-x86_64.qcow3,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial="QEMU-DISK1" -device virtio-scsi-pci,num_queues=4,id=scsi0,bus=bridge1,addr=0x5 -device scsi-hd,bus=scsi0.0,drive=drive-system-disk,id=system-disk,bootindex=1 -device virtio-balloon-pci,id=ballooning,bus=bridge1,addr=0x6 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -netdev tap,id=hostnet0,vhost=on,queues=4,script=/etc/qemu-ifup -device virtio-net-pci,mq=on,vectors=17,netdev=hostnet0,id=virtio-net-pci0,mac=08:2e:5f:0a:0d:b1,bus=bridge1,addr=0x7,bootindex=2 -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -serial unix:/tmp/ttyS0,server,nowait -vnc :1 -spice port=5931,disable-ticketing -monitor stdio -device nec-usb-xhci,id=xhci,bus=bridge1,addr=0x8 -device usb-host,hostbus=3,hostaddr=6,id=hostdev2,bus=xhci.0
4.format the disk in guest.
# fdisk -l
Disk /dev/sdb: 15.5 GB, 15513354240 bytes, 30299520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
# mkfs.ext4 /dev/sdb

Actual results:
after step 4, it can complete format the disk successfully, but the HMP monitor will output '(qemu) xhci: FIXME: endpoint stopped w/ xfers running, data might be lost'. 
guest]# mkfs.ext4 /dev/sdb
mke2fs 1.42.7 (21-Jan-2013)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
948416 inodes, 3787440 blocks
189372 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=3879731200
116 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done 

(qemu) info status 
VM status: running
(qemu) xhci: FIXME: endpoint stopped w/ xfers running, data might be lost

(qemu) info status 
VM status: running

Expected results:
the passthrough usb2.0 stick to guest work well without any problem.

Additional info:
Comment 1 Sibiao Luo 2013-07-03 06:15:18 EDT
guest dmesg info:
[   18.536060] nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.
[   29.948173] usb 1-1: reset high-speed USB device number 2 using xhci_hcd
[   29.963197] xhci_hcd 0000:01:08.0: xHCI xhci_drop_endpoint called with disabled ep ffff8801469a3a00
[   29.964158] xhci_hcd 0000:01:08.0: xHCI xhci_drop_endpoint called with disabled ep ffff8801469a3a40
[   29.970022] scsi 7:0:0:0: Direct-Access     Kingston DT 101 G2        PMAP PQ: 0 ANSI: 0 CCS
[   29.971894] sd 7:0:0:0: Attached scsi generic sg1 type 0
[   29.973030] sd 7:0:0:0: [sdb] 30299520 512-byte logical blocks: (15.5 GB/14.4 GiB)
[   29.974445] sd 7:0:0:0: [sdb] Write Protect is off
[   29.974926] sd 7:0:0:0: [sdb] Mode Sense: 23 00 00 00
[   29.975212] sd 7:0:0:0: [sdb] No Caching mode page present
[   29.975918] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[   29.981019] sd 7:0:0:0: [sdb] No Caching mode page present
[   29.981539] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[   29.983449]  sdb: unknown partition table
[   29.988677] sd 7:0:0:0: [sdb] No Caching mode page present
[   29.989675] sd 7:0:0:0: [sdb] Assuming drive cache: write through
[   29.990307] sd 7:0:0:0: [sdb] Attached SCSI removable disk
Comment 2 Sibiao Luo 2013-07-03 06:15:54 EDT
My usb2.0 info:
# lsusb -vv
Bus 003 Device 006: ID 0951:1642 Kingston Technology DT101 G2
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0951 Kingston Technology
  idProduct          0x1642 DT101 G2
  bcdDevice            1.00
  iManufacturer           1 Kingston
  iProduct                2 DT 101 G2
  iSerial                 3 001CC0EC32C7BB4107110077
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              200mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)
Comment 3 lijin 2014-03-17 05:41:38 EDT
win2012R2 guest hit the same issue when boot guest with nec-usb-xhci controller:
(qemu) xhci: FIXME: endpoint stopped w/ xfers running, data might be lost

package info:
qemu-kvm-rhev-1.5.3-52.el7.x86_64
kernel-3.10.0-99.el7.x86_64
virtio-win-1.6.8-4.el7.noarch
seabios-1.7.2.2-11.el7.x86_64
windows guest:win2k12R2

qemu-kvm command line:
/usr/libexec/qemu-kvm --nodefaults --nodefconfig -m 256G -smp 32 -cpu Opteron_G3,+kvm_pv_unhalt,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time -M pc-i440fx-rhel7.0.0 -usb -device usb-tablet,id=tablet0 -drive file=win2012R2-amd-max.raw,if=none,id=drive-virtio0-0-0,format=raw,werror=stop,rerror=stop,cache=none,serial=number -device virtio-blk-pci,drive=drive-virtio0-0-0,id=virti0-0-0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup1 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:52:56:2a:42:2e,addr=0x04 -uuid 9fc929e2-a5a9-48de-b31b-203484782d80 -monitor stdio -vnc :5 -vga cirrus -name win2012R2-amd-MAX -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -cdrom /usr/share/virtio-win/virtio-win.iso -fda /usr/share/virtio-win/virtio-win-1.6.8_amd64.vfd -boot menu=on -device nec-usb-xhci,id=xhci0 -drive file=usb-storage-amd-max.raw,if=none,id=drive-usb-2-0,media=disk,format=raw,cache=none,werror=stop,rerror=stop,aio=threads -device usb-storage,bus=xhci0.0,drive=drive-usb-2-0,id=usb-2-0,removable=on -rtc base=localtime,clock=host,driftfix=slew -chardev socket,id=b111a,path=/tmp/monitor-win2012R2-amd-max,server,nowait -mon chardev=b111a,mode=readline
Comment 4 lijin 2014-03-20 23:00:56 EDT
(In reply to lijin from comment #3)
> win2012R2 guest hit the same issue when boot guest with nec-usb-xhci
> controller:
> (qemu) xhci: FIXME: endpoint stopped w/ xfers running, data might be lost
> 
> package info:
> qemu-kvm-rhev-1.5.3-52.el7.x86_64
> kernel-3.10.0-99.el7.x86_64
> virtio-win-1.6.8-4.el7.noarch
> seabios-1.7.2.2-11.el7.x86_64
> windows guest:win2k12R2
> 
> qemu-kvm command line:
> /usr/libexec/qemu-kvm --nodefaults --nodefconfig -m 256G -smp 32 -cpu
> Opteron_G3,+kvm_pv_unhalt,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time -M
> pc-i440fx-rhel7.0.0 -usb -device usb-tablet,id=tablet0 -drive
> file=win2012R2-amd-max.raw,if=none,id=drive-virtio0-0-0,format=raw,
> werror=stop,rerror=stop,cache=none,serial=number -device
> virtio-blk-pci,drive=drive-virtio0-0-0,id=virti0-0-0,bootindex=1 -netdev
> tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup1 -device
> virtio-net-pci,netdev=hostnet0,id=net0,mac=00:52:56:2a:42:2e,addr=0x04 -uuid
> 9fc929e2-a5a9-48de-b31b-203484782d80 -monitor stdio -vnc :5 -vga cirrus
> -name win2012R2-amd-MAX -global PIIX4_PM.disable_s3=1 -global
> PIIX4_PM.disable_s4=1 -cdrom /usr/share/virtio-win/virtio-win.iso -fda
> /usr/share/virtio-win/virtio-win-1.6.8_amd64.vfd -boot menu=on -device
> nec-usb-xhci,id=xhci0 -drive
> file=usb-storage-amd-max.raw,if=none,id=drive-usb-2-0,media=disk,format=raw,
> cache=none,werror=stop,rerror=stop,aio=threads -device
> usb-storage,bus=xhci0.0,drive=drive-usb-2-0,id=usb-2-0,removable=on -rtc
> base=localtime,clock=host,driftfix=slew -chardev
> socket,id=b111a,path=/tmp/monitor-win2012R2-amd-max,server,nowait -mon
> chardev=b111a,mode=readline

this issue happended while running svvp job "Disk Stress (SYSTEM)"
Comment 6 Gerd Hoffmann 2014-05-26 07:40:44 EDT
upstream commit d6bb65fcd24c8cb8c37ffe324c360f3b0c94b902
Comment 7 Gerd Hoffmann 2014-07-04 07:45:38 EDT
Please retest with this test build:
http://people.redhat.com/ghoffman/bz1103193/
Comment 9 Miroslav Rezanina 2014-10-21 10:52:34 EDT
Fix included in qemu-kvm-1.5.3-76.el7
Comment 10 Miroslav Rezanina 2014-10-21 10:52:43 EDT
Fix included in qemu-kvm-1.5.3-76.el7
Comment 11 Miroslav Rezanina 2014-10-21 10:52:56 EDT
Fix included in qemu-kvm-1.5.3-76.el7
Comment 12 Miroslav Rezanina 2014-10-21 10:53:04 EDT
Fix included in qemu-kvm-1.5.3-76.el7
Comment 13 Miroslav Rezanina 2014-10-21 10:53:24 EDT
Fix included in qemu-kvm-1.5.3-76.el7
Comment 14 Miroslav Rezanina 2014-10-21 10:53:32 EDT
Fix included in qemu-kvm-1.5.3-76.el7
Comment 16 Jun Li 2014-11-04 05:08:46 EST
Reproduce:

Version of components:
host info:
3.10.0-186.el7.x86_64
qemu-kvm-1.5.1-1.el7.x86_64
guest info:
3.10.0-193.el7.x86_64

Steps:
1.insert a USB2.0 stick to host var physically XHCI controller.
2.get the bus and addr of usb2.0 stick info.
# lsusb
Bus 005 Device 007: ID 0951:1642 Kingston Technology DT101 G2
3.pathrough USB2.0 stick to guest var xhci controller.
# /usr/libexec/qemu-kvm -M q35 -cpu SandyBridge -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -name sluo -uuid 355a2475-4e03-4cdd-bf7b-5d6a59edaa61 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pcie.0,addr=0x4 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/home/RHEL-Server-7.1-64-virtio.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial="QEMU-DISK1",snapshot=on -device virtio-blk-pci,bus=pcie.0,drive=drive-system-disk,id=system-disk,bootindex=1 -device virtio-balloon-pci,id=ballooning,bus=pcie.0,addr=0x6 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -netdev tap,id=hostnet0,vhost=on,queues=4,script=/etc/qemu-ifup -device virtio-net-pci,mq=on,vectors=17,netdev=hostnet0,id=virtio-net-pci0,mac=08:2e:5f:0a:0d:b1,bus=pcie.0,addr=0x7,bootindex=2 -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -serial unix:/tmp/ttyS0,server,nowait -vnc :1 -spice port=5931,disable-ticketing -monitor stdio -device nec-usb-xhci,id=xhci,bus=pcie.0,addr=0x8 -device usb-host,hostbus=5,hostaddr=7,id=hostdev2,bus=xhci.0
4.format the disk in guest.
# fdisk -l
Disk /dev/sda: 15.5 GB, 15513354240 bytes, 30299520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
# mkfs.ext4 /dev/sda

Actual results:
after step 4, it can complete format the disk successfully, but the HMP monitor works well, won't print any warning or error message.

Hi Gerd,

  As above show, I can not reproduce this bz. Could you help to check above steps why can not reproduce this issue? Does it related to the version of kernel? Thanks.

Best Regards,
Jun Li
Comment 17 Gerd Hoffmann 2014-11-04 05:54:21 EST
  Hi,
 
>   As above show, I can not reproduce this bz. Could you help to check above
> steps why can not reproduce this issue? Does it related to the version of
> kernel? Thanks.

Whenever the message appears or not does also depend on guest behavior, so yes, the kernel can make a difference.  I'd suggest to downgrade the guest kernel first.  If that doesn't change anything try downgrading the host kernel too (bugs on the hosts xhci driver might indirectly cause this).
Comment 18 Jun Li 2014-11-11 01:41:34 EST
Has checked the following steps with this bz reporter sluo, so only verify it as followings:

Version of components:
qemu-kvm-1.5.3-77.el7.x86_64
Host kernel version:
3.10.0-200.el7.x86_64
Guest kernel version:
3.10.0-200.el7.x86_64

Steps:
1.insert a USB2.0 stick to host var physically XHCI controller.
2.get the bus and addr of usb2.0 stick info.
# lsusb
Bus 005 Device 002: ID 0951:1642 Kingston Technology DT101 G2
3.pathrough USB2.0 stick to guest var xhci controller.
# /usr/libexec/qemu-kvm -M q35 -cpu SandyBridge -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -name sluo -uuid 355a2475-4e03-4cdd-bf7b-5d6a59edaa61 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pcie.0,addr=0x4 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm1,bus=virtio-serial0.0,id=port2 -drive file=/home/RHEL-Server-7.1-64-virtio.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial=QEMU-DISK1,snapshot=on -device virtio-blk-pci,bus=pcie.0,drive=drive-system-disk,id=system-disk,bootindex=1 -device virtio-balloon-pci,id=ballooning,bus=pcie.0,addr=0x6 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -netdev tap,id=hostnet0,vhost=on,queues=4,script=/etc/qemu-ifup -device virtio-net-pci,mq=on,vectors=17,netdev=hostnet0,id=virtio-net-pci0,mac=08:2e:5f:0a:0d:b1,bus=pcie.0,addr=0x7,bootindex=2 -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -serial unix:/tmp/ttyS0,server,nowait -vnc :1 -spice port=5931,disable-ticketing -monitor stdio -device nec-usb-xhci,id=xhci,bus=pcie.0,addr=0x8 -device usb-host,hostbus=5,hostaddr=2,id=hostdev2,bus=xhci.0
4.format the disk in guest.
# fdisk -l
Disk /dev/sda: 15.5 GB, 15513354240 bytes, 30299520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
# mkfs.ext4 /dev/sda

Actual results:
after step 4, it can complete format the disk successfully, and HMP monitor do not print any warning or error info. qemu-kvm, guest and host are all works well.

Based on above testing, this bz has been verified.
============
Also test with following version of components, all works well. No hit this bz.
qemu-kvm-rhev-2.1.2-6.el7.x86_64
Host kernel version:
3.10.0-200.el7.x86_64
Guest kernel version:
3.10.0-200.el7.x86_64
Comment 21 errata-xmlrpc 2015-03-05 03:01:04 EST
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://rhn.redhat.com/errata/RHSA-2015-0349.html

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