Skip to content

Segment fault in jdk25 #1035

Description

@ben-manes

https://github.com/ben-manes/caffeine/actions/runs/21330768452/job/61396142417

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f63e8133cd6, pid=3390, tid=3398
#
# JRE version: OpenJDK Runtime Environment Temurin-25.0.1+8 (25.0.1+8) (build 25.0.1+8-LTS)
# Java VM: OpenJDK 64-Bit Server VM Temurin-25.0.1+8 (25.0.1+8-LTS, mixed mode, tiered, compressed oops, compact obj headers, g1 gc, linux-amd64)
# Problematic frame:
# J 6763 c2 com.code_intelligence.jazzer.driver.FuzzTargetRunner.runOne(JI)I (1395 bytes) @ 0x00007f63e8133cd6 [0x00007f63e8133780+0x0000000000000556]
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t 9223372036854775808 %h %d" (or dumping to /home/runner/work/caffeine/caffeine/caffeine/core.3390)
#
# An error report file with more information is saved as:
# /home/runner/work/caffeine/caffeine/caffeine/hs_err_pid3390.log
Warning: [12.151s][warning][os] Loading hsdis library failed
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
#
==3390== ERROR: libFuzzer: deadly signal
==3390== ERROR: libFuzzer: deadly signal
[error occurred during error reporting (), id 0xb, SIGSEGV (0xb) at pc=0x00007f63ff2830d8]
NOTE: libFuzzer has rudimentary signal handlers.
      Combine libFuzzer with AddressSanitizer or similar for better crash reports.
SUMMARY: libFuzzer: deadly signal
MS: 3 Custom-Custom-CustomCrossOver-; base unit: f0c957104bb1b80c9d125d9c8cbb3f06fbf2ab1a
0x0,0x40,0x0,0x25,
\000@\000%
artifact_prefix='/home/runner/work/caffeine/caffeine/caffeine/'; Test unit written to /home/runner/work/caffeine/caffeine/caffeine/crash-c7b9f8ff842b5abdc905c4693748eea265c4ccff

Activity

  1. ben-manes commented on Jan 25, 2026

    @ben-manes
    Author

    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
        }
      }
    }
  2. ben-manes commented on Feb 2, 2026

    @ben-manes
    Author

    It seems to fail regardless, unfortunately. It runs fine on jdk-11, so maybe a jdk-25 incompatibility?

  3. oetr commented on Feb 2, 2026

    @oetr
    Contributor

    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.

  4. ben-manes commented on Feb 2, 2026

    @ben-manes
    Author

    Thank 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.

  5. oetr commented on Feb 26, 2026

    @oetr
    Contributor

    @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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions