USB serial device passtrough causes qemu to segfault and kill the VM

Bug #1883398 reported by Avamander
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

What happens:

When I pass trough my CH340G (very common USB-TTL serial module) with high-baud data coming in to my Windows 10 VM. qemu segfaults and dirtily shuts down my VM at some random point. The higher the baudrate, the more likely it is to happen. 921600 means the death to my VM in somewhere between 10 seconds and a few minutes. There's no blue screen or anything, it's qemu dying and taking the VM with it.

So far I've also determined:
* It does not crash as often on lower baudrates.

* It does not seem to crash if there's no data coming in.

* It does not matter if something is reading the data or not.

* It does not matter what software is reading the serial device.

What should happen:

Qemu shouldn't crash on a device being passed trough.

System details:

Host - Ubuntu 20.04, qemu-system-common 4.2-3ubuntu6.1 (and everything else as well latest from repository)

VM - Windows 10, latest updates installed

Diagnostics info:

dmesg output:
[19511.277076] qemu-system-x86[35900]: segfault at 558c4c000000 ip 00007fee658ce8a2 sp 00007ffc6015f720 error 4 in libc-2.31.so[7fee65856000+178000]
[19511.277082] Code: a8 02 75 34 48 8b 15 f5 d4 14 00 64 48 83 3a 00 0f 84 9a 00 00 00 48 8d 3d eb e2 14 00 a8 04 74 0c 48 89 f0 48 25 00 00 00 fc <48>
8b 38 31 d2 48 83 c4 18 e9 10 c1 ff ff 8b 15 fe d9 14 00 85 d2

lsusb output (this is a CH340G module, very very widespread and cheap):
Bus 002 Device 018: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

@avamander,

Thank you for taking the time to file a bug report.

Could you provide the libvirt domain XML file you're using to start your qemu instance ? Would you be able to reproduce this issue and generate a core file from your host's qemu process and provide it to us ? Or, at least, provide us a detailed reproducer so we can reproduce it on our side ?

Since there is not enough information in your report to begin triage or to
differentiate between a local configuration problem and a bug in Ubuntu, I
am marking this bug as "Incomplete". We would be grateful if you would:
provide a more complete description of the problem, explain why you
believe this is a bug in Ubuntu rather than a problem specific to your
system, and then change the bug status back to "New".

For local configuration issues, you can find assistance here:
http://www.ubuntu.com/support/community

Changed in qemu (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for qemu (Ubuntu) because there has been no activity for 60 days.]

Changed in qemu (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.