Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fortify AWB Out of Memory Opening FPR File

Tags:

jvm

fortify

When opening an FPR file, Fortify AWB is running out of memory. The java process climbs to about 1150mb before it plateaus and then the error message is displayed. I have tried setting AWB_VM_OPTS and SCA_VM_OPTS to -Xmx4G but the amount of memory allocated doesn't seem to change.

What can be done to increase the amount of allocated memory?

like image 894
user1 Avatar asked Sep 02 '25 09:09

user1


2 Answers

When running SCA, the amount of physical RAM required is dependent on a number of factors. These factors, which include the size and complexity of the source file, make it impossible to quantify and provide guidance -- each situation is unique. If you do encounter a low memory error, increasing the amount of memory available to SCA may resolve the problem.

By default, SCA uses up to 600 MB of memory. If this is not sufficient to analyze a particular code base, you might have to provide more memory in the scan phase. This can be done by passing the -Xmx option to the sourceanalyzer command.

For example, to make 1000 MB available to SCA, include the option -Xmx1000M. You can also use the SCA_VM_OPTS environment variable to set the memory allocation.

Do not allocate more memory for SCA than the machine has available, because this will degrade performance. As a guideline, assuming that no other memory-intensive processes are running, do not allocate more than 2/3 of the available physical memory.

If memory problems persist, set the Windows paging file to a fixed amount of about 1.5 times the amount of hardware RAM on your computer. Go to System Properties, Select Performance Settings. Then under the Advanced tab, note the “Total paging file size for all drives.” That amount should match the amount of hardware RAM in your computer. Push the Change button; un-check “Automatically manage paging file size for all drives.” Select the “Custom size” option and enter a value 1.5 times the size of RAM in your computer as the “Initial size” and the “Maximum size.”

like image 97
WaltHouser Avatar answered Sep 05 '25 01:09

WaltHouser


We got around this problem by opening the file C:\Program Files\Fortify\Fortify_SCA_and_Apps_20.1.0\bin\auditworkbench.cmd and adding this to the end of the "call" command:

-Xmx10G -64

So, afterwards, our line looks like this:

call "%~dp0\..\Core\private-bin\awb\productlaunch.cmd" -showSplash platform:/base/plugins/com.fortify.awb.app/splash.bmp -application com.fortify.awb.app.Main -product com.fortify.awb.app.MainProduct "-Dosgi.splashPath=platform:/base/plugins/com.fortify.awb.app" %* -Xmx10G -64
like image 23
Mike Gledhill Avatar answered Sep 05 '25 00:09

Mike Gledhill