SonarJava NullpointerException in AST scan with Java 1.1 libraries

203 views
Skip to first unread message

redru...@gmail.com

unread,
Sep 13, 2017, 10:33:09 AM9/13/17
to SonarQube
Hey there,

We recently upgraded SonarJava from 4.10 to 4.13 and ran into the following analysis error for some projects:

org.sonar.squidbridge.api.AnalysisException: SonarQube is unable to analyze file : 'xyz.java'
[exec] at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:105)
[exec] at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:68)
[exec] at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:119)
[exec] at org.sonar.java.JavaSquid.scan(JavaSquid.java:113)
[exec] at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:84)
[exec] at org.sonar.batch.sensor.SensorWrapper.analyse(SensorWrapper.java:57)
[exec] at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
[exec] at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
[exec] at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83)
[exec] at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192)
[exec] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
[exec] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
[exec] at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241)
[exec] at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236)
[exec] at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226)
[exec] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
[exec] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
[exec] at org.sonar.batch.task.ScanTask.execute(ScanTask.java:47)
[exec] at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
[exec] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
[exec] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
[exec] at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:106)
[exec] at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
[exec] at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[exec] at java.lang.reflect.Method.invoke(Method.java:498)
[exec] at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[exec] at com.sun.proxy.$Proxy0.execute(Unknown Source)
[exec] at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
[exec] at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
[exec] at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
[exec] at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
[exec] at org.sonarsource.scanneINFO: Final Memory: 61M/741M
[exec] INFO: ------------------------------------------------------------------------
[exec] r.cli.Main.main(Main.java:61)
[exec] Caused by: java.lang.NullPointerException
[exec] at org.sonar.java.se.ProgramPoint.<init>(ProgramPoint.java:42)
[exec] at org.sonar.java.se.ProgramPoint.<init>(ProgramPoint.java:34)
[exec] at org.sonar.java.bytecode.se.BytecodeEGWalker.handleBlockExit(BytecodeEGWalker.java:328)
[exec] at org.sonar.java.bytecode.se.BytecodeEGWalker.execute(BytecodeEGWalker.java:141)
[exec] at org.sonar.java.bytecode.se.BytecodeEGWalker.getMethodBehavior(BytecodeEGWalker.java:108)
[exec] at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:77)
[exec] at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:64)
[exec] at org.sonar.java.bytecode.se.BytecodeEGWalker.executeInstruction(BytecodeEGWalker.java:242)
[exec] at org.sonar.java.bytecode.se.BytecodeEGWalker.execute(BytecodeEGWalker.java:138)
[exec] at org.sonar.java.bytecode.se.BytecodeEGWalker.getMethodBehavior(BytecodeEGWalker.java:108)
[exec] at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:77)
[exec] at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:60)
[exec] at org.sonar.java.se.ExplodedGraphWalker.executeMethodInvocation(ExplodedGraphWalker.java:640)
[exec] at org.sonar.java.se.ExplodedGraphWalker.visit(ExplodedGraphWalker.java:512)
[exec] at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:244)
[exec] at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:204)
[exec] at org.sonar.java.se.SymbolicExecutionVisitor.execute(SymbolicExecutionVisitor.java:73)
[exec] at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:81)
[exec] at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:60)
[exec] at org.sonar.java.se.ExplodedGraphWalker.executeMethodInvocation(ExplodedGraphWalker.java:640)
[exec] at org.sonar.java.se.ExplodedGraphWalker.visit(ExplodedGraphWalker.java:512)
[exec] at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:244)
[exec] at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:204)
[exec] at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:196)
[exec] at org.sonar.java.se.SymbolicExecutionVisitor.execute(SymbolicExecutionVisitor.java:77)
[exec] at org.sonar.java.se.SymbolicExecutionVisitor.visitNode(SymbolicExecutionVisitor.java:63)
[exec] at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:95)
[exec] at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:120)
[exec] at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:97)
[exec] at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:120)
[exec] at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:97)
[exec] at org.sonar.java.ast.visitors.SubscriptionVisitor.scanTree(SubscriptionVisitor.java:78)
[exec] at org.sonar.java.ast.visitors.SubscriptionVisitor.scanFile(SubscriptionVisitor.java:64)
[exec] at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:114)
[exec] at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:96)
[exec] ... 34 more

 
I was able to trace it to the use of the commons-lang library in that code. The project itself uses a somewhat up-to-date version of commons-lang, but through transitive dependencies and the way we generate the sonar.properties file for the runner, a commons-lang version 2.1 makes its way into the list of libraries for sonar to use.
If I manually exclude 2.1 from the list, the analysis passes.
commons-lang 2.1 was compiled for Java 1.1. Starting with commons-lang 2.4, it is compiled for Java 1.2 and onward.
Since the analysis passes with 2.4+, it seems to me that the scan is no longer able to correctly handle Java 1.1 bytecode.
As a workaround, I can simply exclude these old commons-lang versions from the analysis.

