From c587baf6c1047c2defda83451257453c74c637f4 Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Mon, 16 Mar 2026 17:47:23 +0100 Subject: [PATCH] Skip J9+ASAN tests due to OpenJ9 JVM bugs OpenJ9 has known GC stack-scanning and defineClass race bugs that are exposed by ASAN timing changes, causing intermittent JVM crashes (SIGSEGV in walkStackFrames during GC scanSlots). https://github.com/eclipse-openj9/openj9/issues/23514 Co-Authored-By: Claude Opus 4.6 (1M context) --- .../datadoghq/profiler/ProfilerTestPlugin.kt | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/build-logic/conventions/src/main/kotlin/com/datadoghq/profiler/ProfilerTestPlugin.kt b/build-logic/conventions/src/main/kotlin/com/datadoghq/profiler/ProfilerTestPlugin.kt index 838c01a03..2d2b46287 100644 --- a/build-logic/conventions/src/main/kotlin/com/datadoghq/profiler/ProfilerTestPlugin.kt +++ b/build-logic/conventions/src/main/kotlin/com/datadoghq/profiler/ProfilerTestPlugin.kt @@ -252,19 +252,14 @@ class ProfilerTestPlugin : Plugin { // Sanitizer conditions when (testConfig.configName) { - "asan" -> testTask.onlyIf { PlatformUtils.locateLibasan() != null } - "tsan" -> testTask.onlyIf { PlatformUtils.locateLibtsan() != null } - } - - // J9+ASAN: isolate each test class in its own JVM to limit crash blast radius - if (testConfig.configName == "asan") { - testTask.doFirst { - if (PlatformUtils.isTestJvmJ9()) { - testTask.setForkEvery(1) - } + "asan" -> testTask.onlyIf { + PlatformUtils.locateLibasan() != null && + // Skip J9+ASAN: OpenJ9 has known GC stack-scanning and defineClass + // race bugs exposed by ASAN timing + // https://github.com/eclipse-openj9/openj9/issues/23514 + !PlatformUtils.isTestJvmJ9() } - // Kill hung ASAN test tasks after 30 minutes - testTask.timeout.set(Duration.ofMinutes(30)) + "tsan" -> testTask.onlyIf { PlatformUtils.locateLibtsan() != null } } } } @@ -345,7 +340,13 @@ class ProfilerTestPlugin : Plugin { // Sanitizer conditions when (testConfig.configName) { - "asan" -> execTask.onlyIf { PlatformUtils.locateLibasan() != null } + "asan" -> execTask.onlyIf { + PlatformUtils.locateLibasan() != null && + // Skip J9+ASAN: OpenJ9 has known GC stack-scanning and defineClass + // race bugs exposed by ASAN timing + // https://github.com/eclipse-openj9/openj9/issues/23514 + !PlatformUtils.isTestJvmJ9() + } "tsan" -> execTask.onlyIf { PlatformUtils.locateLibtsan() != null } } }