Skip to content

Fix native-image builds with build-time JMX registration - #13143

Draft
ygree wants to merge 2 commits into
masterfrom
ygree/fix-native-image-jmx-initialization
Draft

ygree wants to merge 2 commits into
masterfrom
ygree/fix-native-image-jmx-initialization

Conversation

@ygree

@ygree ygree commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Reset two JMX caches when building native images so MBean servers created during the build are not retained in the executable. The tracer supplies the substitutions automatically, without application-side workaround code or additional dependencies.

Motivation

Quarkus applications using Oracle JDBC can create an MBean server during build-time initialization. The tracer’s JMX support makes that server reachable, causing GraalVM to reject the image heap and fail the build.

Additional Notes

  • Added a minimal regression test without Oracle or Quarkus dependencies, using Quarkus’s initialization policy.
  • Regression and runtime JMX checks pass with the fix on GraalVM 21 and 24.

Contributor Checklist

Jira ticket: APMS-20892

@ygree ygree self-assigned this Oct 31, 2026
@ygree ygree added type: bug fix Bug fix comp: native-image GraalVM native-image tag: ai generated Largely based on code generated by an AI or LLM labels Oct 31, 2026
@ygree
ygree force-pushed the ygree/fix-native-image-jmx-initialization branch from 1fb4556 to 3a758a4 Compare October 31, 2026 01:20
@ygree
ygree force-pushed the ygree/fix-native-image-jmx-initialization branch from 3a758a4 to 2b35691 Compare October 31, 2026 01:23
@datadog-prod-us1-3

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.81 s 14.78 s [-0.8%; +1.1%] (no difference)
startup:insecure-bank:tracing:Agent 13.60 s 13.65 s [-1.1%; +0.3%] (no difference)
startup:petclinic:appsec:Agent 17.80 s 17.45 s [+1.1%; +2.9%] (significantly worse)
startup:petclinic:iast:Agent 17.40 s 17.51 s [-1.6%; +0.3%] (no difference)
startup:petclinic:profiling:Agent 16.77 s 17.24 s [-7.0%; +1.5%] (no difference)
startup:petclinic:sca:Agent 17.80 s 17.64 s [+0.0%; +1.8%] (maybe worse)
startup:petclinic:tracing:Agent 16.65 s 16.77 s [-1.6%; +0.2%] (no difference)

Commit: 2b35691c · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: native-image GraalVM native-image tag: ai generated Largely based on code generated by an AI or LLM type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant