Skip to content

Commit 7b7c955

Browse files
committed
ci: raise ASan test JVM heap to 1024m to fix flaky nightly OOMs
Nightly asan runs repeatedly OOM with "Java heap space" at the forkEvery(25) restart boundary. -Xmx512m was sized purely to avoid colliding with ASan's shadow-memory region, but ~1.9GB of address space actually separates the pinned heap base from that region.
1 parent 684769c commit 7b7c955

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

build-logic/conventions/src/main/kotlin/com/datadoghq/native/config/ConfigurationPresets.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,13 @@ object ConfigurationPresets {
222222
// HeapBaseMinAddress is not accepted by JDK <= 11 (constraint violation);
223223
// those JDKs rely on the vm.mmap_rnd_bits=8 CI-level mitigation instead.
224224
if (PlatformUtils.testJvmMajorVersion() >= 12) {
225+
// HeapBaseMinAddress=64MB leaves ~1.9GB of address space below the
226+
// shadow region (0x7fff7000); 1024m keeps heap+CompressedClassSpace
227+
// well within that margin while giving forkEvery-restarted JVMs
228+
// enough headroom to avoid "Java heap space" OOMs seen in nightly CI.
225229
config.testJvmArgs.addAll(listOf(
226230
"-XX:HeapBaseMinAddress=0x4000000",
227-
"-Xmx512m",
231+
"-Xmx1024m",
228232
"-XX:CompressedClassSpaceSize=256m"
229233
))
230234
}

build-logic/conventions/src/main/kotlin/com/datadoghq/profiler/ProfilerTestPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ class ProfilerTestPlugin : Plugin<Project> {
321321
// https://github.com/eclipse-openj9/openj9/issues/23514
322322
!PlatformUtils.isTestJvmJ9()
323323
}
324-
// The ASAN test JVM is pinned to -Xmx512m (see ConfigurationPresets.kt)
324+
// The ASAN test JVM is pinned to -Xmx1024m (see ConfigurationPresets.kt)
325325
// to keep the heap below ASan's shadow-memory region. Without forking,
326326
// Gradle reuses one JVM for the whole suite, and per-test allocations
327327
// (JFR recordings, JMC object models) accumulate until it OOMs late in

0 commit comments

Comments
 (0)