[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/25] python/qmp: remove Server.wait_closed() call for Python 3.1
From: |
John Snow |
Subject: |
[PULL 08/25] python/qmp: remove Server.wait_closed() call for Python 3.12 |
Date: |
Fri, 13 Oct 2023 15:09:23 -0400 |
This patch is a backport from
https://gitlab.com/qemu-project/python-qemu-qmp/-/commit/e03a3334b6a477beb09b293708632f2c06fe9f61
According to Guido in https://github.com/python/cpython/issues/104344 ,
this call was never meant to wait for the server to shut down - that is
handled synchronously - but instead, this waits for all connections to
close. Or, it would have, if it wasn't broken since it was introduced.
3.12 fixes the bug, which now causes a hang in our code. The fix is just
to remove the wait.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-id: 20231006195243.3131140-3-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/qemu/qmp/protocol.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/python/qemu/qmp/protocol.py b/python/qemu/qmp/protocol.py
index 753182131f..a4ffdfad51 100644
--- a/python/qemu/qmp/protocol.py
+++ b/python/qemu/qmp/protocol.py
@@ -495,7 +495,6 @@ async def _stop_server(self) -> None:
try:
self.logger.debug("Stopping server.")
self._server.close()
- await self._server.wait_closed()
self.logger.debug("Server stopped.")
finally:
self._server = None
--
2.41.0
- [PULL 00/25] Python patches, John Snow, 2023/10/13
- [PULL 08/25] python/qmp: remove Server.wait_closed() call for Python 3.12,
John Snow <=
- [PULL 03/25] python/console_socket: accept existing FD in initializer, John Snow, 2023/10/13
- [PULL 02/25] python/machine: close sock_pair in cleanup path, John Snow, 2023/10/13
- [PULL 04/25] python/machine: use socketpair() for console connections, John Snow, 2023/10/13
- [PULL 09/25] configure: fix error message to say Python 3.8, John Snow, 2023/10/13
- [PULL 11/25] python/qemu/qmp/legacy: cmd(): drop cmd_id unused argument, John Snow, 2023/10/13
- [PULL 05/25] python/machine: use socketpair() for qtest connection, John Snow, 2023/10/13
- [PULL 07/25] Python/iotests: Add type hint for nbd module, John Snow, 2023/10/13
- [PULL 06/25] python/machine: remove unused sock_dir argument, John Snow, 2023/10/13
- [PULL 10/25] Python: Enable python3.12 support, John Snow, 2023/10/13
- [PULL 01/25] python/machine: move socket setup out of _base_args property, John Snow, 2023/10/13