Our robot is consistently failing with an insufficient memory error. We are using the same base code base as the last two last years, just upgraded to WPI Lib 2024, Phoenix 6, and RevLib v2024.2.1. With just our Swerve Drive Subsystem enabled, our code errors out every time with an insufficient memory error immediately after robotInit()
finishes. The robot then proceeds to reboot.
I tried to get a core dump by doing the following these instructions by @Peter_Johnson shown here:
ssh into robot
/usr/local/frc/bin/frcKillRobot.sh -t
ulimit -c unlimited
./robotCommand
The program ran and ended with:
16:55:38.089 INFO frc.team3838.robot.Robot : ~ ROBOT BOOT UP COMPLETED ~
OpenJDK Client VM warning: INFO: os::commit_memory(0xb04b6000, 3391488, 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 3391488 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /home/lvuser/hs_err_pid2404.log
But it failed to create a core dump. Iāve attached the hs_err_pid
log below. Iāve tried several times to get a core dump, but it always ends the same way.
Iāll also note that occasionally we get the error
terminate called after throwing an instance of 'std::system_error'
what(): Resource temporarily unavailable
and sometimes
terminate called after throwing an instance of 'std::system_error'
what(): Resource temporarily unavailable
In both cases the code terminates.
We are getting these insufficient memory errors on two different robots (our test bot and competition bot). As I mentioned, this is the same code base weāve used for years. And currently we have no other Subsystems other than the Drivetrain. So the main differences are new lib versions, and using Java 17.
hs_err_pid2404.zip (11.1 KB)
Our versions:
DS: 24.0.1
RIO: FRC_roboRIO_2024_v2.2
Lib: Java 2024.2.1
Pigeon 2: 24.1.0.0 (Phoenix 6)
PCM: 1.65 (Phoenix 5)
CANCoder vers. H: 24.1.0.0 (Phoenix 6)
RevLib: 2024.2.1
Any help is appreciated.