JVM Crash when Jacoco and JFR are active

Bechberger, Johannes johannes.bechberger at sap.com
Tue Oct 15 07:24:43 UTC 2024


Hi Patrick,

As a second idea: Could you disable the `DeprecatedInvocation` event by passing  `DeprecatedInvocation#enabled=false`in the JFR options on the command line?

Regards
Johannes

From: hotspot-dev <hotspot-dev-retn at openjdk.org> on behalf of David Holmes <david.holmes at oracle.com>
Date: Tuesday, 15. October 2024 at 08:54
To: hotspot-dev at openjdk.org <hotspot-dev at openjdk.org>
Subject: Re: JVM Crash when Jacoco and JFR are active
Hi Patrick,

On 15/10/2024 5:41 am, Patrick Reinhart wrote:
> Hi everybody,
>
> I'm lately tried to run our Gradle build and test environment on JDK 22
> and 23 to fix future problems on our code base and have experienced JVM
> Crashes seeming to be related with the enabled JFR and Jacoco code
> coverage.
>
> While running a set of around 14'000 JUnit tests, 8 Tests cause the JVM
> to crash when both Jacoco and JFR is running with the crash at the end
> of the message. Unfortunately I could not boil it down further and write
> a simple test to reproduce it :-(
>
> Also I searched the JBS for a potential existing issue, but did not find
> one matching the first thread frames. If anyone has a pointer to an
> existing issue I could at least provide the hs_err* log and jfr files
> for this.

I haven't seen this before. The crash is in the code to generate JFR
events for use of Deprecated (forRemoval?) methods. Do you know how
Jacoco bytecode instrumentation might interact with things here? Can you
run with a debug VM and see if any assertions fail?

David
-----

> Best regards
>
> -Patrick
>
>
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  SIGSEGV (0xb) at pc=0x00007f0605749ef0, pid=128840, tid=128846
> #
> # JRE version: OpenJDK Runtime Environment Temurin-23+37 (23.0+37)
> (build 23+37)
> # Java VM: OpenJDK 64-Bit Server VM Temurin-23+37 (23+37, mixed mode,
> sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-
> amd64)
> # Problematic frame:
> # V  [libjvm.so+0x949ef0]
> JfrMethodData::mark_deprecated_call_site(Method*, int, JavaThread*)+0x70
> #
> # Core dump will be written. Default location: Core dumps may be
> processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c
> %h" (or dumping to /workspace/base2/Frame/CH.obj.Core/core.128840)
> #
> # JFR recording file will be written. Location: /workspace/base2/Frame/
> CH.obj.Core/hs_err_pid128840.jfr
> #
> # If you would like to submit a bug report, please visit:
> #   https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fadoptium%2Fadoptium-support%2Fissues&data=05%7C02%7Cjohannes.bechberger%40sap.com%7Ca89a9747b902473f1ef208dcece6246a%7C42f7676cf455423c82f6dc2d99791af7%7C0%7C0%7C638645720404812245%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=82LJIuFyN0tt4Yo1KKhgtBFQEE5se737SXqvXjNwctY%3D&reserved=0<https://github.com/adoptium/adoptium-support/issues>
> #
>
> ---------------  S U M M A R Y ------------
>
> Command Line: -Dbisonfunctions.pedantic=true -
> Djunit.jupiter.extensions.autodetection.enabled=true -Dline.separator=
>   -Dorg.gradle.internal.worker.tmpdir=/workspace/base2/Frame/
> CH.obj.Core/build/tmp/test/work -Duser.timezone=Europe/Berlin -
> XX:StartFlightRecording --add-opens=java.base/java.lang=ALL-UNNAMED --
> add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/
> java.io=ALL-UNNAMED -javaagent:/workspace/base2/Frame/CH.obj.Core/build/
> tmp/.cache/expanded/zip_ff7bf8f04f99dc306508d1c81e47a68b/
> jacocoagent.jar=destfile=build/jacoco/
> test.exec,append=true,excludes=java.*:javax.*:mockit.*,inclnolocationclasses=false,dumponexit=true,output=file,jmx=false -Xmx512m -Dfile.encoding=ISO-8859-1 -Duser.country=CH -Duser.language=de -Duser.variant -ea worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Test Executor 246'
>
> Host: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz, 8 cores, 62G, Fedora
> release 40 (Forty)
> Time: Mon Oct 14 09:04:48 2024 CEST elapsed time: 1.709756 seconds (0d
> 0h 0m 1s)
>
> ---------------  T H R E A D  ---------------
>
> Current thread (0x00007f0600037ed0):  JavaThread "Test
> worker" [_thread_in_vm, id=128846,
> stack(0x00007f0604d00000,0x00007f0604e00000) (1024K)]
>
> Stack: [0x00007f0604d00000,0x00007f0604e00000], sp=0x00007f0604dfa130,
> free space=1000k
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
> C=native code)
> V  [libjvm.so+0x949ef0]
> JfrMethodData::mark_deprecated_call_site(Method*, int, JavaThread*)+0x70
> V  [libjvm.so+0x930c6e]  JfrDeprecationManager::on_link(Method const*,
> Method*, int, unsigned char, JavaThread*)+0x2e
> V  [libjvm.so+0x96d84b] JfrResolution::on_runtime_resolution(CallInfo
> const&, JavaThread*)+0x15b
> V  [libjvm.so+0xc8e34d]  MethodHandles::resolve_MemberName(Handle,
> Klass*, int, bool, JavaThread*)+0x8fd
> V  [libjvm.so+0xf23dac]
> SystemDictionary::link_method_handle_constant(Klass*, int, Klass*,
> Symbol*, Symbol*, JavaThread*)+
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-dev/attachments/20241015/9be518b8/attachment.htm>


More information about the hotspot-dev mailing list