fix(cloudxr): add opt-in to avoid autoTSSkey mapping abort#579
fix(cloudxr): add opt-in to avoid autoTSSkey mapping abort#579nv-mhaselton wants to merge 3 commits into
Conversation
Add NV_CXR_RUNTIME_JOIN_MAIN_THREAD to join the runtime on the main thread instead of a worker thread, avoiding a "Couldn't create autoTSSkey mapping" abort seen on some platforms. Default keeps the original worker-thread behavior.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| # and can run the signal handler. Otherwise Ctrl+C is not processed while we're | ||
| # inside the native nv_cxr_service_join() call. | ||
| def join_then_destroy() -> None: | ||
| join_on_main = os.environ.get("NV_CXR_RUNTIME_JOIN_MAIN_THREAD", "").strip().lower() |
There was a problem hiding this comment.
Do we really need the feature flag here? It will add burdens for users (then our support on educating users) to set the flag accordingly.
Can handle this automatically based on whether we are capable of "Couldn't create autoTSSkey mapping"?
There was a problem hiding this comment.
agreed, this is a draft branch, and the feature flag should not exist to begin with
The runtime is spawned with start_new_session=True, so it isn't killed with the embedding process, and Python does not run atexit handlers on signal-driven termination. A signalled shutdown (e.g. pkill of the embedding streamer) therefore orphaned the runtime, which kept holding the streaming port and made the next start fail with ERROR_STREAMSDK_PORT_UNAVAILABLE. Install SIGTERM/SIGINT handlers in CloudXRLauncher that run stop() (which already killpg's the runtime's process group) and then chain to the previously installed handler so embedding apps keep their own shutdown behavior. No-op off the main thread, where signal handlers can't be set.
Add a --mode {window,xr} flag to camera_viz.py that overrides
display.mode from the YAML, and forward extra args through
camera_viz.sh run, so one config drives both a local window and a
headless XR (CloudXR) run without editing the file.
Fix two `set -o pipefail` bugs in _install_deps.sh that blocked setup:
- the Jetson cuda-nvrtc probe used `find /usr ... | grep -q`, whose
pipeline fails when find hits an unreadable /usr subdir, falsely
flagging cuda-nvrtc as missing even when libnvrtc is present;
- the isaacteleop dist-info probe `ls ... | head -1` aborted the first
full install on a fresh venv (glob matches nothing) before it ran.
Add NV_CXR_RUNTIME_JOIN_MAIN_THREAD to join the runtime on the main thread instead of a worker thread, avoiding a "Couldn't create autoTSSkey mapping" abort seen on some platforms. Default keeps the original worker-thread behavior.