Skip to content

Disable RIO 2-only JVM heap args on RIO 1#19

Merged
nlaverdure merged 1 commit into
mainfrom
fix/rio1-jvm-oom
Jul 1, 2026
Merged

Disable RIO 2-only JVM heap args on RIO 1#19
nlaverdure merged 1 commit into
mainfrom
fix/rio1-jvm-oom

Conversation

@nlaverdure

Copy link
Copy Markdown
Member

Summary

  • Commenting out -Xmx100M, -Xms100M, and -XX:+AlwaysPreTouch JVM args that were causing a fatal OOM crash loop on the RoboRIO 1
  • The existing comment in build.gradle already warned these should only be used on the RIO 2 — this enforces that intent
  • -XX:+AlwaysPreTouch commits the full 100MB heap at JVM startup; combined with OS/HAL overhead on the RIO 1's 256MB RAM, the JVM crashes immediately, the watchdog restarts it, and multiple dying instances pile up until all memory is gone

Test plan

  • Deploy to RoboRIO 1 and confirm robot code starts without OOM errors
  • Verify no regression in robot behavior / loop timing
  • If deploying to a RoboRIO 2, re-enable the commented lines for better GC performance

🤖 Generated with Claude Code

100MB heap + AlwaysPreTouch caused an OOM crash loop on the RoboRIO 1
(256MB RAM), where the watchdog kept restarting a dying JVM until memory
was fully exhausted. Comment out -Xmx/-Xms/-XX:+AlwaysPreTouch per the
existing warning in build.gradle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nlaverdure nlaverdure merged commit e8ea8d3 into main Jul 1, 2026
2 checks passed
@nlaverdure nlaverdure deleted the fix/rio1-jvm-oom branch July 1, 2026 00:31
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.

1 participant