*Purpose

This fatal error may happen when extension Security for Java launches a Java Virtual Machine with insufficient memory for heap space.

In the analysis log file, you may find the following error message

Analysis log file

2018-06-14 17:26:57.173287 Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] Jun 14, 2018 5:26:57 PM com.castsoftware.castil.exploration.Explorer$1$1 hasNext

2018-06-14 17:26:57.204487 Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] WARNING: Security input analyzer ran out of tracer

2018-06-14 17:26:57.204487 Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] Jun 14, 2018 5:26:57 PM com.castsoftware.castil.exploration.Explorer$1$1 hasNext

2018-06-14 17:26:57.204487 Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] WARNING: Security input analyzer ran out of tracer

2018-06-14 18:10:41.750127 Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

2018-06-14 18:10:41.750127 Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at java.util.Arrays.copyOf(Unknown Source)

2018-06-14 18:10:41.750127 Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at java.util.ArrayList.grow(Unknown Source)

2018-06-14 18:10:41.765727 Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at java.util.ArrayList.ensureExplicitCapacity(Unknown Source)

2018-06-14 18:10:41.765727 Warning MODULMSG ; Job execution [com.castsoftware.securityforjava] at java.util.ArrayList.ensureCapacityInternal(Unknown Source)

For more information, refer to

Observed in CAST Extension
Release
Yes/No
Security for Java-1.0(tick)


Action Plan

The maximum amount of RAM allocated to the Java heap space is defined in file %PROGRAMDATA%\CAST\CAST\Extensions\com.castsoftware.securityforjava.1.0.0-funcrel\main.py at line 124 : it is by default 2048M

commandLine = [
 os.path.join(self.flat_path, "jre", "bin","java"),
 "-Xmx2048M",
 "-jar",
 self.jarPath,
 "-c",
 os.path.join(self.largeStoragePath, "project.xml"),
 "-d",
 self.largeStoragePath
 ]

The action plan consists of tuning the -Xmx argument and the available RAM until the JVM does not run out of memory

  1. Increase the amount of RAM on the machine or VM, and relaunch analysis If this does not solve the problem, proceed to next step
  2. Edit file main.py and increase the -Xmx argument according to the amount of RAM you added during previous step.
  3. Relaunch analysis.
  4. If this does not solve the problem, contact  CAST Technical Support with following Relevant Input.
Notes/comments

 Ticket # 12863

Related Pages