From: Paolo Bonzini <pbonzini@redhat.com>
To: Nils Carlson <pyssling@ludd.ltu.se>,
liangshunbin@jovaunn.com, qemu-devel@nongnu.org,
batuzovk@ispras.ru, a.motakis@virtualopensystems.com,
n.nikolaev@virtualopensystems.com, mst@redhat.com,
zodiac@ispras.ru, amit.shah@redhat.com
Subject: Re: [Qemu-devel] Commit 812c1057f, Handle G_IO_HUP in tcp_chr_read for tcp chardev, broke CloudStack
Date: Fri, 17 Jul 2015 04:22:55 +0200 [thread overview]
Message-ID: <55A866FF.2080300@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1507170034320.27454@luminous.ludd.ltu.se>
On 17/07/2015 00:51, Nils Carlson wrote:
>
> 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.
I'm not sure, but I don't think this is the case. Why do you think
Windows has this requirement? In any case, you should prepare a patch
that has no Windows-specific paths and Cc Kirill Batuzov
(batuzovk@ispras.ru) for him to test the patch.
Alternatively I or you could test under Wine.
> 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.
This is okay, I think, because the source is removed in tcp_chr_disconnect.
Paolo
next prev parent reply other threads:[~2015-07-17 2:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 22:51 [Qemu-devel] Commit 812c1057f, Handle G_IO_HUP in tcp_chr_read for tcp chardev, broke CloudStack Nils Carlson
2015-07-17 2:22 ` Paolo Bonzini [this message]
2015-07-17 9:35 ` Kirill Batuzov
2015-07-17 17:26 ` Nils Carlson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55A866FF.2080300@redhat.com \
--to=pbonzini@redhat.com \
--cc=a.motakis@virtualopensystems.com \
--cc=amit.shah@redhat.com \
--cc=batuzovk@ispras.ru \
--cc=liangshunbin@jovaunn.com \
--cc=mst@redhat.com \
--cc=n.nikolaev@virtualopensystems.com \
--cc=pyssling@ludd.ltu.se \
--cc=qemu-devel@nongnu.org \
--cc=zodiac@ispras.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).