<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Aptos;
        panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="en-DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Hi Patrick,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">As a second idea: Could you disable the `DeprecatedInvocation` event by passing  `DeprecatedInvocation#enabled=false`in the JFR options on the command line?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Johannes<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">hotspot-dev <hotspot-dev-retn@openjdk.org> on behalf of David Holmes <david.holmes@oracle.com><br>
<b>Date: </b>Tuesday, 15. October 2024 at 08:54<br>
<b>To: </b>hotspot-dev@openjdk.org <hotspot-dev@openjdk.org><br>
<b>Subject: </b>Re: JVM Crash when Jacoco and JFR are active<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">Hi Patrick,<br>
<br>
On 15/10/2024 5:41 am, Patrick Reinhart wrote:<br>
> Hi everybody,<br>
> <br>
> I'm lately tried to run our Gradle build and test environment on JDK 22 <br>
> and 23 to fix future problems on our code base and have experienced JVM <br>
> Crashes seeming to be related with the enabled JFR and Jacoco code <br>
> coverage.<br>
> <br>
> While running a set of around 14'000 JUnit tests, 8 Tests cause the JVM <br>
> to crash when both Jacoco and JFR is running with the crash at the end <br>
> of the message. Unfortunately I could not boil it down further and write <br>
> a simple test to reproduce it :-(<br>
> <br>
> Also I searched the JBS for a potential existing issue, but did not find <br>
> one matching the first thread frames. If anyone has a pointer to an <br>
> existing issue I could at least provide the hs_err* log and jfr files <br>
> for this.<br>
<br>
I haven't seen this before. The crash is in the code to generate JFR <br>
events for use of Deprecated (forRemoval?) methods. Do you know how <br>
Jacoco bytecode instrumentation might interact with things here? Can you <br>
run with a debug VM and see if any assertions fail?<br>
<br>
David<br>
-----<br>
<br>
> Best regards<br>
> <br>
> -Patrick<br>
> <br>
> <br>
> #<br>
> # A fatal error has been detected by the Java Runtime Environment:<br>
> #<br>
> #  SIGSEGV (0xb) at pc=0x00007f0605749ef0, pid=128840, tid=128846<br>
> #<br>
> # JRE version: OpenJDK Runtime Environment Temurin-23+37 (23.0+37) <br>
> (build 23+37)<br>
> # Java VM: OpenJDK 64-Bit Server VM Temurin-23+37 (23+37, mixed mode, <br>
> sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux- <br>
> amd64)<br>
> # Problematic frame:<br>
> # V  [libjvm.so+0x949ef0] <br>
> JfrMethodData::mark_deprecated_call_site(Method*, int, JavaThread*)+0x70<br>
> #<br>
> # Core dump will be written. Default location: Core dumps may be <br>
> processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c <br>
> %h" (or dumping to /workspace/base2/Frame/CH.obj.Core/core.128840)<br>
> #<br>
> # JFR recording file will be written. Location: /workspace/base2/Frame/ <br>
> CH.obj.Core/hs_err_pid128840.jfr<br>
> #<br>
> # If you would like to submit a bug report, please visit:<br>
> #   </span><a href="https://github.com/adoptium/adoptium-support/issues"><span style="font-size:11.0pt">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</span></a><span style="font-size:11.0pt"><br>
> #<br>
> <br>
> ---------------  S U M M A R Y ------------<br>
> <br>
> Command Line: -Dbisonfunctions.pedantic=true - <br>
> Djunit.jupiter.extensions.autodetection.enabled=true -Dline.separator=<br>
>   -Dorg.gradle.internal.worker.tmpdir=/workspace/base2/Frame/ <br>
> CH.obj.Core/build/tmp/test/work -Duser.timezone=Europe/Berlin - <br>
> XX:StartFlightRecording --add-opens=java.base/java.lang=ALL-UNNAMED -- <br>
> add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/ <br>
> java.io=ALL-UNNAMED -javaagent:/workspace/base2/Frame/CH.obj.Core/build/ <br>
> tmp/.cache/expanded/zip_ff7bf8f04f99dc306508d1c81e47a68b/ <br>
> jacocoagent.jar=destfile=build/jacoco/ <br>
> 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'<br>
> <br>
> Host: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz, 8 cores, 62G, Fedora <br>
> release 40 (Forty)<br>
> Time: Mon Oct 14 09:04:48 2024 CEST elapsed time: 1.709756 seconds (0d <br>
> 0h 0m 1s)<br>
> <br>
> ---------------  T H R E A D  ---------------<br>
> <br>
> Current thread (0x00007f0600037ed0):  JavaThread "Test <br>
> worker" [_thread_in_vm, id=128846, <br>
> stack(0x00007f0604d00000,0x00007f0604e00000) (1024K)]<br>
> <br>
> Stack: [0x00007f0604d00000,0x00007f0604e00000], sp=0x00007f0604dfa130, <br>
> free space=1000k<br>
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, <br>
> C=native code)<br>
> V  [libjvm.so+0x949ef0] <br>
> JfrMethodData::mark_deprecated_call_site(Method*, int, JavaThread*)+0x70<br>
> V  [libjvm.so+0x930c6e]  JfrDeprecationManager::on_link(Method const*, <br>
> Method*, int, unsigned char, JavaThread*)+0x2e<br>
> V  [libjvm.so+0x96d84b] JfrResolution::on_runtime_resolution(CallInfo <br>
> const&, JavaThread*)+0x15b<br>
> V  [libjvm.so+0xc8e34d]  MethodHandles::resolve_MemberName(Handle, <br>
> Klass*, int, bool, JavaThread*)+0x8fd<br>
> V  [libjvm.so+0xf23dac] <br>
> SystemDictionary::link_method_handle_constant(Klass*, int, Klass*, <br>
> Symbol*, Symbol*, JavaThread*)+<br>
> <o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>