qemu-devel
[Top][All Lists]
Advanced

[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


From: Nils Carlson
Subject: [Qemu-devel] Commit 812c1057f, Handle G_IO_HUP in tcp_chr_read for tcp chardev, broke CloudStack
Date: Fri, 17 Jul 2015 00:51:40 +0200 (CEST)
User-agent: Alpine 2.02 (DEB 1266 2009-07-14)

Hi,

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 paths.

All feedback very much appreciated.

Best Regards,
Nils Carlson


Attachment: qemu-char:_Fix_missed_data_on_unix_socket.patch
Description: Text Data


reply via email to

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