spotbugs / sonar-findbugs

SpotBugs plugin for SonarQube
354 stars 136 forks source link

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar #182

Closed gvasquez95 closed 2 years ago

gvasquez95 commented 6 years ago

Issue Description

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project WaypointReports: Can not execute Findbugs with a timeout threshold value of 600000 milliseconds: TimeoutException -> [Help 1]

Previous output:

[INFO] Findbugs output report: /var/lib/jenkins/workspace/WaypointReports/target/sonar/findbugs-result.xml
[WARNING] [JOURNAL_FLUSHER] WARNING Journal flush operation took 7,859ms last 8 cycles average is 982ms
[WARNING] [JOURNAL_FLUSHER] WARNING Journal flush operation took 42,632ms last 8 cycles average is 5,329ms
[WARNING] [JOURNAL_FLUSHER] WARNING Journal flush operation took 18,805ms last 8 cycles average is 2,350ms
[WARNING] [JOURNAL_FLUSHER] WARNING Journal flush operation took 3,043ms last 8 cycles average is 2,921ms
[WARNING] [JOURNAL_FLUSHER] WARNING Journal flush operation took 3,038ms last 8 cycles average is 950ms
[WARNING] [JOURNAL_FLUSHER] WARNING Journal flush operation took 15,081ms last 8 cycles average is 2,645ms
[WARNING] [JOURNAL_FLUSHER] WARNING Journal flush operation took 6,084ms last 8 cycles average is 3,405ms
[WARNING] [JOURNAL_FLUSHER] WARNING Journal flush operation took 12,659ms last 8 cycles average is 4,988ms

Seems to be taking too long, how can I diagnose such a slow behaviour? Or should I just somehow increase the timeout value?

Attached Stacktrace: StackTrace.txt

Environment

Component Version
SonarQube Version 6.7 (build 33306)
Sonar-FindBugs 3.6.0
Maven 3.5.2
Java openjdk-1.8.0.161-0.b14.36.amzn1.x86_64
sonar-maven-plugin 3.3.0.603
h3xstream commented 6 years ago

It seems to be a known issue : https://stackoverflow.com/questions/40264166/sonarqube-analyse-warning-journal-flush-operation-does-not-end

gvasquez95 commented 6 years ago

That question references previous versions bugs which have been fixed, but I'm in 6.7 and the problem is still present :(

h3xstream commented 6 years ago

Findbugs with a timeout threshold value of 600000 milliseconds is something that will happen to any project with multi-million lines of codes. I had many projects in this situation. This hard limit could be loose up since it was there to identify scan that lacks memory and slow down SpotBugs engine. I don't know if it is still an interesting safeguard compare the number of huge enterprises application that will fail because of this. I could increase the timeout to an hour.

[WARNING] [JOURNAL_FLUSHER] WARNING Journal flush operation took I don't think I have control over this warning or the time of the journal flusher component.

senthilpandy commented 5 years ago

I am also facing the same issue... sonarqube-6.7.6 Findbugs 3.9.2 Java 1.8

With 600000 Timeout: INFO: 0/0 source files have been analyzed INFO: Sensor JavaSquidSensor [java] (done) | time=7560ms INFO: Sensor FindBugs Sensor [findbugs] INFO: Loading findbugs plugin: /Cisco/dcnm_repo/dcnm_new/nms/com/cisco/dcbu/vinci/utils/.scannerwork/findbugs/findsecbugs-plugin.jar INFO: Findbugs output report: /Cisco/dcnm_repo/dcnm_new/nms/com/cisco/dcbu/vinci/utils/.scannerwork/findbugs-result.xml INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ INFO: Total time: 10:24.412s INFO: Final Memory: 2880M/3730M INFO: ------------------------------------------------------------------------ ERROR: Error during SonarQube Scanner execution ERROR: Can not execute Findbugs with a timeout threshold value of 600000 milliseconds ERROR:  ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

With 7200000 Timeout: 01:27:46.920 INFO: Findbugs output report: /Cisco/dcnm_repo/dcnm_new/nms/com/cisco/dcbu/vinci/utils/.scannerwork/findbugs-result.xml 02:13:27.194 WARN: [JOURNAL_FLUSHER] WARNING Journal flush operation took 17,253ms last 8 cycles average is 2,156ms 02:20:46.420 WARN: [JOURNAL_FLUSHER] WARNING Journal flush operation took 7,385ms last 8 cycles average is 3,079ms 02:25:49.816 WARN: [JOURNAL_FLUSHER] WARNING Journal flush operation took 37,048ms last 8 cycles average is 7,711ms 02:32:20.710 WARN: [JOURNAL_FLUSHER] WARNING Journal flush operation took 26,867ms last 8 cycles average is 11,069ms

Is there any Fix / Workaround available?

gtoison commented 2 years ago

Hello, this issue seems to be for old versions of SonarQube and we won't be able to investigate with the information provided here. I'll close the issue but feel free to reopen if this is still relevant