qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: marcandre.lureau@redhat.com, qemu-devel@nongnu.org,
	Beraldo Leal <bleal@redhat.com>, John Snow <jsnow@redhat.com>,
	Cleber Rosa <crosa@redhat.com>,
	Maksim Davydov <davydov-max@yandex-team.ru>
Subject: Re: [PATCH v3 3/3] python/qemu/machine: use socketpair() for QMP by default
Date: Mon, 20 Mar 2023 10:56:10 +0000	[thread overview]
Message-ID: <ZBg7ylBOK44/XUzM@redhat.com> (raw)
In-Reply-To: <70b83c92-c11d-0715-97e1-b2dd6f6dfffd@yandex-team.ru>

On Fri, Mar 17, 2023 at 10:36:37PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Hi!
> 
> By my investigation, this commit (bd4c0ef409140bd1be393407c04005ac077d4574) breaks long qmp output again.

> 
> ./test.py 1000 /tmp/sock
> 
>   - works, but if use default behavior (socketpair) we get:
> 
> $ ./test.py 1000
> Traceback (most recent call last):

snip

>   File "/usr/lib/python3.10/asyncio/streams.py", line 534, in readline
> ValueError: Separator is not found, and chunk exceed the limit

After going off in the weeds I realized this message is the key bit. We
failed to pass the raised recv limit to asyncio when using a pre-opened
socket. Since the QMP reply was greater than 64kb asyncio raised an
exception. This was a pre-existing latent bug, exposed with the patch
to enable use of socketpair(). I've CC'd you on a patch to fix this.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



      reply	other threads:[~2023-03-20 10:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11  8:00 [PATCH v3 0/3] python/qemu/machine: fix potential hang in QMP accept marcandre.lureau
2023-01-11  8:00 ` [PATCH v3 1/3] python/qmp/protocol: add open_with_socket() marcandre.lureau
2023-01-11  8:01 ` [PATCH v3 2/3] python/qmp/legacy: make QEMUMonitorProtocol accept a socket marcandre.lureau
2023-01-11  8:01 ` [PATCH v3 3/3] python/qemu/machine: use socketpair() for QMP by default marcandre.lureau
2023-01-17 22:36   ` John Snow
2023-01-18  8:02     ` Marc-André Lureau
2023-01-24  0:22       ` John Snow
2023-03-17 19:36   ` Vladimir Sementsov-Ogievskiy
2023-03-20 10:56     ` Daniel P. Berrangé [this message]

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=ZBg7ylBOK44/XUzM@redhat.com \
    --to=berrange@redhat.com \
    --cc=bleal@redhat.com \
    --cc=crosa@redhat.com \
    --cc=davydov-max@yandex-team.ru \
    --cc=jsnow@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@yandex-team.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).