Long story short: I wanted to clarify if Java 1.1 bytecode is officially no longer supported or if that's a bug that snuck in? I wasn't able to find anything about that in the documentation.

Thanks & cheers,
Sandro

Nicolas Peru

unread,
Sep 13, 2017, 10:47:21 AM9/13/17
to redru...@gmail.com, SonarQube
Hi,

Thanks a lot for reporting this.
The issue seems to be related to bytecode analysis. Now to jump to the conclusion that this is about unsupported version 1.1 is a bit fast. The implementation of dataflow analysis on bytecode was done on a limited set of methods. As per apache commons-lang : Validate#notEmpty Validate#notNull and StringUtils#isEmpty #isNotEmpty #isBlank #isNotBlank

So could you share the piece of code causing the issue (privately eventually) or at least pointing out which one of those method (or any other) from apache commons-lang you are using in the file making the analysis fail ? 
That would help to narrow down the method causing the problem and try to reproduce what is going on and from there determine if it is a problem with instructions from java 1.1 compiler (which I doubt) or, more likely, a not yet supported instruction in our bytecode analyser or (even more likely given the stacktrace) a bug in our CFG built from the bytecode. 

Thanks ! 

Cheers, 

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/b42ac84d-4b31-4dfe-8274-b7c16e76eeea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Nicolas Peru | SonarSource

Vincent Privat

unread,
Sep 14, 2017, 6:25:41 AM9/14/17
to SonarQube
Hi Sandro,
I have the same problem, how did you exclude commons-lang 2.1 from SonarQube classpath? I tried to exclude the jar with sonar.exclusions property, but it's meant for sources, not binaries.
Cheers,
Vincent

Nicolas Peru

unread,
Sep 15, 2017, 4:57:09 AM9/15/17
to Vincent Privat, SonarQube
Hi, 

Thanks for the reporting this. 
Getting this investigated, this is clearly a bug in our CFG construction on bytecode : https://jira.sonarsource.com/browse/SONARJAVA-2461
As this is failing the analysis we plan to deliver next version a bit earlier than what was our plan before. So I am working to fix this one and we'll send a request for feedback containing the fix beginning of next week. 

In the meantime, as a workaround, I can only encourage you to upgrade this library.

Cheers, 

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael Gumowski

unread,
Sep 18, 2017, 11:58:16 AM9/18/17
to Nicolas Peru, Vincent Privat, SonarQube
Hey Vincent, Sandro,

A small message just to tell you that we are starting RFF for SonarJava 4.14, which contains the fix for this.
Feel free to try it here.

Cheers,
Michael


For more options, visit https://groups.google.com/d/optout.
--
Michael Gumowski | SonarSource
Software Developer, Language Team
http://sonarsource.com

redru...@gmail.com

unread,
Sep 19, 2017, 5:39:32 AM9/19/17
to SonarQube
Hi guys,

First of all, sorry for the slow response when you were asking for more feedback. I need to improve the notification settings for this account :)

I just tried the 4.14 RC on one of our failing projects and it no longer produces the NullpointerException. So looks good from my point of view!

Vincent: I suppose it won't be necessary once 4.14 is out, but for completeness: as some of our older projects use Ant, we compute the sonar.java.libraries property ourselves and simply excluded those troublesome libraries there. See also https://docs.sonarqube.org/display/PLUG/Java+Plugin+and+Bytecode.

Thanks for the quick fix & cheers,
Sandro

Michael Gumowski

unread,
Sep 19, 2017, 8:13:49 AM9/19/17
to redru...@gmail.com, SonarQube
Thanks for the follow up, Sandro!


For more options, visit https://groups.google.com/d/optout.

Vincent Privat

unread,
Sep 20, 2017, 5:15:06 AM9/20/17
to Michael Gumowski, redru...@gmail.com, SonarQube
Hello,
The NPE is gone but I have now another error on the same file, so the issue is not fixed for me:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project xxx: SonarQube is unable to analyze file : '/home/xxx.java': UnsupportedOperationException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project xxx: SonarQube is unable to analyze file : '/home/xxx.java'
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: SonarQube is unable to analyze file : '/home/xxx.java'
        at org.sonarsource.scanner.maven.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:36)
        at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:80)
        at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:139)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        ... 20 more
