[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Commit 812c1057f, Handle G_IO_HUP in tcp_chr_read for tcp c
[Qemu-devel] Commit 812c1057f, Handle G_IO_HUP in tcp_chr_read for tcp chardev, broke CloudStack
Fri, 17 Jul 2015 00:51:40 +0200 (CEST)
Alpine 2.02 (DEB 1266 2009-07-14)
The commit 812c1057f, Handle G_IO_HUP in tcp_chr_read for tcp chardev,
broke CloudStack. CloudStack was relying on fire-and-forget style
messaging across a unix socket to the VM. Because the host "fires" the
message and then closes the socket a HUP is present on the line when the
VM starts reading the socket. Commit 812c1057f ensured that the socket was
checked for a HUP prior to calling recv, causing recv never to be called
by the VM and no data to be read.
I've posted a patch, attached here, which moves the HUP detection to after
all data has been read, but only for Linux as I suspect windows requires
HUPs to be detected prior to reading data.
Could you comment on the validity of this assumption? I would be really
happy to have this issue solved as it stops us from upgrading to later
versions of qemu.
Amit also has concerns regarding the return values from the tcp_chr_read
function, which seem a bit odd as they are all TRUE, even for failure
All feedback very much appreciated.
Description: Text Data
- [Qemu-devel] Commit 812c1057f, Handle G_IO_HUP in tcp_chr_read for tcp chardev, broke CloudStack,
Nils Carlson <=