Repository navigation
Segment fault in jdk25 #1035
Description
Activity
I suspect this has the same root problem as #599. As a workaround to that issue, I had forked the JVM per-test to run 5min fuzzers and tried to speed up my CI build by parallelizing them. The failing class,
FuzzTargetRunner, states that it maintains global state which disallows concurrency and the error implies it has native resources that are not isolated to the process. This should likely be documented since, just like the single test requirement per test task, its not a natural expectation that native resources are not properly isolated. Splitting the CI to run each test as its own job worked fine. Attached are the full logs, error-report.zip.register<JvmTestSuite>("fuzzTest") { useJUnitJupiter(libs.versions.junit.jupiter) dependencies { implementation(project()) implementation(libs.truth) implementation(libs.jazzer) } targets.all { testTask.configure { environment("JAZZER_FUZZ", "1") maxParallelForks = 2 * Runtime.getRuntime().availableProcessors() failFast = true forkEvery = 1 } } }
It seems to fail regardless, unfortunately. It runs fine on jdk-11, so maybe a jdk-25 incompatibility?
From a quick glance, it looks like a bug in jacoco/jvm 25 interaction. Removing jacoco when fuzzing makes the segfault go away.
Jacoco version 0.8.14 seems to be the first one with "official" support for Java 25, so maybe they still missed something?Parallel fuzzing with your config above works fine.
Edit: This quick analysis does not exclude Jazzer not working properly with java 25, so I will take a closer look at this as soon as I find the time.
Reacted by Ben ManesThank you, that's an excellent observation. I opened an issue at Jacoco, though I am uncertain which project is actually at fault. I'll close one or both based on feedback and disabling jacoco is a fine workaround.
@ben-manes After updating to the latest JaCoCo version, the issue still persists when StressGCM flag is set. We are still narrowing it down, but so far it looks like a JVM bug in C2 compiler.
Reacted by Ben Manes and Fabian Meumertzheim
https://github.com/ben-manes/caffeine/actions/runs/21330768452/job/61396142417