Skip to content

ci: skip ASan for GraalVM (shadow memory conflict)#590

Merged
jbachorik merged 2 commits into
mainfrom
fix/graal-asan-shadow-conflict
Jun 11, 2026
Merged

ci: skip ASan for GraalVM (shadow memory conflict)#590
jbachorik merged 2 commits into
mainfrom
fix/graal-asan-shadow-conflict

Conversation

@jbachorik

Copy link
Copy Markdown
Collaborator

What does this PR do?:
Skip ASan runs when the JDK is GraalVM. Both amd64 and aarch64 test jobs are covered.

Motivation:
GraalVM pre-allocates fixed memory in 0x500000000000–0x52f000000000 at JVM startup. This range conflicts with ASan's required shadow memory region [0x00007fff7000–0x10007fff7fff], causing ASan to abort with a shadow memory initialization failure before any test runs. The existing vm.mmap_rnd_bits=8 / setarch --addr-no-randomize ASLR tuning does not help because GraalVM's pre-allocation is unconditional, not ASLR-driven. This is a known upstream incompatibility: google/sanitizers#856.

Failing nightly run: https://github.com/DataDog/java-profiler/actions/runs/27253333727/job/80482463485

Additional Notes:
The existing (j9|ibm) block sets MAX_ATTEMPTS=2 (retry logic). The graal skip is different in kind — it exits cleanly with exit 0 and a ::notice:: annotation, so the job shows green without masking real failures.

How to test the change?:
The nightly sanitized workflow will exercise this path. The graal+asan matrix cell should now complete successfully (exit 0, notice annotation visible in the job log) instead of aborting with an ASan shadow memory error.

No code change — CI workflow only; automated test not applicable.

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.
  • JIRA: [JIRA-XXXX]

GraalVM pre-allocates fixed memory in 0x500000000000-0x52f000000000
which conflicts with ASan's required shadow range. No ASLR tuning resolves
this (google/sanitizers#856). Skip asan+graal on both amd64 and aarch64.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@datadog-official

This comment has been minimized.

@jbachorik jbachorik marked this pull request as ready for review June 10, 2026 15:32
@jbachorik jbachorik requested a review from a team as a code owner June 10, 2026 15:32
@dd-octo-sts

dd-octo-sts Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #27327237803 | Commit: be7d61c | Duration: 13m 32s (longest job)

All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - - -
8-ibm - - -
8-j9 - -
8-librca - -
8-orcl - - -
11 - - -
11-j9 - -
11-librca - -
17 - -
17-graal - -
17-j9 - -
17-librca - -
21 - -
21-graal - -
21-librca - -
25 - -
25-graal - -
25-librca - -

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-06-11 06:19:26 UTC

@jbachorik jbachorik merged commit 6ae3fb0 into main Jun 11, 2026
103 checks passed
@jbachorik jbachorik deleted the fix/graal-asan-shadow-conflict branch June 11, 2026 07:40
@github-actions github-actions Bot added this to the 1.45.0 milestone Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant