Repository navigation
Description
Describe the bug
On Windows, the first Newton physics step of an MJWarp camera task can hang forever while Isaac Lab records the CUDA graph. The main thread blocks in a Warp allocation (cuMemAllocAsync) inside NewtonManager.capture_graph. The GPU goes idle and the process never makes progress.
- Introduced by Capture Newton CUDA graphs without advancing simulation #8058 (
382cbc6, "Capture Newton CUDA graphs without advancing simulation"). We bisectedad82a88..c9a40a1with several runs per commit: the parent2f3998fpassed 10 of 10 smoke runs on two machines, and Capture Newton CUDA graphs without advancing simulation #8058 and later commits hung in 27 of 40. - Fix Windows hangs by warming up Newton before CUDA graph capture #8316 (
1d5a8fc, "Fix Windows hangs by warming up Newton before CUDA graph capture") does not fix it. The eager first step removes MuJoCo-Warp's one-time lazy allocation (_create_inverse_shape_mapping) from the recording. But MuJoCo-Warp also allocates temporary buffers on every step (make_constraint->wp.empty), and those still run inside the recording and hang the same way. Fix Windows hangs by warming up Newton before CUDA graph capture #8316 hung in 8 of 13 runs on Windows. - The camera task with the OVRTX renderer is needed: the physics-only task (
Isaac-Lift-KukaAllegro,presets=newton_mjwarp) did not hang in 3 of 3 runs. OVStage is not needed: withISAAC_LAB_OVRTX_USE_OVSTAGE=0, OVStage's native libraries are not loaded (checked from the process module list: onlyovrtx-dynamic.dllandovrtx.dylib.dll), and 6 of 9 runs hung.
Stack at 1d5a8fc (py-spy, main thread, innermost first):
allocate (warp\_src\context.py:5044)
_init_new (warp\_src\types.py:3901)
__init__ (warp\_src\types.py:3418)
empty (warp\_src\context.py:9869)
make_constraint (mujoco_warp\_src\constraint.py:4873)
fwd_position (mujoco_warp\_src\forward.py:668)
forward (mujoco_warp\_src\forward.py:1349)
step (mujoco_warp\_src\forward.py:1371)
_mujoco_warp_step (solvers\mujoco\solver_mujoco.py:4153)
step (solvers\mujoco\solver_mujoco.py:4176)
_step_solver (isaaclab_newton\physics\newton_manager.py:1531)
_run_solver_substeps (isaaclab_newton\physics\newton_manager.py:1680)
_simulate_physics_only (isaaclab_newton\physics\newton_manager.py:1757)
capture_graph (isaaclab_newton\physics\newton_manager.py:269)
_capture_graph (isaaclab_newton\physics\newton_manager.py:1661)
step (isaaclab_newton\physics\newton_manager.py:761)
step (isaaclab\sim\simulation_context.py:584)
Stack at 382cbc6 (#8058): the same path, but stuck in _convert_contacts_to_mjwarp -> _create_inverse_shape_mapping -> wp.full -> allocate.
The same per-step allocations were already inside the recorded graph before #8058 without hanging. So another part of #8058 probably matters too, for example its replacement of the relaxed external capture on a dedicated non-blocking stream with wp.ScopedCapture. We have not isolated this.
Steps to reproduce
git checkout 1d5a8fce0eb3fdf2ba4eb0f5a441c61794c3fed1
uv sync --frozen
# OVRTX 0.6.0 / OVStage 0.3.0 Python packages and native libraries on the path (see note below)
$env:ISAAC_LAB_OVRTX_USE_OVSTAGE = '0'
$env:ISAAC_LAB_OVRTX_READ_GPU_TRANSFORMS = '1'
python -m isaaclab.benchmark.entrypoints.runtime --task Isaac-Lift-KukaAllegro-Camera --num_envs 8192 `
--num_steps 3 --warmup_steps 3 --seed 42 --device cuda:0 `
presets=newton_mjwarp,ovrtx,single_camera,simple_shading_full_mdl64A good run finishes in 0.5 to 1.5 minutes. A hung run prints [INFO]: Completed setting up the environment... and then nothing more. Run it several times: the hang is intermittent. ISAAC_LAB_OVRTX_USE_OVSTAGE=1 hangs too.
The attached zip contains a PowerShell script that automates the runs, classifies each one from a py-spy stack and records the loaded OVRTX/OVStage DLLs, plus logs and stacks from all runs.
Note: we reproduced this with OVRTX 0.6.0 / OVStage 0.3.0 built from source. We have not tried the versions in uv.lock (ovrtx 0.5.0.377615, ovstage 0.2.0.377349).
System Info
- Commit:
1d5a8fc(also382cbc6and every later commit we tested, up toc9a40a1) - Isaac Sim Version: not used (kitless Isaac Lab with OVRTX)
- OS: Windows 11 Enterprise 10.0.26200
- GPU: RTX 6000 Ada (driver 596.72); also L40 (driver 596.86)
- CUDA: from
uv.lock(torch 2.12.0+cu130, warp-lang 1.17.0, mujoco-warp 3.12.0) - GPU Driver: 596.72 and 596.86
Additional context
- One full benchmark on Linux (L40, driver 595.91.07) at
c9a40a1did not hang. - A workaround that ran one physics step eagerly before every capture let the camera smoke step pass once at
c9a40a1. Per-step allocations stay inside the recording, so this is not expected to be reliable.
Checklist
- I have checked that there is no similar issue in the repo (required)
- I have checked that the issue is not in running Isaac Sim itself and is related to the repo
Acceptance Criteria
-
Isaac-Lift-KukaAllegro-Camerawithpresets=newton_mjwarp,ovrtx,...passes repeated runs on Windows without hanging in Newton graph capture - No Warp allocation happens inside the Newton graph recording on Windows, or capture uses a mode that tolerates it
Activity
egolubev-nvda commentedon Oct 6, 2026
repro-newton-graph-capture-hang-v4.zip
RandomOakForest commentedon Oct 7, 2026
Thank you for posting this. Is it possible to update to v3.0.0 EA (ae37b02)? However, it seems those commits you used should be good enough. The team is reviewing this. Thank you.
shi-eric commentedon Oct 9, 2026
Our traces point to a Windows CUDA driver bug in virtual-address placement. An early allocation-only capture avoided the hang in our tests and looks like a practical workaround.
What we found
We reproduced the hang on an A40 running Windows 11 build 26100, WDDM, driver 595.97, at Isaac Lab
1d5a8fc, with Warp 1.17.0 and the public OVRTX0.5.0.377615/ OVStage0.2.0.377349packages. The reporter’s source builds are not required.The first captured allocation reserves a graph-memory virtual-address range, observed here as 96 GiB. This is an address reservation, not physical GPU memory consumption. An earlier managed allocation from OVStage/Cubric initializes UVM-Lite. If graphics reservations occupy CUDA’s candidate address, the driver retries placement 2 MiB higher each time. Each failed attempt takes 1 to 3.8 seconds of kernel CPU time to release its UVM-Lite reservation. The GPU stays idle while the CPU works through this loop.
We reproduced the same stall using only CUDA Python bindings and ctypes, without Warp or a renderer: one managed allocation, a GPU address reservation outside CUDA, then one captured 32 KiB
cuMemAllocAsync. A 16 MiB obstacle caused a 15 to 18 second stall in 14 of 18 fresh processes. The other four placed the range elsewhere. Without managed memory, the same obstacle took about 1 ms. An early captured allocation also avoided the stall.The internal reservation failure is inferred from these experiments; we have not identified the exact renderer allocation occupying the range.
Why the eager warm-up did not help
Eager allocations use the ordinary pool; captured allocations create graph-owned memory nodes, as described in the CUDA Driver API. Warming up physics eagerly leaves the first graph-memory reservation until capture.
#8058 moved kitless capture from environment creation to the first physics step, after the conflicting reservations appear. The previous kitless path already used standard
wp.ScopedCapture.A fresh nonblocking stream still hung. With OVStage,
ISAAC_LAB_OVRTX_READ_GPU_TRANSFORMS=0also hung in both tested runs because the managed allocation remained. Disabling Warp’s memory pool causes captured allocations to fail.Recommended workaround
Capture one tiny allocation during startup, before creating the environment, OVStage, and renderer:
Call it once per simulation CUDA device, outside any existing capture, and keep Warp’s memory pool enabled. It requires no graph replay and does not advance physics. On the tested driver, later captures reused the range after the warm-up graph was discarded.
Validation and limits
Interleaved fresh-process runs of the original 8,192-environment camera benchmark gave:
gym.make, before environment creationThe traces showed no new range-placement attempt during physics capture in any warm-up run. We recommend the earlier placement because it precedes managed-memory initialization and graphics reservations.
Validation so far covers this A40 and the short smoke benchmark. We have not tested v3.0.0 EA (
ae37b02), the reporter’s RTX 6000 Ada/L40, or long training and recapture. Later creation of CUDA contexts, pools, or additional address windows could encounter the same driver path.The early capture should be validated on the affected systems. A CUDA driver bug report using the reduced reproducer is the appropriate follow-up for addressing the underlying behavior.
Add Windows CUDA graph-capture hang repro tools
Reserve CUDA graph memory when the simulation context is created (isa…