* [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept
@ 2022-06-30 12:34 marcandre.lureau
2022-06-30 12:34 ` [PATCH v2 1/3] python/qmp/protocol: add open_with_socket() marcandre.lureau
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: marcandre.lureau @ 2022-06-30 12:34 UTC (permalink / raw)
To: qemu-devel
Cc: Cleber Rosa, Richard Henderson, John Snow, berrange,
Beraldo Leal, Marc-André Lureau
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Hi,
As reported earlier by Richard Henderson ("virgl avocado hang" thread), avocado
tests may hang when QEMU exits before the QMP connection is established.
v2:
- use a socketpair() for QMP (instead of async concurrent code from v1) as
suggested by Daniel Berrange.
- should not regress (hopefully)
Marc-André Lureau (3):
python/qmp/protocol: add open_with_socket()
python/qmp/legacy: make QEMUMonitorProtocol accept a socket
python/qemu/machine: use socketpair() for QMP by default
python/qemu/machine/machine.py | 24 ++++++++++++++++--------
python/qemu/qmp/legacy.py | 18 +++++++++++++++---
python/qemu/qmp/protocol.py | 25 ++++++++++++++++++++-----
3 files changed, 51 insertions(+), 16 deletions(-)
--
2.37.0.rc0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 1/3] python/qmp/protocol: add open_with_socket()
2022-06-30 12:34 [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept marcandre.lureau
@ 2022-06-30 12:34 ` marcandre.lureau
2022-06-30 12:34 ` [PATCH v2 2/3] python/qmp/legacy: make QEMUMonitorProtocol accept a socket marcandre.lureau
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ messages in thread
From: marcandre.lureau @ 2022-06-30 12:34 UTC (permalink / raw)
To: qemu-devel
Cc: Cleber Rosa, Richard Henderson, John Snow, berrange,
Beraldo Leal, Marc-André Lureau
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Instead of listening for incoming connections with a SocketAddr, add a
new method open_with_socket() that accepts an existing socket.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
python/qemu/qmp/protocol.py | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/python/qemu/qmp/protocol.py b/python/qemu/qmp/protocol.py
index 6ea86650ad24..4710a57f9126 100644
--- a/python/qemu/qmp/protocol.py
+++ b/python/qemu/qmp/protocol.py
@@ -18,6 +18,7 @@
from enum import Enum
from functools import wraps
import logging
+import socket
from ssl import SSLContext
from typing import (
Any,
@@ -296,6 +297,19 @@ async def start_server_and_accept(
await self.accept()
assert self.runstate == Runstate.RUNNING
+ @upper_half
+ @require(Runstate.IDLE)
+ async def open_with_socket(self, sock: socket.socket) -> None:
+ """
+ Start connection with given socket.
+
+ :param sock: A socket.
+
+ :raise StateError: When the `Runstate` is not `IDLE`.
+ """
+ self._reader, self._writer = await asyncio.open_connection(sock=sock)
+ self._set_state(Runstate.CONNECTING)
+
@upper_half
@require(Runstate.IDLE)
async def start_server(self, address: SocketAddrT,
@@ -343,11 +357,12 @@ async def accept(self) -> None:
protocol-level failure occurs while establishing a new
session, the wrapped error may also be an `QMPError`.
"""
- if self._accepted is None:
- raise QMPError("Cannot call accept() before start_server().")
- await self._session_guard(
- self._do_accept(),
- 'Failed to establish connection')
+ if not self._reader:
+ if self._accepted is None:
+ raise QMPError("Cannot call accept() before start_server().")
+ await self._session_guard(
+ self._do_accept(),
+ 'Failed to establish connection')
await self._session_guard(
self._establish_session(),
'Failed to establish session')
--
2.37.0.rc0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 2/3] python/qmp/legacy: make QEMUMonitorProtocol accept a socket
2022-06-30 12:34 [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept marcandre.lureau
2022-06-30 12:34 ` [PATCH v2 1/3] python/qmp/protocol: add open_with_socket() marcandre.lureau
@ 2022-06-30 12:34 ` marcandre.lureau
2022-06-30 12:34 ` [PATCH v2 3/3] python/qemu/machine: use socketpair() for QMP by default marcandre.lureau
2022-06-30 22:49 ` [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept John Snow
3 siblings, 0 replies; 12+ messages in thread
From: marcandre.lureau @ 2022-06-30 12:34 UTC (permalink / raw)
To: qemu-devel
Cc: Cleber Rosa, Richard Henderson, John Snow, berrange,
Beraldo Leal, Marc-André Lureau
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Teach QEMUMonitorProtocol to accept an exisiting socket.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
python/qemu/qmp/legacy.py | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/python/qemu/qmp/legacy.py b/python/qemu/qmp/legacy.py
index 03b5574618fa..72e8f9af7362 100644
--- a/python/qemu/qmp/legacy.py
+++ b/python/qemu/qmp/legacy.py
@@ -22,6 +22,7 @@
#
import asyncio
+import socket
from types import TracebackType
from typing import (
Any,
@@ -69,22 +70,32 @@ class QEMUMonitorProtocol:
:param address: QEMU address, can be either a unix socket path (string)
or a tuple in the form ( address, port ) for a TCP
- connection
+ connection or None
+ :param sock: a socket or None
:param server: Act as the socket server. (See 'accept')
:param nickname: Optional nickname used for logging.
"""
- def __init__(self, address: SocketAddrT,
+ def __init__(self,
+ address: Optional[SocketAddrT] = None,
+ sock: Optional[socket.socket] = None,
server: bool = False,
nickname: Optional[str] = None):
+ assert address or sock
self._qmp = QMPClient(nickname)
self._aloop = asyncio.get_event_loop()
self._address = address
+ self._sock = sock
self._timeout: Optional[float] = None
if server:
- self._sync(self._qmp.start_server(self._address))
+ if sock:
+ assert self._sock is not None
+ self._sync(self._qmp.open_with_socket(self._sock))
+ else:
+ assert self._address is not None
+ self._sync(self._qmp.start_server(self._address))
_T = TypeVar('_T')
@@ -139,6 +150,7 @@ def connect(self, negotiate: bool = True) -> Optional[QMPMessage]:
:return: QMP greeting dict, or None if negotiate is false
:raise ConnectError: on connection errors
"""
+ assert self._address is not None
self._qmp.await_greeting = negotiate
self._qmp.negotiate = negotiate
--
2.37.0.rc0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 3/3] python/qemu/machine: use socketpair() for QMP by default
2022-06-30 12:34 [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept marcandre.lureau
2022-06-30 12:34 ` [PATCH v2 1/3] python/qmp/protocol: add open_with_socket() marcandre.lureau
2022-06-30 12:34 ` [PATCH v2 2/3] python/qmp/legacy: make QEMUMonitorProtocol accept a socket marcandre.lureau
@ 2022-06-30 12:34 ` marcandre.lureau
2022-07-25 11:29 ` Daniel P. Berrangé
2022-06-30 22:49 ` [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept John Snow
3 siblings, 1 reply; 12+ messages in thread
From: marcandre.lureau @ 2022-06-30 12:34 UTC (permalink / raw)
To: qemu-devel
Cc: Cleber Rosa, Richard Henderson, John Snow, berrange,
Beraldo Leal, Marc-André Lureau
From: Marc-André Lureau <marcandre.lureau@redhat.com>
When no monitor address is given, establish the QMP communication through
a socketpair() (API is also supported on Windows since Python 3.5)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
python/qemu/machine/machine.py | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py
index 37191f433b2d..aa1d9447352d 100644
--- a/python/qemu/machine/machine.py
+++ b/python/qemu/machine/machine.py
@@ -158,17 +158,13 @@ def __init__(self,
self._qmp_timer = qmp_timer
self._name = name or f"qemu-{os.getpid()}-{id(self):02x}"
+ self._sock_pair: Optional[Tuple[socket.socket, socket.socket]] = None
self._temp_dir: Optional[str] = None
self._base_temp_dir = base_temp_dir
self._sock_dir = sock_dir
self._log_dir = log_dir
- if monitor_address is not None:
- self._monitor_address = monitor_address
- else:
- self._monitor_address = os.path.join(
- self.sock_dir, f"{self._name}-monitor.sock"
- )
+ self._monitor_address = monitor_address
self._console_log_path = console_log
if self._console_log_path:
@@ -303,7 +299,11 @@ def _base_args(self) -> List[str]:
args = ['-display', 'none', '-vga', 'none']
if self._qmp_set:
- if isinstance(self._monitor_address, tuple):
+ if self._sock_pair:
+ fd = self._sock_pair[0].fileno()
+ os.set_inheritable(fd, True)
+ moncdev = f"socket,id=mon,fd={fd}"
+ elif isinstance(self._monitor_address, tuple):
moncdev = "socket,id=mon,host={},port={}".format(
*self._monitor_address
)
@@ -337,10 +337,17 @@ def _pre_launch(self) -> None:
self._remove_files.append(self._console_address)
if self._qmp_set:
+ monitor_address = None
+ sock = None
+ if self._monitor_address is None:
+ self._sock_pair = socket.socketpair()
+ sock = self._sock_pair[1]
if isinstance(self._monitor_address, str):
self._remove_files.append(self._monitor_address)
+ monitor_address = self._monitor_address
self._qmp_connection = QEMUMonitorProtocol(
- self._monitor_address,
+ address=monitor_address,
+ sock=sock,
server=True,
nickname=self._name
)
@@ -360,6 +367,7 @@ def _pre_launch(self) -> None:
))
def _post_launch(self) -> None:
+ self._sock_pair[0].close()
if self._qmp_connection:
self._qmp.accept(self._qmp_timer)
--
2.37.0.rc0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept
2022-06-30 12:34 [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept marcandre.lureau
` (2 preceding siblings ...)
2022-06-30 12:34 ` [PATCH v2 3/3] python/qemu/machine: use socketpair() for QMP by default marcandre.lureau
@ 2022-06-30 22:49 ` John Snow
2022-07-25 11:23 ` Marc-André Lureau
3 siblings, 1 reply; 12+ messages in thread
From: John Snow @ 2022-06-30 22:49 UTC (permalink / raw)
To: Marc-André Lureau
Cc: qemu-devel, Cleber Rosa, Richard Henderson, Daniel Berrange,
Beraldo Leal
On Thu, Jun 30, 2022 at 8:34 AM <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Hi,
>
> As reported earlier by Richard Henderson ("virgl avocado hang" thread), avocado
> tests may hang when QEMU exits before the QMP connection is established.
>
> v2:
> - use a socketpair() for QMP (instead of async concurrent code from v1) as
> suggested by Daniel Berrange.
> - should not regress (hopefully)
>
> Marc-André Lureau (3):
> python/qmp/protocol: add open_with_socket()
> python/qmp/legacy: make QEMUMonitorProtocol accept a socket
> python/qemu/machine: use socketpair() for QMP by default
>
> python/qemu/machine/machine.py | 24 ++++++++++++++++--------
> python/qemu/qmp/legacy.py | 18 +++++++++++++++---
> python/qemu/qmp/protocol.py | 25 ++++++++++++++++++++-----
> 3 files changed, 51 insertions(+), 16 deletions(-)
>
> --
> 2.37.0.rc0
>
For anything that touches python/qemu/qmp/*, may I please ask that you
submit them to https://gitlab.com/qemu-project/python-qemu-qmp ?
(I'll review them in the meantime on-list just in the interest of
moving things along.)
--js
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept
2022-06-30 22:49 ` [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept John Snow
@ 2022-07-25 11:23 ` Marc-André Lureau
2022-07-25 11:27 ` Daniel P. Berrangé
2023-01-09 21:06 ` John Snow
0 siblings, 2 replies; 12+ messages in thread
From: Marc-André Lureau @ 2022-07-25 11:23 UTC (permalink / raw)
To: John Snow
Cc: qemu-devel, Cleber Rosa, Richard Henderson, Daniel Berrange,
Beraldo Leal
[-- Attachment #1: Type: text/plain, Size: 1462 bytes --]
Hi
On Fri, Jul 1, 2022 at 2:51 AM John Snow <jsnow@redhat.com> wrote:
> On Thu, Jun 30, 2022 at 8:34 AM <marcandre.lureau@redhat.com> wrote:
> >
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Hi,
> >
> > As reported earlier by Richard Henderson ("virgl avocado hang" thread),
> avocado
> > tests may hang when QEMU exits before the QMP connection is established.
> >
> > v2:
> > - use a socketpair() for QMP (instead of async concurrent code from v1)
> as
> > suggested by Daniel Berrange.
> > - should not regress (hopefully)
> >
> > Marc-André Lureau (3):
> > python/qmp/protocol: add open_with_socket()
> > python/qmp/legacy: make QEMUMonitorProtocol accept a socket
> > python/qemu/machine: use socketpair() for QMP by default
> >
> > python/qemu/machine/machine.py | 24 ++++++++++++++++--------
> > python/qemu/qmp/legacy.py | 18 +++++++++++++++---
> > python/qemu/qmp/protocol.py | 25 ++++++++++++++++++++-----
> > 3 files changed, 51 insertions(+), 16 deletions(-)
> >
> > --
> > 2.37.0.rc0
> >
>
> For anything that touches python/qemu/qmp/*, may I please ask that you
> submit them to https://gitlab.com/qemu-project/python-qemu-qmp ?
>
>
Ok
> (I'll review them in the meantime on-list just in the interest of
> moving things along.)
>
I was waiting for a review before updating the patches / moving to
python-qemu-qmp.
thanks
--
Marc-André Lureau
[-- Attachment #2: Type: text/html, Size: 2439 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept
2022-07-25 11:23 ` Marc-André Lureau
@ 2022-07-25 11:27 ` Daniel P. Berrangé
2023-01-09 21:06 ` John Snow
1 sibling, 0 replies; 12+ messages in thread
From: Daniel P. Berrangé @ 2022-07-25 11:27 UTC (permalink / raw)
To: Marc-André Lureau
Cc: John Snow, qemu-devel, Cleber Rosa, Richard Henderson, Beraldo Leal
On Mon, Jul 25, 2022 at 03:23:26PM +0400, Marc-André Lureau wrote:
> Hi
>
> On Fri, Jul 1, 2022 at 2:51 AM John Snow <jsnow@redhat.com> wrote:
>
> > On Thu, Jun 30, 2022 at 8:34 AM <marcandre.lureau@redhat.com> wrote:
> > >
> > > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> > >
> > > Hi,
> > >
> > > As reported earlier by Richard Henderson ("virgl avocado hang" thread),
> > avocado
> > > tests may hang when QEMU exits before the QMP connection is established.
> > >
> > > v2:
> > > - use a socketpair() for QMP (instead of async concurrent code from v1)
> > as
> > > suggested by Daniel Berrange.
> > > - should not regress (hopefully)
> > >
> > > Marc-André Lureau (3):
> > > python/qmp/protocol: add open_with_socket()
> > > python/qmp/legacy: make QEMUMonitorProtocol accept a socket
> > > python/qemu/machine: use socketpair() for QMP by default
> > >
> > > python/qemu/machine/machine.py | 24 ++++++++++++++++--------
> > > python/qemu/qmp/legacy.py | 18 +++++++++++++++---
> > > python/qemu/qmp/protocol.py | 25 ++++++++++++++++++++-----
> > > 3 files changed, 51 insertions(+), 16 deletions(-)
> > >
> > > --
> > > 2.37.0.rc0
> > >
> >
> > For anything that touches python/qemu/qmp/*, may I please ask that you
> > submit them to https://gitlab.com/qemu-project/python-qemu-qmp ?
> >
> >
> Ok
>
>
> > (I'll review them in the meantime on-list just in the interest of
> > moving things along.)
> >
>
> I was waiting for a review before updating the patches / moving to
> python-qemu-qmp.
This code looks decent to me
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 3/3] python/qemu/machine: use socketpair() for QMP by default
2022-06-30 12:34 ` [PATCH v2 3/3] python/qemu/machine: use socketpair() for QMP by default marcandre.lureau
@ 2022-07-25 11:29 ` Daniel P. Berrangé
0 siblings, 0 replies; 12+ messages in thread
From: Daniel P. Berrangé @ 2022-07-25 11:29 UTC (permalink / raw)
To: marcandre.lureau
Cc: qemu-devel, Cleber Rosa, Richard Henderson, John Snow, Beraldo Leal
On Thu, Jun 30, 2022 at 04:34:19PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> When no monitor address is given, establish the QMP communication through
> a socketpair() (API is also supported on Windows since Python 3.5)
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> python/qemu/machine/machine.py | 24 ++++++++++++++++--------
> 1 file changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py
> index 37191f433b2d..aa1d9447352d 100644
> --- a/python/qemu/machine/machine.py
> +++ b/python/qemu/machine/machine.py
> @@ -158,17 +158,13 @@ def __init__(self,
> self._qmp_timer = qmp_timer
>
> self._name = name or f"qemu-{os.getpid()}-{id(self):02x}"
> + self._sock_pair: Optional[Tuple[socket.socket, socket.socket]] = None
> self._temp_dir: Optional[str] = None
> self._base_temp_dir = base_temp_dir
> self._sock_dir = sock_dir
> self._log_dir = log_dir
>
> - if monitor_address is not None:
> - self._monitor_address = monitor_address
> - else:
> - self._monitor_address = os.path.join(
> - self.sock_dir, f"{self._name}-monitor.sock"
> - )
> + self._monitor_address = monitor_address
Almost nothing in QEMU passes 'monitor_address' right now, so thue effect
of this will be that essentially all usage switches to the socketpair
behaviour. Should be ok, as nothing is expecting to have the ability to
leave QEMU running, and re-connect to its monitor in another process
later.
>
> self._console_log_path = console_log
> if self._console_log_path:
> @@ -303,7 +299,11 @@ def _base_args(self) -> List[str]:
> args = ['-display', 'none', '-vga', 'none']
>
> if self._qmp_set:
> - if isinstance(self._monitor_address, tuple):
> + if self._sock_pair:
> + fd = self._sock_pair[0].fileno()
> + os.set_inheritable(fd, True)
> + moncdev = f"socket,id=mon,fd={fd}"
> + elif isinstance(self._monitor_address, tuple):
> moncdev = "socket,id=mon,host={},port={}".format(
> *self._monitor_address
> )
> @@ -337,10 +337,17 @@ def _pre_launch(self) -> None:
> self._remove_files.append(self._console_address)
>
> if self._qmp_set:
> + monitor_address = None
> + sock = None
> + if self._monitor_address is None:
> + self._sock_pair = socket.socketpair()
> + sock = self._sock_pair[1]
> if isinstance(self._monitor_address, str):
> self._remove_files.append(self._monitor_address)
> + monitor_address = self._monitor_address
> self._qmp_connection = QEMUMonitorProtocol(
> - self._monitor_address,
> + address=monitor_address,
> + sock=sock,
> server=True,
> nickname=self._name
> )
> @@ -360,6 +367,7 @@ def _pre_launch(self) -> None:
> ))
>
> def _post_launch(self) -> None:
> + self._sock_pair[0].close()
> if self._qmp_connection:
> self._qmp.accept(self._qmp_timer)
>
> --
> 2.37.0.rc0
>
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 :|
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept
2022-07-25 11:23 ` Marc-André Lureau
2022-07-25 11:27 ` Daniel P. Berrangé
@ 2023-01-09 21:06 ` John Snow
2023-01-10 7:05 ` Marc-André Lureau
1 sibling, 1 reply; 12+ messages in thread
From: John Snow @ 2023-01-09 21:06 UTC (permalink / raw)
To: Marc-André Lureau
Cc: qemu-devel, Cleber Rosa, Richard Henderson, Daniel Berrange,
Beraldo Leal
On Mon, Jul 25, 2022 at 7:23 AM Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
>
> Hi
>
> On Fri, Jul 1, 2022 at 2:51 AM John Snow <jsnow@redhat.com> wrote:
>>
>> On Thu, Jun 30, 2022 at 8:34 AM <marcandre.lureau@redhat.com> wrote:
>> >
>> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
>> >
>> > Hi,
>> >
>> > As reported earlier by Richard Henderson ("virgl avocado hang" thread), avocado
>> > tests may hang when QEMU exits before the QMP connection is established.
>> >
>> > v2:
>> > - use a socketpair() for QMP (instead of async concurrent code from v1) as
>> > suggested by Daniel Berrange.
>> > - should not regress (hopefully)
>> >
>> > Marc-André Lureau (3):
>> > python/qmp/protocol: add open_with_socket()
>> > python/qmp/legacy: make QEMUMonitorProtocol accept a socket
>> > python/qemu/machine: use socketpair() for QMP by default
>> >
>> > python/qemu/machine/machine.py | 24 ++++++++++++++++--------
>> > python/qemu/qmp/legacy.py | 18 +++++++++++++++---
>> > python/qemu/qmp/protocol.py | 25 ++++++++++++++++++++-----
>> > 3 files changed, 51 insertions(+), 16 deletions(-)
>> >
>> > --
>> > 2.37.0.rc0
>> >
>>
>> For anything that touches python/qemu/qmp/*, may I please ask that you
>> submit them to https://gitlab.com/qemu-project/python-qemu-qmp ?
>>
>
> Ok
>
>>
>> (I'll review them in the meantime on-list just in the interest of
>> moving things along.)
>
>
> I was waiting for a review before updating the patches / moving to python-qemu-qmp.
>
Fair enough - can I kindly ask you to resend, though? My apologies and
Happy New Year!
--js
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept
2023-01-09 21:06 ` John Snow
@ 2023-01-10 7:05 ` Marc-André Lureau
2023-01-10 17:45 ` John Snow
0 siblings, 1 reply; 12+ messages in thread
From: Marc-André Lureau @ 2023-01-10 7:05 UTC (permalink / raw)
To: John Snow
Cc: qemu-devel, Cleber Rosa, Richard Henderson, Daniel Berrange,
Beraldo Leal
Hi John
On Tue, Jan 10, 2023 at 1:06 AM John Snow <jsnow@redhat.com> wrote:
>
> On Mon, Jul 25, 2022 at 7:23 AM Marc-André Lureau
> <marcandre.lureau@gmail.com> wrote:
> >
> > Hi
> >
> > On Fri, Jul 1, 2022 at 2:51 AM John Snow <jsnow@redhat.com> wrote:
> >>
> >> On Thu, Jun 30, 2022 at 8:34 AM <marcandre.lureau@redhat.com> wrote:
> >> >
> >> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >> >
> >> > Hi,
> >> >
> >> > As reported earlier by Richard Henderson ("virgl avocado hang" thread), avocado
> >> > tests may hang when QEMU exits before the QMP connection is established.
> >> >
> >> > v2:
> >> > - use a socketpair() for QMP (instead of async concurrent code from v1) as
> >> > suggested by Daniel Berrange.
> >> > - should not regress (hopefully)
> >> >
> >> > Marc-André Lureau (3):
> >> > python/qmp/protocol: add open_with_socket()
> >> > python/qmp/legacy: make QEMUMonitorProtocol accept a socket
> >> > python/qemu/machine: use socketpair() for QMP by default
> >> >
> >> > python/qemu/machine/machine.py | 24 ++++++++++++++++--------
> >> > python/qemu/qmp/legacy.py | 18 +++++++++++++++---
> >> > python/qemu/qmp/protocol.py | 25 ++++++++++++++++++++-----
> >> > 3 files changed, 51 insertions(+), 16 deletions(-)
> >> >
> >> > --
> >> > 2.37.0.rc0
> >> >
> >>
> >> For anything that touches python/qemu/qmp/*, may I please ask that you
> >> submit them to https://gitlab.com/qemu-project/python-qemu-qmp ?
> >>
> >
> > Ok
> >
> >>
> >> (I'll review them in the meantime on-list just in the interest of
> >> moving things along.)
> >
> >
> > I was waiting for a review before updating the patches / moving to python-qemu-qmp.
> >
>
> Fair enough - can I kindly ask you to resend, though? My apologies and
> Happy New Year!
I am confused, what's the relation between QEMU python/qemu/qmp and
https://gitlab.com/qemu-project/python-qemu-qmp ?
When / how is the code sync ?
--
Marc-André Lureau
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept
2023-01-10 7:05 ` Marc-André Lureau
@ 2023-01-10 17:45 ` John Snow
2023-01-11 19:44 ` John Snow
0 siblings, 1 reply; 12+ messages in thread
From: John Snow @ 2023-01-10 17:45 UTC (permalink / raw)
To: Marc-André Lureau
Cc: qemu-devel, Cleber Rosa, Richard Henderson, Daniel Berrange,
Beraldo Leal
On Tue, Jan 10, 2023 at 2:05 AM Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
>
> Hi John
>
> On Tue, Jan 10, 2023 at 1:06 AM John Snow <jsnow@redhat.com> wrote:
> >
> > On Mon, Jul 25, 2022 at 7:23 AM Marc-André Lureau
> > <marcandre.lureau@gmail.com> wrote:
> > >
> > > Hi
> > >
> > > On Fri, Jul 1, 2022 at 2:51 AM John Snow <jsnow@redhat.com> wrote:
> > >>
> > >> On Thu, Jun 30, 2022 at 8:34 AM <marcandre.lureau@redhat.com> wrote:
> > >> >
> > >> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> > >> >
> > >> > Hi,
> > >> >
> > >> > As reported earlier by Richard Henderson ("virgl avocado hang" thread), avocado
> > >> > tests may hang when QEMU exits before the QMP connection is established.
> > >> >
> > >> > v2:
> > >> > - use a socketpair() for QMP (instead of async concurrent code from v1) as
> > >> > suggested by Daniel Berrange.
> > >> > - should not regress (hopefully)
> > >> >
> > >> > Marc-André Lureau (3):
> > >> > python/qmp/protocol: add open_with_socket()
> > >> > python/qmp/legacy: make QEMUMonitorProtocol accept a socket
> > >> > python/qemu/machine: use socketpair() for QMP by default
> > >> >
> > >> > python/qemu/machine/machine.py | 24 ++++++++++++++++--------
> > >> > python/qemu/qmp/legacy.py | 18 +++++++++++++++---
> > >> > python/qemu/qmp/protocol.py | 25 ++++++++++++++++++++-----
> > >> > 3 files changed, 51 insertions(+), 16 deletions(-)
> > >> >
> > >> > --
> > >> > 2.37.0.rc0
> > >> >
> > >>
> > >> For anything that touches python/qemu/qmp/*, may I please ask that you
> > >> submit them to https://gitlab.com/qemu-project/python-qemu-qmp ?
> > >>
> > >
> > > Ok
> > >
> > >>
> > >> (I'll review them in the meantime on-list just in the interest of
> > >> moving things along.)
> > >
> > >
> > > I was waiting for a review before updating the patches / moving to python-qemu-qmp.
> > >
> >
> > Fair enough - can I kindly ask you to resend, though? My apologies and
> > Happy New Year!
>
> I am confused, what's the relation between QEMU python/qemu/qmp and
> https://gitlab.com/qemu-project/python-qemu-qmp ?
>
> When / how is the code sync ?
>
python-qemu-qmp supersedes the code that is in qemu.git.
qemu.git/python/qemu/qmp is scheduled to be deleted, but there are
changes that need to go in to configure etc to support the deletion
first, and I've been backlogged/waylaid on making those changes.
--js
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept
2023-01-10 17:45 ` John Snow
@ 2023-01-11 19:44 ` John Snow
0 siblings, 0 replies; 12+ messages in thread
From: John Snow @ 2023-01-11 19:44 UTC (permalink / raw)
To: Marc-André Lureau
Cc: qemu-devel, Cleber Rosa, Richard Henderson, Daniel Berrange,
Beraldo Leal
On Tue, Jan 10, 2023 at 12:45 PM John Snow <jsnow@redhat.com> wrote:
>
> On Tue, Jan 10, 2023 at 2:05 AM Marc-André Lureau
> <marcandre.lureau@gmail.com> wrote:
> >
> > Hi John
> >
> > On Tue, Jan 10, 2023 at 1:06 AM John Snow <jsnow@redhat.com> wrote:
> > >
> > > On Mon, Jul 25, 2022 at 7:23 AM Marc-André Lureau
> > > <marcandre.lureau@gmail.com> wrote:
> > > >
> > > > Hi
> > > >
> > > > On Fri, Jul 1, 2022 at 2:51 AM John Snow <jsnow@redhat.com> wrote:
> > > >>
> > > >> On Thu, Jun 30, 2022 at 8:34 AM <marcandre.lureau@redhat.com> wrote:
> > > >> >
> > > >> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> > > >> >
> > > >> > Hi,
> > > >> >
> > > >> > As reported earlier by Richard Henderson ("virgl avocado hang" thread), avocado
> > > >> > tests may hang when QEMU exits before the QMP connection is established.
> > > >> >
> > > >> > v2:
> > > >> > - use a socketpair() for QMP (instead of async concurrent code from v1) as
> > > >> > suggested by Daniel Berrange.
> > > >> > - should not regress (hopefully)
> > > >> >
> > > >> > Marc-André Lureau (3):
> > > >> > python/qmp/protocol: add open_with_socket()
> > > >> > python/qmp/legacy: make QEMUMonitorProtocol accept a socket
> > > >> > python/qemu/machine: use socketpair() for QMP by default
> > > >> >
> > > >> > python/qemu/machine/machine.py | 24 ++++++++++++++++--------
> > > >> > python/qemu/qmp/legacy.py | 18 +++++++++++++++---
> > > >> > python/qemu/qmp/protocol.py | 25 ++++++++++++++++++++-----
> > > >> > 3 files changed, 51 insertions(+), 16 deletions(-)
> > > >> >
> > > >> > --
> > > >> > 2.37.0.rc0
> > > >> >
> > > >>
> > > >> For anything that touches python/qemu/qmp/*, may I please ask that you
> > > >> submit them to https://gitlab.com/qemu-project/python-qemu-qmp ?
> > > >>
> > > >
> > > > Ok
> > > >
> > > >>
> > > >> (I'll review them in the meantime on-list just in the interest of
> > > >> moving things along.)
> > > >
> > > >
> > > > I was waiting for a review before updating the patches / moving to python-qemu-qmp.
> > > >
> > >
> > > Fair enough - can I kindly ask you to resend, though? My apologies and
> > > Happy New Year!
> >
> > I am confused, what's the relation between QEMU python/qemu/qmp and
> > https://gitlab.com/qemu-project/python-qemu-qmp ?
> >
> > When / how is the code sync ?
> >
>
> python-qemu-qmp supersedes the code that is in qemu.git.
> qemu.git/python/qemu/qmp is scheduled to be deleted, but there are
> changes that need to go in to configure etc to support the deletion
> first, and I've been backlogged/waylaid on making those changes.
... by which I mean, I generally do review and merge on the standalone
repo first, then backport to qemu.git. Or, that's what I'd prefer to
do, since the tooling and testing is more advanced on the standalone
repo.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-01-11 19:45 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 12:34 [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept marcandre.lureau
2022-06-30 12:34 ` [PATCH v2 1/3] python/qmp/protocol: add open_with_socket() marcandre.lureau
2022-06-30 12:34 ` [PATCH v2 2/3] python/qmp/legacy: make QEMUMonitorProtocol accept a socket marcandre.lureau
2022-06-30 12:34 ` [PATCH v2 3/3] python/qemu/machine: use socketpair() for QMP by default marcandre.lureau
2022-07-25 11:29 ` Daniel P. Berrangé
2022-06-30 22:49 ` [PATCH v2 0/3] python/qemu/machine: fix potential hang in QMP accept John Snow
2022-07-25 11:23 ` Marc-André Lureau
2022-07-25 11:27 ` Daniel P. Berrangé
2023-01-09 21:06 ` John Snow
2023-01-10 7:05 ` Marc-André Lureau
2023-01-10 17:45 ` John Snow
2023-01-11 19:44 ` John Snow
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.