corretto / corretto-8

Amazon Corretto 8 is a no-cost, multi-platform, production-ready distribution of OpenJDK 8
GNU General Public License v2.0
2.11k stars 221 forks source link

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

Open alecl opened 2 years ago

alecl commented 2 years ago

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.

mrserb commented 2 years ago

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/

olivergillespie commented 2 years ago

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.

navyxliu commented 1 year ago

@olivergillespie Is there a JBS bug for this?

olivergillespie commented 1 year ago

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

youngledo commented 2 months ago

So is this a OpenJDK bug?

olivergillespie commented 2 months ago

Not an OpenJDK bug, OpenJDK does not have JDK8 Mac M1 support. But we're also not actively working on this issue, sorry, so don't expect a timely fix.