I also seem to be having the same issue in a different scenario — namely, doing an xHCI controller reset from the VM.
Full story:
I have two USB 3.0 external HD drives I am frequently using in an Ubuntu guest under the Windows 10 host. Because I use them frequently, I tend to keep them plugged in and attached (via USB filters) to the VM; however, on the VM boot, I prefer to have them
not attached, because otherwise the mapping of drives in /dev changes in a way I do not like.
For a long time, I have been having a problem where the VM’s xHCI controller sometimes stops working if the drives are attached for a long time. It appears to happen randomly; sometimes I get more than a week continuous uptime without a hitch, other times the problem occurs already after a few hours. When it does occur, I get something like this in the guest’s kern.log:
Sep 18 05:05:08 VirtualBox kernel: [34550.375803] xhci_hcd 0000:00:0c.0: ERROR mismatched command completion event
Sep 18 05:05:08 VirtualBox kernel: [34550.375811] xhci_hcd 0000:00:0c.0: ERROR mismatched command completion event
Sep 18 05:05:08 VirtualBox kernel: [34550.375812] xhci_hcd 0000:00:0c.0: ERROR mismatched command completion event
Sep 18 05:05:13 VirtualBox kernel: [34555.418708] xhci_hcd 0000:00:0c.0: ERROR mismatched command completion event
Sep 18 05:05:21 VirtualBox kernel: [34562.587517] xhci_hcd 0000:00:0c.0: xHCI host not responding to stop endpoint command.
Sep 18 05:05:21 VirtualBox kernel: [34562.587841] xhci_hcd 0000:00:0c.0: xHCI host controller not responding, assume dead
Sep 18 05:05:21 VirtualBox kernel: [34562.587864] xhci_hcd 0000:00:0c.0: HC died; cleaning up
Sep 18 05:05:21 VirtualBox kernel: [34562.587872] xhci_hcd 0000:00:0c.0: xHCI host not responding to stop endpoint command.
I have figured out that when the above problem happens, I can fix it without restarting the VM by issuing the following commands from a root prompt:
echo -n "0000:00:0c.0" > /sys/bus/pci/drivers/xhci_hcd/unbind
echo -n "0000:00:0c.0" > /sys/bus/pci/drivers/xhci_hcd/bind
This workaround has been working for me for a long time, back to at least VB version 5.0.40 (except for a time there was a bug in Linux’s xhci driver that caused it to segfault about half of the time I did the above — but that was a problem with Linux, not VB).
Now, since VB 6.1.36, if I issue the first of the above commands (“unbind”) while the USB 3.0 drives are still attached to the VM, the VM crashes with an “unhandled exception” message box.
I have already reported it on the bugtracker (
Ticket #21108), see there for the crash log.
After a couple of tests I have determined that:
- the crash occurs if either of the USB 3.0 drives are attached to the VM;
- the crash does not occur if I detach the drives before issuing the “unbind” command;
- having a USB 2.0 drive attached does not result in the crash (as long as no USB 3.0 drive is attached);
- having any of the USB 3.0 drives attached while booting the Ubuntu guest (which, as stated above, is not something I normally do) results in the crash at the time the drive audibly spins up.
No data corruption observed yet, but I will definitely keep an eye for that.
Also, I will probably revert to 6.1.34 until the issue is fixed, because I am afraid the VM might crash if the xhci driver issues a controller reset while I am accessing one of the external drives. (I have observed such resets sporadically in all previous versions of VirtualBox; before this bug, they have been usually harmless.)