Skip to content

Python: Fix qmp race condition on accept()

John Snow qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10python/aqmp: add _session_guard()python/qemu/aqmp/protocol.py+62 -271 reply
2/10python/aqmp: rename 'accept()' to 'start_server_and_accept()'python/qemu/aqmp/legacy.py python/qemu/aqmp/protocol.py python/tests/protocol.py+17 -151 reply
3/10python/aqmp: remove _new_session and _establish_connectionpython/qemu/aqmp/protocol.py python/tests/protocol.py+53 -741 reply
4/10python/aqmp: split _client_connected_cb() out as _incoming()python/qemu/aqmp/protocol.py+58 -251 reply
5/10python/aqmp: squelch pylint warning for too many linespython/qemu/aqmp/protocol.py+3 -01 reply
6/10python/aqmp: refactor _do_accept() into two distinct stepspython/qemu/aqmp/protocol.py python/tests/protocol.py+26 -71 reply
7/10python/aqmp: stop the server during disconnect()python/qemu/aqmp/protocol.py+5 -11 reply
8/10python/aqmp: add start_server() and accept() methodspython/qemu/aqmp/protocol.py python/tests/protocol.py+69 -51 reply
9/10python/aqmp: fix race condition in legacy.pypython/qemu/aqmp/legacy.py+2 -52 replies
10/10python/aqmp: drop _bind_hack()python/qemu/aqmp/legacy.py python/qemu/aqmp/protocol.py+4 -391 reply

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDaniel P. BerrangéKevin Wolf
SeriesA-b
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/10] Python: Fix qmp race condition on accept()

GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-aqmp-accept-changes
CI: https://gitlab.com/jsnow/qemu/-/pipelines/479795153

This redesigns the async QMP interface to allow for race-free connections from the synchronous interface. It should hopefully address the race conditions Peter has been seeing on the NetBSD vm tests.

John Snow (10):
python/aqmp: add _session_guard()
python/aqmp: rename 'accept()' to 'start_server_and_accept()' python/aqmp: remove _new_session and _establish_connection python/aqmp: split _client_connected_cb() out as _incoming() python/aqmp: squelch pylint warning for too many lines python/aqmp: refactor _do_accept() into two distinct steps python/aqmp: stop the server during disconnect() python/aqmp: add start_server() and accept() methods python/aqmp: fix race condition in legacy.py python/aqmp: drop _bind_hack()

 python/qemu/aqmp/legacy.py   |   7 +-
 python/qemu/aqmp/protocol.py | 393 +++++++++++++++++++++--------------
 python/tests/protocol.py     |  45 ++--
 3 files changed, 273 insertions(+), 172 deletions(-)
Signature · 1 line
2.34.1