PREQ-4234 Propagate -XX:-UseContainerSupport to SonarQube child process JVMs#218
Closed
PREQ-4234 Propagate -XX:-UseContainerSupport to SonarQube child process JVMs#218
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
98df0e7 to
96ddad0
Compare
SonarQube reviewer guide
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
On GitHub-hosted Ubuntu runners,
config-mavenalready setsJAVA_TOOL_OPTIONS=-XX:-UseContainerSupportto work around a Java cgroup detection bug triggered by recent kernel upgrades (6.12+). However, SonarQube's App process explicitly stripsJAVA_TOOL_OPTIONSbefore spawning its child processes (Elasticsearch, Web Server, Compute Engine), making the workaround ineffective for Orchestrator-managed SonarQube instances in integration tests.This results in the following NPE when Elasticsearch starts:
SonarQube logs the root cause explicitly:
Change
Alongside the existing
JAVA_TOOL_OPTIONSline, also set the SonarQube-specific env vars that SonarQube does forward to each child JVM:SONAR_SEARCH_JAVAADDITIONALOPTS→ Elasticsearch JVMSONAR_WEB_JAVAADDITIONALOPTS→ Web Server JVMSONAR_CE_JAVAADDITIONALOPTS→ Compute Engine JVMAll three use the same
${VAR:=default}pattern so they don't override values already set by the caller.Related
sonarlint-coreQA jobSQLts99on runner imageubuntu24/20260209.23.1(kernel 6.14)Test plan
QA (SQLts99)passes on a repo usingconfig-maven@v1after this is releasedMade with Cursor