On Mon, Mar 20, 2023 at 2:54 PM Daniel P. Berrangé <berra...@redhat.com> wrote:
> The default message recv limit in asyncio is smaller than our needs, so > when opening connections we override it. This was done when opening a > connection using a socket address, but was missed when using a > pre-opened socket file descriptor. > > This latent bug was exposed when the QEMUMachine class was enhanced to > use socketpair() when no socket address was passed by: > > commit bd4c0ef409140bd1be393407c04005ac077d4574 > Author: Marc-André Lureau <marcandre.lur...@redhat.com> > Date: Wed Jan 11 12:01:01 2023 +0400 > > python/qemu/machine: use socketpair() for QMP by default > > Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> > thanks Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> > --- > python/qemu/qmp/protocol.py | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/python/qemu/qmp/protocol.py b/python/qemu/qmp/protocol.py > index 22e60298d2..2bd341a93e 100644 > --- a/python/qemu/qmp/protocol.py > +++ b/python/qemu/qmp/protocol.py > @@ -307,7 +307,10 @@ async def open_with_socket(self, sock: socket.socket) > -> None: > > :raise StateError: When the `Runstate` is not `IDLE`. > """ > - self._reader, self._writer = await > asyncio.open_connection(sock=sock) > + self._reader, self._writer = await asyncio.open_connection( > + sock=sock, > + limit=self._limit, > + ) > self._set_state(Runstate.CONNECTING) > > @upper_half > -- > 2.39.2 > >