fix(cloudxr): start runtime with spawn context - #263
Open
WilliamK112 wants to merge 1 commit into
Open
Conversation
WilliamK112
force-pushed
the
codex/avoid-runtime-fork
branch
from
July 2, 2026 02:46
919a3a6 to
0004716
Compare
WilliamK112
marked this pull request as ready for review
July 2, 2026 02:48
WilliamK112
force-pushed
the
codex/avoid-runtime-fork
branch
from
August 12, 2026 05:36
0004716 to
c53795e
Compare
Author
|
Refreshed this PR onto current |
Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
WilliamK112
force-pushed
the
codex/avoid-runtime-fork
branch
from
August 13, 2026 15:30
c53795e to
ad812f6
Compare
Author
|
Refreshed onto current |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
spawnmultiprocessing context instead of the platform-default fork contextmultiprocessing.Processhandle contract used by readiness polling andterminate_or_kill_runtimeRationale
Issue #40 calls out that the current
multiprocessing.Process(target=runtime_run)path can fork from inside an already-running asyncio event loop. Usingspawnstarts the runtime in a fresh interpreter, avoiding inherited asyncio lock and signal-handler state while keeping the current readiness and cleanup APIs intact.Fixes #40
Validation
Refreshed onto current
NVIDIA/xr-ai@6de6ca73cec931c5833fe7c418fb30e1df5b4172; GitHub reportsbehind_by: 0,ahead_by: 1.pytest -q tests/test_cloudxr_runtime_process.py tests/test_cloudxr_service_layout.py— 4 passedgit diff --check upstream/main...HEAD— passedThe unit test imports the runtime from its current
services/cloudxr-runtimelocation and replaces the platform-specific Isaac Teleop modules with fakes, so this process-launch contract is verified without requiring CloudXR hardware.