corretto-8 icon indicating copy to clipboard operation
corretto-8 copied to clipboard

JFR shows thread crashes and doesn't collect data on Mac M1

Open alecl opened this issue 2 years ago • 6 comments

Describe the bug

MacOS Monterey 12.4 on Mac M1 Corretto 8.342.07.3 aarch64 Spring Framework 5.3.4 Tomcat 8.0.53

CATALINA_OPTS=" -XX:+FlightRecorder -XX:StartFlightRecording=duration=60s,filename=myrecording.jfr"

JFR rapidly shows many thread crashes per minutes in Tomcat 8 app log and doesn't actually collect data on Mac M1

Thread method sampler crashed Thread method sampler crashed for native

and results in a 0 byte myrecording.jfr

To Reproduce

In setenv.sh for Tomcat enable JFR

CATALINA_OPTS=" -XX:+FlightRecorder -XX:StartFlightRecording=duration=60s,filename=myrecording.jfr"

Start Tomcat with the Spring application and do some simple manual testing

Expected behavior

No app log thread crashes and JFR file is created

Platform information

OS: MacOS Monterey 12.4 on Mac M1 JDK Version: Corretto 8.342.07.3 aarch64 Spring Framework 5.3.4 Tomcat 8.0.53

Additional context

I have a 14" and a 16" Macbook Pro M1 and this issue repeats on both.

alecl avatar Aug 02 '22 14:08 alecl

Hello @alecl, thank you for your report, we are looking to this issue. I'll post a feedback when we will be able to reproduce it/

mrserb avatar Aug 09 '22 02:08 mrserb

Sorry for the delay. Yes, we can reproduce the issue - JFR is not working on Mac M1. We'll continue to investigate on our side.

olivergillespie avatar Aug 18 '22 08:08 olivergillespie

@olivergillespie Is there a JBS bug for this?

navyxliu avatar Nov 15 '22 06:11 navyxliu

I don't think upstream OpenJDK supports Mac M1 on JDK8 at all, so there wouldn't be any JBS issues.

olivergillespie avatar Nov 15 '22 10:11 olivergillespie