You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My sonar-scanner analysis fails with "Java heap space" with F90 or F77 in the calltrace while there's no fortran at all in my code.
Our IT recently upgraded to sonarqube 7.9.5, and I had to upgrade my sonar-scanner from 3.2.0.1227 to 4.5.0.2216 to get it to work (Java was too old in sonar-scanner 3.2). First I got the following backtrace (full log at the end of https://ci.inria.fr/hwloc/job/extended/job/master/285/execution/node/418/log/)
12:35:44.178 ERROR: Error during SonarScanner execution
java.lang.OutOfMemoryError: Java heap space
at fr.cnes.icode.fortran90.rules.F90DATAConstantFloat.zzUnpackCMap(F90DATAConstantFloat.java:364)
at fr.cnes.icode.fortran90.rules.F90DATAConstantFloat.<clinit>(F90DATAConstantFloat.java:77)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at fr.cnes.icode.data.xml.XmlHandler.classFromString(XmlHandler.java:87)
at fr.cnes.icode.data.xml.XmlHandler.unmarshal(XmlHandler.java:53)
at fr.cnes.icode.data.CheckersDefinition.addFromResources(CheckersDefinition.java:108)
at fr.cnes.icode.fortran90.rules.Fortran90RulesDefinition.define(Fortran90RulesDefinition.java:27)
at fr.cnes.icode.data.CheckersDefinition.list(CheckersDefinition.java:45)
at fr.cnes.icode.services.checkers.CheckerService.getCheckers(CheckerService.java:60)
at fr.cnes.icode.services.checkers.CheckerService.getCheckers(CheckerService.java:166)
at fr.cnes.icode.Analyzer.stableCheck(Analyzer.java:91)
at fr.cnes.sonar.plugins.icode.check.ICodeSensor.executeEmbeddedICode(ICodeSensor.java:187)
at fr.cnes.sonar.plugins.icode.check.ICodeSensor.execute(ICodeSensor.java:109)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
java.lang.OutOfMemoryError: Java heap space
at fr.cnes.icode.fortran77.rules.F77ERROpenRead.zzUnpackCMap(F77ERROpenRead.java:431)
at fr.cnes.icode.fortran77.rules.F77ERROpenRead.<clinit>(F77ERROpenRead.java:76)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at fr.cnes.icode.data.xml.XmlHandler.classFromString(XmlHandler.java:87)
at fr.cnes.icode.data.xml.XmlHandler.unmarshal(XmlHandler.java:53)
at fr.cnes.icode.data.CheckersDefinition.addFromResources(CheckersDefinition.java:108)
at fr.cnes.icode.fortran77.rules.Fortran77RulesDefinition.define(Fortran77RulesDefinition.java:27)
at fr.cnes.icode.data.CheckersDefinition.list(CheckersDefinition.java:45)
at fr.cnes.icode.services.checkers.CheckerService.getCheckers(CheckerService.java:60)
at fr.cnes.icode.services.checkers.CheckerService.getCheckers(CheckerService.java:166)
at fr.cnes.icode.Analyzer.stableCheck(Analyzer.java:91)
at fr.cnes.sonar.plugins.icode.check.ICodeSensor.executeEmbeddedICode(ICodeSensor.java:187)
at fr.cnes.sonar.plugins.icode.check.ICodeSensor.execute(ICodeSensor.java:109)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
It looks like further increasing -Xmx helps but I can't allocate the entire VM RAM to Java, or other things will start slowing down or failing.
Since we had no clue what was going on with Fortran, we tried disabling icode shell script analysis too (with sonar.icode.shell.file.suffixes=.noshell) and this helps too. But this seems totally unrelated, I shouldn't need to disable shell checks to avoid Fortran issues :/
Is it expected to see those F90/F77 calls in the calltrace even when there is no Fortran code to analyze? Is this some static initialization that occurs before sonar-scanner finds out there's no Fortran code to analyze?
Are these allocations indeed big? It looks like there are XML files containing F77 and F90 rules, are those big, which could explain the issue?
The text was updated successfully, but these errors were encountered:
Hello
My sonar-scanner analysis fails with "Java heap space" with F90 or F77 in the calltrace while there's no fortran at all in my code.
Our IT recently upgraded to sonarqube 7.9.5, and I had to upgrade my sonar-scanner from 3.2.0.1227 to 4.5.0.2216 to get it to work (Java was too old in sonar-scanner 3.2). First I got the following backtrace (full log at the end of https://ci.inria.fr/hwloc/job/extended/job/master/285/execution/node/418/log/)
This is running in a VM with 2GB of RAM so I added -Xmx1800m and got a slightly different failure (full log at the end of https://ci.inria.fr/hwloc/job/extended/job/master/286/execution/node/430/log/)
It looks like further increasing -Xmx helps but I can't allocate the entire VM RAM to Java, or other things will start slowing down or failing.
Since we had no clue what was going on with Fortran, we tried disabling icode shell script analysis too (with
sonar.icode.shell.file.suffixes=.noshell
) and this helps too. But this seems totally unrelated, I shouldn't need to disable shell checks to avoid Fortran issues :/Is it expected to see those F90/F77 calls in the calltrace even when there is no Fortran code to analyze? Is this some static initialization that occurs before sonar-scanner finds out there's no Fortran code to analyze?
Are these allocations indeed big? It looks like there are XML files containing F77 and F90 rules, are those big, which could explain the issue?
The text was updated successfully, but these errors were encountered: