Skip to content

Abort Newton runs on physics buffer overflow - #1385

Merged
david-tingdahl-nvidia merged 3 commits into
mainfrom
david-tingdahl-nvidia/fix/newton-buffer-overflow
Oct 20, 2026
Merged

david-tingdahl-nvidia merged 3 commits into
mainfrom
david-tingdahl-nvidia/fix/newton-buffer-overflow

Conversation

@david-tingdahl-nvidia

@david-tingdahl-nvidia david-tingdahl-nvidia commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Why this change?

Reduce risk of unnoticed failures for when using newton physics backend.
Previously, physics-breaking bugs like contact buffer overflow spammed the terminal but did not cause the experiment to abort. Now we trigger an assert as soon as this happens.

What changes?

  • Add always-active buffer monitor that asserts on buffer overflow.
  • Increase Newton contact buffer sizes to accommodate for our largest scenes (17-object clutter)
  • Also added a check at beginning of environment_runner.py to ensure that PhysX is used. The runner doesn't support newton and didn't produce a clear error meassage before.

Validation

  • Verified that experiment aborts on overflow
  • Measured a negligible increase in compute and VRAM (~25MB per env)

@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Adds buffer overflow detection to physics simulation.

The PR appears safe to merge, with non-blocking test portability and integration-coverage improvements recommended.

Findings

  1. P2 CUDA Test Lacks Guard ▶
  2. P2 Manager Integration Is Untested ▶

Summary

The PR adds a persistent Newton buffer monitor to abort runs after detected contact, constraint, or solver-flag overflows. It also raises the Newton buffer capacities and rejects an explicit Newton preset in the interactive PhysX runner. The monitor tests need a CUDA guard and coverage of the manager integration.

Reviews (1) · Last reviewed commit: "Abort Newton runs on physics buffer over..."

@peterd-NV peterd-NV left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good addition to me to expose poorly tuned envs and prevent them from quietly misbehaving. Thanks for adding.

@qianl-nv qianl-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. Left two small nits. Feel free to merge after updating.

@david-tingdahl-nvidia
david-tingdahl-nvidia enabled auto-merge (squash) October 13, 2026 06:54
@david-tingdahl-nvidia
david-tingdahl-nvidia force-pushed the david-tingdahl-nvidia/fix/newton-buffer-overflow branch from 38604b2 to 2afa22a Compare October 13, 2026 06:56
@david-tingdahl-nvidia
david-tingdahl-nvidia merged commit d6699ca into main Oct 20, 2026
12 checks passed
cvolkcvolk added a commit that referenced this pull request Oct 20, 2026
Brings in these PRs from main:

- #1474 Rename config helpers to describe what they build
- #1385 Abort Newton runs on physics buffer overflow
- #1478 Switch agent CI tests to nightly cadence
- #1449 Keep evaluation recorder outputs run-scoped

Signed-off-by: Clemens Volk <[email protected]>
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.

3 participants