The metrics plugin reports a segmentation error causing Jenkins coredump

My Jenkins experienced a core dump without any configuration changes. Upon inspecting the hs_err_xxx.log file, I identified a thread encountering a memory segmentation fault, resulting in a null pointer exception.

The log indicated: "JavaThread “Metrics-HealthChecks-155622”.

java version:
openjdk 2022-08-12
OpenJDK Runtime Environment Temurin- (build
OpenJDK 64-Bit Server VM Temurin- (build, mixed mode)

Jenkins version: Jenkins 2.414.1

Metrics plugin version: 4.2.18-442.v02e107157925

The memory location where the problem occurred is: 0x00007f7362c9b598
J 5182957 c2 java.lang.invoke.VarHandleObjects$FieldInstanceReadWrite.compareAndSet(Ljava/lang/invoke/VarHandleObjects$FieldInstanceReadWrite;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z java.base@ (38 bytes) @ 0x00007f7362c9b598 [0x00007f7362c9b540+0x0000000000000058]

A hidden null pointer appears at this memory address:
Event: 2334409.135 Thread 0x00007f48e80ac800 Implicit null exception at 0x00007f7362c9b598 to 0x0000000000000000

Check the current thread position 0x00007f48e80ac800:
Current thread (0x00007f48e80ac800): JavaThread “Metrics-HealthChecks-155622” daemon [_thread_in_Java, id=108274, stack(0x00007f4dba9f0000,0x00007f4dbaaf1000)]

A memory segmentation fault occurs:
siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x000000000000003d

I checked the release note of subsequent versions of the metrics plugin and found no fix for this problem. Is this a known issue?

You’re running with a 2 year old java version. And also the Jenkins version is a bit older.
You should check first if the problem is reproducible in current Jenkins and an up-to-date Java version

1 Like

Hi @mawinter69 ,does Jenkins support Java 22 now? I am considering upgrading the version recently, but I only see that Jenkins changelog mentions the addition of Java 11 support.

I am considering upgrading Jenkins to version 2.440.3

See Java Support Policy and Introducing the 2 + 2 + 2 Java support plan for the supported Java versions.

1 Like