Caused by: org.sonar.squidbridge.api.AnalysisException: SonarQube is unable to analyze file : '/home/xxx.java'
        at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:105)
        at org.sonar.java.ast.JavaAstScanner.scan(JavaAstScanner.java:68)
        at org.sonar.java.JavaSquid.scanSources(JavaSquid.java:119)
        at org.sonar.java.JavaSquid.scan(JavaSquid.java:113)
        at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:84)
        at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
        at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88)
        at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82)
        at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68)
        at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
        at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:179)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
        at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:261)
        at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:256)
        at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:254)
        at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:245)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
        at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
        at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
        at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:119)
        at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:116)
        at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
        at com.sun.proxy.$Proxy23.execute(Unknown Source)
        at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
        at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
        at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:77)
        ... 23 more
Caused by: java.lang.UnsupportedOperationException
        at java.util.AbstractList.add(AbstractList.java:148)
        at java.util.AbstractList.add(AbstractList.java:108)
        at org.sonar.java.bytecode.cfg.BytecodeCFGBuilder$Block.createSuccessor(BytecodeCFGBuilder.java:154)
        at org.sonar.java.bytecode.cfg.BytecodeCFGBuilder$BytecodeCFGMethodVisitor.lambda$visitLabel$5(BytecodeCFGBuilder.java:328)
        at java.util.HashMap.computeIfAbsent(HashMap.java:1126)
        at org.sonar.java.bytecode.cfg.BytecodeCFGBuilder$BytecodeCFGMethodVisitor.visitLabel(BytecodeCFGBuilder.java:328)
        at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1331)
        at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1032)
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:708)
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:521)
        at org.sonar.java.bytecode.cfg.BytecodeCFGBuilder.buildCFG(BytecodeCFGBuilder.java:79)
        at org.sonar.java.bytecode.cfg.BytecodeCFGBuilder.buildCFG(BytecodeCFGBuilder.java:69)
        at org.sonar.java.bytecode.se.BytecodeEGWalker.execute(BytecodeEGWalker.java:117)
        at org.sonar.java.bytecode.se.BytecodeEGWalker.getMethodBehavior(BytecodeEGWalker.java:108)
        at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:77)
        at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:60)
        at org.sonar.java.se.ExplodedGraphWalker.executeMethodInvocation(ExplodedGraphWalker.java:645)
        at org.sonar.java.se.ExplodedGraphWalker.visit(ExplodedGraphWalker.java:517)
        at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:243)
        at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:203)
        at org.sonar.java.se.SymbolicExecutionVisitor.execute(SymbolicExecutionVisitor.java:73)
        at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:81)
        at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:60)
        at org.sonar.java.se.ExplodedGraphWalker.executeMethodInvocation(ExplodedGraphWalker.java:645)
        at org.sonar.java.se.ExplodedGraphWalker.visit(ExplodedGraphWalker.java:517)
        at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:243)
        at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:203)
        at org.sonar.java.se.SymbolicExecutionVisitor.execute(SymbolicExecutionVisitor.java:73)
        at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:81)
        at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:60)
        at org.sonar.java.se.ExplodedGraphWalker.executeMethodInvocation(ExplodedGraphWalker.java:645)
        at org.sonar.java.se.ExplodedGraphWalker.visit(ExplodedGraphWalker.java:517)
        at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:243)
        at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:203)
        at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:195)
        at org.sonar.java.se.SymbolicExecutionVisitor.execute(SymbolicExecutionVisitor.java:77)
        at org.sonar.java.se.SymbolicExecutionVisitor.visitNode(SymbolicExecutionVisitor.java:63)
        at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:95)
        at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:120)
        at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:97)
        at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:120)
        at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:97)
        at org.sonar.java.ast.visitors.SubscriptionVisitor.scanTree(SubscriptionVisitor.java:78)
        at org.sonar.java.ast.visitors.SubscriptionVisitor.scanFile(SubscriptionVisitor.java:64)
        at org.sonar.java.model.VisitorsBridge.visitFile(VisitorsBridge.java:114)
        at org.sonar.java.ast.JavaAstScanner.simpleScan(JavaAstScanner.java:96)
        ... 57 more

Vincent

To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
--
Michael Gumowski | SonarSource
Software Developer, Language Team
http://sonarsource.com

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/jPVxAVA3McY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/CABGmqnkuE2BSPxK0fw71b5NLRZKCse%3Drov95vSHTA%2B7NTUtuXw%40mail.gmail.com.

