Javabugs [dbd] sensor OutOfMemoryError on branch analysis after upgrading 2026.4.1 → 2026.5.3

Must-share information

  • SonarQube Server: Enterprise 2026.5.3.133540, upgraded on 2026-11-01 from Developer 2026.4.1.126914 (the edition changed at the same time: Developer → Enterprise)
  • Deployment: Docker (official sonarqube:2026.5.3-enterprise image), PostgreSQL 16 on the same host. Previously a zip install.
  • Scanner: SonarScanner CLI 8.3.0.16463 (was 8.1.0.6389) on Linux x86_64 (Rocky Linux 10), launched from the Jenkins SonarQube plugin. Scanner JRE provisioned by the server: Java 21.0.12.1 Eclipse Adoptium (was 21.0.11).
  • Plugins (server-provided analyzers):
    • DBD sonar-dbd-plugin / sonar-dbd-java-frontend-plugin: 2.7.1.22835 → 2.12.0.23863
    • sonar-java-plugin: 8.35.0.45121 → 8.43.0.47668
    • sonar-java-symbolic-execution-plugin: 8.21.0.1991 → 8.24.0.2319
    • No third-party plugins
  • Project: large Java 21 codebase (sonar.java.source=21, ~92k functions). Same custom quality profile before and after the upgrade.

What we’re trying to achieve

Main-branch analysis of the project.

What happens

Same project, same agent type, same SONAR_SCANNER_JAVA_OPTS=-Xmx8192m -XX:ReservedCodeCacheSize=128m, about 4% more code:

Before (2026.4.1, DBD 2.7.1) After (2026.5.3, DBD 2.12.0)
Sensor javabugs [dbd] Analyzing 74574/88810 functions → done in 32,835 ms Analyzing 76431/92113 functions → ~6 min, then OOM
Sensor JavaSensor [java] 796,262 ms 839,846 ms
Result ANALYSIS SUCCESSFUL EXECUTION FAILURE

The failing sensor is the DBD plugin; JavaSensor timing is essentially unchanged.

Before (2026.4.1):

21:52:00.165 INFO  Sensor javabugs [dbd]
21:52:07.215 INFO  Analyzing 74574/88810 functions to detect bugs.
21:52:33.000 INFO  Sensor javabugs [dbd] (done) | time=32835ms

After (2026.5.3):

21:41:39.160 INFO  Sensor javabugs [dbd]
21:41:51.247 INFO  Analyzing 76431/92113 functions to detect bugs.
21:47:39.464 ERROR Error during SonarScanner Engine execution
java.lang.OutOfMemoryError: Java heap space
        at java.base/java.util.HashMap.resize(Unknown Source)
        at java.base/java.util.HashMap.putVal(Unknown Source)
        at java.base/java.util.HashMap.put(Unknown Source)
        at java.base/java.util.HashSet.add(Unknown Source)
        at com.sonarsource.dbd.A.B.L$_A.B(na:3487)
        at com.sonarsource.dbd.A.B.L$_A.A(na:1416)
        at com.sonarsource.dbd.A.B.L.A(na:1742)
        at com.sonarsource.dbd.A.B.L.A(na:3371)
        at com.sonarsource.dbd.A.B.D.A(na:202)
        at com.sonarsource.dbd.A.B.F.B(na:397)
        at com.sonarsource.dbd.A.B.F.A(na:3021)
        at com.sonarsource.dbd.A.B.A.A(na:2810)
        at com.sonarsource.dbd.A.B.A.A(na:1192)
        at com.sonarsource.dbd.A.B.C.A(na:3091)
        at com.sonarsource.dbd.platform.internal.F.M.A(na:518)
        at com.sonarsource.dbd.platform.internal.F.M.A(na:716)
        at com.sonarsource.dbd.platform.internal.F.M.A(na:70)
        at com.sonarsource.dbd.platform.internal.F.M.B(na:745)
        at com.sonarsource.dbd.platform.internal.F.M.A(na:3328)
        at com.sonarsource.dbd.G.doExecute(na:1409)
        at com.sonarsource.dbd.platform.internal.F.O.execute(na:2025)
        at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:69)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:64)
        at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:88)
        at org.sonar.scanner.spring.SpringComponentContainer.startComponents(SpringComponentContainer.java:205)
        at org.sonar.scanner.spring.SpringComponentContainer.execute(SpringComponentContainer.java:184)
        at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:244)
        at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:240)
        at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:210)
        at org.sonar.scanner.spring.SpringComponentContainer.startComponents(SpringComponentContainer.java:205)
        at org.sonar.scanner.spring.SpringComponentContainer.execute(SpringComponentContainer.java:184)

21:47:39.809 INFO  EXECUTION FAILURE
21:47:39.810 INFO  Total time: 20:50.126s

Going from ~33 seconds to heap exhaustion (in HashSet.add inside the DBD engine) on nearly identical code looks like a regression in the DBD analyzer between 2.7.1 and 2.12.0, not a sizing problem.

What we’ve tried so far

  • Confirmed the scanner heap (8 GB) and the quality profile are unchanged between the two runs.
  • Confirmed PR analysis on 2026.5.3 is unaffected.
  • Workaround under consideration: -Dsonar.internal.analysis.dbd=false on branch builds only. We’d rather not lose the javabugs findings on the main branch.

Happy to raise the scanner heap once to tell a heavier analysis apart from runaway growth, deactivate javabugs rules to narrow it down, rerun with -Dsonar.verbose=true, and share the full logs privately if that helps.