WPIRoboticsProjects / GRIP

Program for rapidly developing computer vision applications
http://wpiroboticsprojects.github.io/GRIP
Other
379 stars 107 forks source link

OutOfMemory Errors #506

Closed robert1356 closed 7 years ago

robert1356 commented 8 years ago

Ever since upgrading to 1.2, I am have extreme trouble getting GRIP to run stable. I has some problems under 1.1.1. Essentially, I am getting out of memory or our of space errors. The out of space errors generally come because the out of memory error causes either GRIP or robot code to core dump and the core dump take up all the disk space on the roborio.

My process in the robot code: RobotCode runs I check a radio button in the chooser if it is set to RUN - launch GRIP from the robot code if it is set to STOP - run the gripkill script (1st two lines from your run grip script from v1.2)

I have attached: the riolog trace the hs_err file specified by the OOM exception the grip project we're using

GRIP OOM erro - riolog.txt

replay_pid10034.log.txt findTargets.grip.txt

ThomasJClark commented 8 years ago

Set your JVM Arguments to -Xmx50m -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError.

robert1356 commented 8 years ago

That is already being done. It's in the launch script. See the riolog.txt file

robert1356 commented 8 years ago

Another example with a simpler project and this includes hs_err and replay_pid

hs_err_pid3230.log.txt replay_pid3230.log.txt

robert1356 commented 8 years ago

publishResizedVideo.grip.txt

Sn3akyP3t3 commented 8 years ago

Adobe ColdFusion uses the JVM and has excellent documentation over the years on JVM tuning and also identifying memory leaks. While the tutorials are geared for the ColdFusion Markup Language, CFML, its bound to have some helpful tips to aid the FRC developers and GRIP maintainers to identify problems and tuning their JVM for their needs or setting a baseline.

http://www.adobe.com/devnet/coldfusion/articles/coldfusion_performance.html

Be careful when changing the Garbage Collector, GC, settings. The GC process is a stop the world process meaning that during the GC run it no longer responds to external requests until it completes. See some basic information and deep dive as well at https://plumbr.eu/handbook/what-is-garbage-collection