New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USBvm (both Debian and Fedora based) occasionally gets "stuck" flash drives when passing them through to other VMs (with logs!) #2616

Closed
tonsimple opened this Issue Feb 2, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@tonsimple

tonsimple commented Feb 2, 2017

Qubes OS version (e.g., R3.2):

3.2

Affected TemplateVMs (e.g., fedora-23, if applicable):

Debian 8 (maybe)
Fedora 24 (maybe)
Dom0


Expected behavior:

Usb drives plugged into the port of a USB controller passed to a dedicated USB-vm can be passed to other AppVMs using "attach block device" and "detach block device" features in right-click menu without issue, as described in the documentation

Actual behavior:

A USB device can become "stuck" and undetachable.
Worse yet, any future devices plugged into same controller will become similarly stuck.
Rebooting USB VM does not help (behavior persists), only full software reboot allows for a return to normal.

Stuck devices "hang" the VMs they have been passed through as block devices.

Attempt to detach a stuck flash drive from the AppVM it's been passed through causes the Qubes VM manager to hang (Houston we have a problem)

Attempt to detach a stuck flash drives seems to produce meaningful errors in Dom0 logs (notably stuff like "internal error: libxenlight failed to detach disk 'xvdj'")
Dmesg in USBVM does not appear to say anything particularly menacing when a device gets "stuck" (but may be useful regardless, so I grabbed it too)

Steps to reproduce the behavior:

  1. have a USBVM with a pcie USB controller passed through to it
  2. have a flash thumbdrive (various microsd->USB thingies also seem to provoke this a lot)
  3. insert the thumbdrive into port of USBVM's controller
  4. attach the thumbdrive to some appvm
  5. work with thumbdrive (copy, delete, etc)
  6. detach the thumbdrive from appvm
  7. physically remove the thumbdrive

Repeat 1-7 and eventually it will happen. NTFS formated thumbdrives that were mishandled ("dirty bit" set) appear to cause it more readily.

Yanking the thumbdrive out after 5 seems to cause this bug to manifest much sooner, but I don't like yanking thumbdrives out so am not quite sure.

General notes:

Dom0 logs:
badusb.txt

(** indicated comment)

USBVM log (from a debian usbvm)
USBDEB.txt


Related issues:

Maybe same as #2094 , not sure (I get it even when being very VERY careful about unmounting and detaching before removal, so not sure)

@tonsimple

This comment has been minimized.

Show comment
Hide comment
@tonsimple

tonsimple Feb 2, 2017

Okay, upon further thought, very likely a duplicate of that, so closing. Hope logs will still be of use to fixing this.

Okay, upon further thought, very likely a duplicate of that, so closing. Hope logs will still be of use to fixing this.

@tonsimple tonsimple closed this Feb 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment