RoboRio Not Enough Memory

We recently updated our RoboRio 1.0 to 2025_v2.0, but when I try to deploy and run code, it gives an error, seemingly because there isn’t enough space.

Blockquote
Warning  44007 3238.856
FRC: Time since robot boot. OpenJDK Client VM warning: INFO: os::commit_memory(0xafd40000, 69992448, 0) failed; error=‘Not enough space’ (errno=12) 
 # 
 # There is insufficient memory for the Java Runtime Environment to continue. 
 # Native memory allocation (mmap) failed to map 69992448 bytes for committing reserved memory. 
 # An error report file with more information is saved as: 
 # /tmp/hs_err_pid11019.log 
 OpenJDK Client VM warning: INFO: os::commit_memory(0xafd40000, 69992448, 0) failed; error=‘Not enough space’ (errno=12) 
 # 
 # There is insufficient memory for the Java Runtime Environment to continue. 
 # Native memory allocation (mmap) failed to map 69992448 bytes for committing reserved memory. 
 # An error report file with more information is saved as: 
 # /tmp/hs_err_pid11104.log 
 OpenJDK Client VM warning: INFO: os::commit_memory(0xafb40000, 69992448, 0) failed; error=‘Not enough space’ (errno=12) 
 # 
 # There is insufficient memory for the Java Runtime Environment to continue. 
 # Native memory allocation (mmap) failed to map 69992448 bytes for committing reserved memory. 
 # An error report file with more information is saved as: 
 # /tmp/hs_err_pid11188.log 
 OpenJDK Client VM warning: INFO: os::commit_memory(0xafd40000, 69992448, 0) failed; error=‘Not enough space’ (errno=12) 
 # 
 # There is insufficient memory for the Java Runtime Environment to continue. 
 # Native memory allocation (mmap) failed to map 69992448 bytes for committing reserved memory. 
 # An error report file with more information is saved as: 
 # /tmp/hs_err_pid11272.log 
 OpenJDK Client VM warning: INFO: os::commit_memory(0xafd40000, 69992448, 0) failed; error=‘Not enough space’ (errno=12) 
 # 
 # There is insufficient memory for the Java Runtime Environment to continue. 
 # Native memory allocation (mmap) failed to map 69992448 bytes for committing reserved memory. 
 # An error report file with more information is saved as: 
 # /tmp/hs_err_pid11356.log 
 OpenJDK Client VM warning: INFO: os::commit_memory(0xafb40000, 69992448, 0) failed; error=‘Not enough space’ (errno=12) 
 # 
 # There is insufficient memory for the Java Runtime Environment to continue. 
 # Native memory allocation (mmap) failed to map 69992448 bytes for committing reserved memory. 
 # An error report file with more information is saved as: 
 # /tmp/hs_err_pid11440.log 
Warning  44004  FRC: The Driver Station has lost communication with the robot.  Driver Station 
Warning  44000  Driver Station not keeping up with protocol rates  Driver Station 
Warning  44000  Driver Station not keeping up with protocol rates  Driver Station

My theory is that it downloaded the 2025 image but without deleting the 2024 image.

How would I fix this?

My team ran into this as well. You have two options, use VisualVM to figure out what’s using too much memory or just upgrade to a RoboRIO 2.0.

Was this error while deploying, or while running the code? If running, does it persist after rebooting the rio? In fact, did you reboot the rio after imaging it?

Maybe some help:

1 Like

Thank you guys for your answers, I really appreciate it!

Running. It deploys and shows “Teleop Disabled”, but prints that error repeatedly.

It does persist, I rebooted the rio and tried it with another RIO 1.0. Same problem.

We do have a Roborio 2.0, and it does work! However, we are trying to make 2 viable robots to work for the game this season, but only 1 operational Roborio 2, so I’m trying to make a RIO 1 work.

I tried this, but got stuck. What am I supposed to put for the Connection number? Will that number they give work? It didn’t work for me.
image

If it happens at runtime and persists reboots, then your code is doing too much for the resources available to the rio1.

If you share a link to your code, we might be able to find some inefficiencies. If not, try deploying a WPILib example project (or empty template project) and see if it still happens (it probably won’t). That will confirm whether its your code or not.

1 Like

On this previously-linked page about Java Garbage Collection there is a section called “Disabling the system web server”. Take a look at that – by far the easiest way to do it is with the roboRIO Team Number Setter tool which you can access from WPI menu in VSCode via the Start Tool item.
Disabling the web server will get you a bit more memory for your code – it may or may not be enough to help.

We ran into this last year. Thankfully disabling the Rio’s built-in web server bought us enough room to keep working.

Other options would be profiling the code to see what’s taking up space, playing around with the JVM settings, or starting to root around on the Rio to see if there’s other things you can disable.

1 Like