Skip to content

fix(ipc): drop stale ring on failed re-registration - #261

Open
WilliamK112 wants to merge 1 commit into
NVIDIA:mainfrom
WilliamK112:codex/fix-ipc-reregister-ring-failure
Open

fix(ipc): drop stale ring on failed re-registration#261
WilliamK112 wants to merge 1 commit into
NVIDIA:mainfrom
WilliamK112:codex/fix-ipc-reregister-ring-failure

Conversation

@WilliamK112

@WilliamK112 WilliamK112 commented Jun 23, 2026

Copy link
Copy Markdown

Summary

  • remove the stale connector ring entry before closing the old ring during re-registration
  • leave the connector without a registered ring if reopening the new shared-memory segment fails, instead of keeping a closed ring in _ring_registry
  • add a regression test for the failed-reopen path that avoids the Windows-incompatible IPC socket fixture

Fixes #209

Validation

  • Rebased onto current NVIDIA/xr-ai@ec4169aa3e3c8a57f1d7f59d3e2d97ad9163a8bb
  • Confirmed IPC hub: connector re-register left bound to closed ring if ShmRingBuffer reopen fails #209 is open/unassigned with no comments, and open PR searches for 209, _ring_registry, and failed re-registration only return this PR
  • uv run pytest -v test_participant_events.py::test_connector_reregistration_open_failure_drops_stale_ring (from tests/) - 1 passed
  • uv run python -m py_compile ..\server-runtime\xr_media_hub\ipc\_hub.py test_participant_events.py (from tests/)
  • uv tool run --from ruff==0.15.16 ruff check server-runtime\xr_media_hub\ipc\_hub.py tests\test_participant_events.py
  • git diff --check origin/main..HEAD

Local environment note: full uv run pytest -v test_participant_events.py on this Windows shell reports the new #209 regression test passing, while the existing four fixture-backed tests error before their test bodies because this local libzmq build does not support the ipc://... transport used by conftest.py.

Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
@WilliamK112
WilliamK112 force-pushed the codex/fix-ipc-reregister-ring-failure branch from cf1dfb1 to f64d414 Compare July 2, 2026 02:59
@WilliamK112
WilliamK112 marked this pull request as ready for review July 2, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IPC hub: connector re-register left bound to closed ring if ShmRingBuffer reopen fails

1 participant