qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems Encountered with virtio-serial device, communication breaks aft


From: Wenqing Xu
Subject: Problems Encountered with virtio-serial device, communication breaks after connection is closed unexpectedly
Date: Thu, 13 Jan 2022 19:56:38 +0800

Hi, 

I have met a problem with QEMU’s virtio-serial device while using it to invoke bash process inside VM from host. But we’ve met a problem that if the host process is closed unexpectedly, following calls then will fail and stuck.

Some detail:

Qemu Version:  2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.42)
Host Platform: Ubuntu 16.04 

Guest serial port parameters:  (e.g.) 
-chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-385-00000000130163704498/org.qemu.guest_agent.0,server,nowait

How to reproduce: 

- Start the VM with above parameters
- Connect to host socket `/var/lib/libvirt/qemu/channel/target/domain-385-00000000130163704498/org.qemu.guest_agent.0` and invoke our command in VM.
- Break the connection and let host process quit
- Try again with a new connection to host socket again, it will stuck at sock.connect and cannot receive response from the socket.

I have searched around and found that it’s very similar to the bug stated in “https://wiki.qemu.org/Features/ChardevFlowControl” in the bottom, “QEMU doesn't catch -EPIPE for short-lived guest processes and disconnected host chardevs”, and tried with the reproduce steps and can reproduce in our QEMU VMs as well, but the bug ticket listed below cannot be viewed and I don’t know if the bug is resolved yet.

Also, similar questions found in email list https://lists.nongnu.org/archive/html/qemu-discuss/2016-06/msg00001.html and have not been answered yet.

May I know if this bug has been resolved yet? If yes, which qemu version has it been patched? If not, if there’s any work-around to dodge this bug? 

Thanks in advance,

Chris Xu

reply via email to

[Prev in Thread] Current Thread [Next in Thread]