Nicolas Peru

unread,
Sep 20, 2017, 5:38:53 AM9/20/17
to Vincent Privat, Michael Gumowski, redru...@gmail.com, SonarQube
Hi Vincent, 

Thanks for getting back on this.  I managed to reproduce the issue. So my bad seems I screwed up my testing on that topic. 
Working towards a fix. 

Thanks. 



--
Michael Gumowski | SonarSource
Software Developer, Language Team
http://sonarsource.com

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/jPVxAVA3McY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Nicolas Peru

unread,
Sep 20, 2017, 9:25:32 AM9/20/17
to Vincent Privat, Michael Gumowski, redru...@gmail.com, SonarQube
Hi Vincent, 


Thanks again for getting back to us on that one and sorry for the first partial fix.

Cheers, 

Vincent Privat

unread,
Sep 20, 2017, 10:41:59 AM9/20/17
to Nicolas Peru, Michael Gumowski, redru...@gmail.com, SonarQube
Now I got OOM errors and my process is killed by Linux kernel after having analyzed only between 40 and 80 files.
Is there a possible memory leak in the recent commits?


To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
--
Michael Gumowski | SonarSource
Software Developer, Language Team
http://sonarsource.com

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/jPVxAVA3McY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
--
Nicolas Peru | SonarSource

Nicolas Peru

unread,
Sep 20, 2017, 11:21:55 AM9/20/17
to Vincent Privat, Michael Gumowski, redru...@gmail.com, SonarQube
Hi Vincent, 

well, as per the last modification and as per what we delivered so far we are not aware of anything. So let's get this investigation from the start : can you share a stacktrace ? what is happening exactly ? 
Can you share the project or the file(s) causing trouble ? 

Cheers, 

--
Michael Gumowski | SonarSource
Software Developer, Language Team
http://sonarsource.com

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/jPVxAVA3McY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
--
Nicolas Peru | SonarSource
--
Nicolas Peru | SonarSource

Vincent Privat

unread,
Sep 20, 2017, 11:31:30 AM9/20/17
to Nicolas Peru, Michael Gumowski, Sandro Heinzelmann, SonarQube
Hello,
No I don't have any stacktrace. The process is killed randomly, but for every analysis (I tried a dozen times and increased the allowed memory):

[DEBUG] 17:25:06.311 Process file src/main/java/com/xxx.java
[INFO] 17:25:06.578 83/300 files analyzed
./code_history.sh: line 55:  9636 Killed                  $MVN $ARGS $SONAR_ARGS -Xmx3G -P $profile -Dsonar.projectDate=$date

dmesg | grep -E -i -B100 'killed process'

[11429457.769548] [ 9504]  1000  9504    28316        1      12       73             0 code_history.sh
[11429457.769549] [ 9636]  1000  9636  4890885  2557282    7034   855781             0 java
[11429457.769551] Out of memory: Kill process 9636 (java) score 666 or sacrifice child
[11429457.769589] Killed process 9636 (java) total-vm:19563540kB, anon-rss:10229128kB, file-rss:0kB, shmem-rss:0kB

I'm on RHEL7 up-to-date. I will try tomorrow an analysis with an older version of the plugin which worked on my platform to be sure it comes from this version.




To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
--
Michael Gumowski | SonarSource
Software Developer, Language Team
http://sonarsource.com

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/jPVxAVA3McY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+unsubscribe@googlegroups.com.
--
Nicolas Peru | SonarSource
--
Nicolas Peru | SonarSource

Vincent Privat

unread,
Sep 21, 2017, 5:27:26 AM9/21/17
to Nicolas Peru, Michael Gumowski, Sandro Heinzelmann, SonarQube
Hello,
The problem also occurs with a previous version which worked, so it might be due to a recent RHEL update. 
Vincent

Nicolas Peru

unread,
Sep 21, 2017, 5:36:35 AM9/21/17
to Vincent Privat, Michael Gumowski, Sandro Heinzelmann, SonarQube
Hi Vincent, 

good to know (for us ;) ) Let us know if you pinpoint back the issue to SonarJava. 

Cheers, 

--
Michael Gumowski | SonarSource
Software Developer, Language Team
http://sonarsource.com

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/jPVxAVA3McY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
--
Nicolas Peru | SonarSource
--
Nicolas Peru | SonarSource
--
Nicolas Peru | SonarSource
Reply all
Reply to author
Forward
0 new messages