All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] glib-compat: work around g_test_message bug with subprocess tests
Date: Tue, 27 Nov 2018 19:58:18 +0100	[thread overview]
Message-ID: <cd72c676-761a-2561-7148-c9a7974ff059@redhat.com> (raw)
In-Reply-To: <a7634330-8c47-459b-5aaa-1c4519a90dd6@redhat.com>

On 27/11/18 19:44, Eric Blake wrote:
> On 11/27/18 12:35 PM, Paolo Bonzini wrote:
>> Subprocesses are created by glib without leaving the file descriptors
>> open.  Therefore, g_test_message (and assertion failures, but those
>> trigger when things are going bad anyway) will think that it is writing
>> to the log file descriptor, but while actually stomping on the QMP
>> file descriptor or similar.  This causes spurious failures, which are
>> as nice to debug as the reader can imagine.  While I have opened a
>> pull request on GLib, this will probably take a while to propagate
>> to distros.
>>
>> I found this while working on qgraph, but the fix is generic.
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>   include/glib-compat.h | 6 ++++++
>>   1 file changed, 6 insertions(+)
> 
> Wow. I don't envy the debug session that you went through to finally
> realize this problem.

It only took me 4 hours actually, but not really the fun kind of
debugging. :(  Lots of cursing when I found the culprit...

> Reviewed-by: Eric Blake <eblake@redhat.com>
> 
> I think this is safe for 3.1-rc3 if you want it there, as minimizing
> spurious test failures is a good thing.

I suspect it is the cause of QTEST_VHOST_USER_FIXME but I am not sure it
is.  In any case, I was not planning to merge it in 3.1-rc3 since we do
not have any case where it breaks CI or maintainers' tests.

Paolo

  reply	other threads:[~2018-11-27 18:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 18:35 [Qemu-devel] [PATCH] glib-compat: work around g_test_message bug with subprocess tests Paolo Bonzini
2018-11-27 18:44 ` Eric Blake
2018-11-27 18:58   ` Paolo Bonzini [this message]
2018-11-29 13:38   ` [Qemu-devel] [Qemu-devel for-3.1?] " Eric Blake
2018-11-27 18:49 ` [Qemu-devel] " Marc-André Lureau
2018-11-27 18:55   ` Paolo Bonzini
2018-11-29 11:57 ` no-reply

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=cd72c676-761a-2561-7148-c9a7974ff059@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=eblake@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.