java.lang.OutOfMemoryError: Java heap space

Hi team,

We are facing the same issue with Sonar scanning. Kindly check and advice. tried with SONAR_SCANNER_JAVA_OPTS: “-Xmx6g”. Not worked. Please check and assist on the same

04:31:41.749 INFO Sensor PythonSecuritySensor \[security\] (done) | time=4162ms
04:31:41.776 INFO ------------- Run sensors on project
04:31:41.941 INFO Sensor JsSecuritySensorV2 \[jasmin\]
04:31:41.993 INFO 63 file(s) will be analysed by SonarJasmin.
04:31:47.296 INFO Analysis progress: 9% (6/63 files)
04:31:47.300 INFO Analysis progress: 19% (12/63 files)
04:31:47.300 INFO Analysis progress: 28% (18/63 files)
04:31:47.303 INFO Analysis progress: 38% (24/63 files)
04:31:47.307 INFO Analysis progress: 47% (30/63 files)
04:31:47.311 INFO Analysis progress: 57% (36/63 files)
04:31:47.314 INFO Analysis progress: 66% (42/63 files)
##\[error\]04:45:03.379 ERROR \[stderr\] java.lang.OutOfMemoryError: Java heap space
04:45:03.379 ERROR \[stderr\] java.lang.OutOfMemoryError: Java heap space
##\[error\]04:45:03.381 ERROR \[stderr\] at scala.collection.immutable.BitmapIndexedSetNode.copyAndInsertValue(HashSet.scala:801)
04:45:03.381 ERROR \[stderr\] at scala.collection.immutable.BitmapIndexedSetNode.updated(HashSet.scala:518)
04:45:03.381 ERROR \[stderr\] at scala.collection.immutable.HashSet.incl(HashSet.scala:83)
04:45:03.381 ERROR \[stderr\] at scala.collection.immutable.Set$Set4.incl(Set.scala:46)
04:45:03.381 ERROR \[stderr\] at scala.collection.immutable.BitmapIndexedSetNode.copyAndInsertValue(HashSet.scala:801)
04:45:03.381 ERROR \[stderr\] at scala.collection.immutable.BitmapIndexedSetNode.updated(HashSet.scala:518)
04:45:03.381 ERROR \[stderr\] at scala.collection.immutable.HashSet.incl(HashSet.scala:83)
04:45:03.381 ERROR \[stderr\] at scala.collection.immutable.Set$Set4.incl(Set.scala:46)
##\[error\]04:45:03.382 ERROR \[stderr\] at scala.collection.immutable.Set$Set4.incl(Set.scala:295)

Hi,

Do you have room to try bumping that up any further? Can you try 8g?

 
Ann

Hi Team,
We are still facing the issue with the scanner memory (JsSecuritySensorV2 [jasmin] ) . Kindly check and advice .

Thanks

08:14:08.323 INFO Sensor JsSecuritySensorV2 [jasmin]
08:14:08.375 INFO 65 file(s) will be analysed by SonarJasmin.
08:14:13.661 INFO Analysis progress: 9% (6/65 files)
08:14:13.664 INFO Analysis progress: 18% (12/65 files)
08:14:13.666 INFO Analysis progress: 27% (18/65 files)
08:14:13.670 INFO Analysis progress: 36% (24/65 files)
08:14:13.677 INFO Analysis progress: 46% (30/65 files)
08:14:13.678 INFO Analysis progress: 55% (36/65 files)
08:14:13.685 INFO Analysis progress: 64% (42/65 files)

Hi Team,
We are still facing the issue with the scanner memory (JsSecuritySensorV2 [jasmin] ) . Kindly check and advice .

Thanks

08:14:08.323 INFO Sensor JsSecuritySensorV2 [jasmin]
08:14:08.375 INFO 65 file(s) will be analysed by SonarJasmin.
08:14:13.661 INFO Analysis progress: 9% (6/65 files)
08:14:13.664 INFO Analysis progress: 18% (12/65 files)
08:14:13.666 INFO Analysis progress: 27% (18/65 files)
08:14:13.670 INFO Analysis progress: 36% (24/65 files)
08:14:13.677 INFO Analysis progress: 46% (30/65 files)
08:14:13.678 INFO Analysis progress: 55% (36/65 files)
08:14:13.685 INFO Analysis progress: 64% (42/65 files)

Hi,

I’ve consolidated your post from the other thread here because it’s less relevant there. Please don’t post the same content across multiple threads. Doing so does not move you up the priority list.

Now, back to my previous question:

Also, what version of SonarQube are you using? You can check the page footer if you’re not sure.

 
Ann

Starting: SonarCloudPrepare

Task : Prepare Analysis Configuration

Description : Prepare SonarQube Cloud analysis configuration
Version : 3.4.3
Author : sonarsource
Help : More Information

[INFO] SonarQube Cloud: Server version: 8.0.0.86098

Hi,

So it looks like you’re on SonarQube Cloud. I’ll re-file this in that category.

Can you provide a full analysis log from your most recent run?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Thx,
Ann

log.txt (42.8 KB)

Hi,

Thanks for the log. This shouldn’t have an impact, but it looks like you’re using a stale version of the action. You might consider upgrading that.

I’ve flagged this for the team. And in the meanwhile, could you add sonar.verbose=true to your action properties and provide that new, debug log, redacted as necessary?

 
Thx,
Ann

log.txt (735.2 KB)

Hi @Thamulansar, can you try scanning your project again and see whether the problem persists? We have recently released a fix (on SQC) that addresses your issue.