When running the analysis in CLI, getting the error INFO perl: out: Out of memory!
ERROR AnalysisPipeline: Analysis failed and java.lang.Exception: Analysis child process failed with exit status 1.
INFO perl: out: Out of memory!
ERROR AnalysisPipeline: Analysis failed
java.lang.Exception: Analysis child process failed with exit status 1
at com.castsoftware.highlight.analyze.Analyze.process(Analyze.java:237)
at com.castsoftware.highlight.AnalysisPipeline.executeAnalysis(AnalysisPipeline.java:194)
at com.castsoftware.highlight.AnalysisPipeline.process(AnalysisPipeline.java:60)
at com.castsoftware.highlight.CommandLine.run(CommandLine.java:530)
at com.castsoftware.highlight.HighlightAutomation.main(HighlightAutomation.java:16)
ERROR console: (4) Command Line analysis error
Usually this error means that the Perl process running inside CAST Highlight’s scanner attempted to allocate memory and the OS refused
Workaround/Action Plan
The issue occurred because less RAM is available on the machine.
To solve
- Ensure that, there is enough RAM available on the machine 32 GB to 64 GB .
- You should generally not analyze more than 10000 files, if there is more split the analysis into smaller scans
- Identify and exclude unnecessary files (good practices for defining scope code scan)exclude any file that is not source code. Binary files do not contribute to the analysis and often just slow down or break parsers, so excluding them is recommended.
- Use the latest version of the CLI
NB : Using the Command Line which is less CPU-consuming is recommended, when analysing large number of files
When using VMs, ensure that you check memory on the same VM where the scan is being executed.
Additional Resources
CAST Highlight Troubleshooting Guides
CAST Highlight Product Documentation
Ticket
44415, 55608, 55691
Comments