homebrew-core
homebrew-core copied to clipboard
JVM crash when starting JFR recording with openjdk 1.8 installed with brew
brew gist-logs <formula> link OR brew config AND brew doctor output
HOMEBREW_VERSION: 3.5.5
ORIGIN: https://github.com/Homebrew/brew
HEAD: f041a59af9daddc7c7afe8537e3858103f8f9ab9
Last commit: 4 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 040eff831be5ed38d6fd0b6f3a4ef04b01aa7a24
Core tap last commit: 25 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: dodeca-core 64-bit kabylake
Clang: 13.1.6 build 1316
Git: 2.37.1 => /usr/local/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.4-x86_64
CLT: 13.4.0.0.1.1651278267
Xcode: 13.4.1
Verification
- [X] I ran
brew updateand am still able to reproduce my issue. - [X] I have resolved all warnings from
brew doctorand that did not fix my problem.
What were you trying to do (and why)?
Start a JFR (Java Flight Recorder) recording to collect diagnostic data of a java application.
What happened (include all command output)?
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000010d125539, pid=3917, tid=0x0000000000009e03
#
# JRE version: OpenJDK Runtime Environment (8.0_322) (build 1.8.0_322-bre_2022_02_28_15_01-b00)
# Java VM: OpenJDK 64-Bit Server VM (25.322-b00 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V [libjvm.dylib+0x549539] Unsafe_SetBoolean+0x61
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /var/folders/97/j_7v7gr50ts400jr00rvvjmh0000gn/T//hs_err_pid3917.log
#
# If you would like to submit a bug report, please visit:
# https://github.com/Homebrew/homebrew-core/issues
#
zsh: abort /usr/local/opt/tomcat@7/bin/catalina run
What did you expect to happen?
JVM doesn't crash and the JFR recording collects diagnostic data.
Step-by-step reproduction instructions (by running brew commands)
brew install openjdk@8
brew install tomcat@7
/usr/local/opt/tomcat@7/bin/catalina run
jcmd <pid_of_tomcat> JFR.start name=default settings=default
Does it crash if you use a JRE that wasn't built by Homebrew? A JRE provided by a Cask is fine.
The issue reproduces only with OpenJDK 1.8 installed by brew and does not reproduce with either Temurin, Zulu or Amazon builds.
I found a similar issue reported https://github.com/DataDog/dd-trace-java/issues/2997 - also occurs only with OpenJDK brew builds.
==> Installing openjdk@8
==> common/autoconf/autogen.sh
==> ./configure --with-boot-jdk-jvmargs=-Duser.home=/Users/sureshadapa/Library/Caches/Homebrew/java_cache --with-boot-jdk=/private/tmp/openjdkA8-20220810-59359-1ode0ke/jdk8u345-b01/boot-jdk --with-debug-l
==> make bootcycle-images CONF=release
Last 15 lines from /Users/sureshadapa/Library/Logs/Homebrew/openjdk@8/03.make:
2022-08-10 14:06:36 +0000
make
bootcycle-images
CONF=release
No configurations found for /private/tmp/openjdkA8-20220810-59359-1ode0ke/jdk8u345-b01/! Please run configure to create a configuration.
Makefile:55: *** Cannot continue. Stop.
Do not report this issue to Homebrew/brew or Homebrew/core!
These open issues may also help:
JVM crash when starting JFR recording with openjdk 1.8 installed with brew https://github.com/Homebrew/homebrew-core/issues/106195
sureshadapa@localhost Kafdrop % brew install --build-from-source openjdk@8
==> Downloading https://cdn.azul.com/zulu/bin/zulu7.56.0.11-ca-jdk7.0.352-macosx_x64.tar.gz
Already downloaded: /Users/sureshadapa/Library/Caches/Homebrew/downloads/5ae724877cd80f4710cfb7b50aad8626308bf3343dddfbf07250c40caa80f25e--zulu7.56.0.11-ca-jdk7.0.352-macosx_x64.tar.gz
==> Downloading https://openjdk-sources.osci.io/openjdk8/openjdk8u345-ga.tar.xz
Already downloaded: /Users/sureshadapa/Library/Caches/Homebrew/downloads/16cf5f467b62fca342106593ed7f12f002efbd0ef062bde6fc9f9b54e6010b08--openjdk8u345-ga.tar.xz
==> common/autoconf/autogen.sh
==> ./configure --with-boot-jdk-jvmargs=-Duser.home=/Users/sureshadapa/Library/Caches/Homebrew/java_cache --with-boot-jdk=/private/tmp/openjdkA8-20220810-60843-1duugpo/jdk8u345-b01/boot-jdk --with-debug-l
==> make bootcycle-images CONF=release
Last 15 lines from /Users/sureshadapa/Library/Logs/Homebrew/openjdk@8/03.make:
2022-08-10 14:07:57 +0000
make
bootcycle-images
CONF=release
No configurations found for /private/tmp/openjdkA8-20220810-60843-1duugpo/jdk8u345-b01/! Please run configure to create a configuration.
Makefile:55: *** Cannot continue. Stop.
Do not report this issue to Homebrew/brew or Homebrew/core!
These open issues may also help:
JVM crash when starting JFR recording with openjdk 1.8 installed with brew https://github.com/Homebrew/homebrew-core/issues/106195
sureshadapa@localhost Kafdrop % uname -a Darwin PINEMAC0072.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64
sureshadapa@localhost Kafdrop % brew update Already up-to-date. sureshadapa@localhost Kafdrop % brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run brew link on these:
kubernetes-cli
sureshadapa@localhost Kafdrop % vi /Users/sureshadapa/Library/Logs/Homebrew/openjdk@8/02.configure
configure: error: Failed to determine Xcode version.
/private/tmp/openjdkA8-20220810-63860-103nuhj/jdk8u345-b01/common/autoconf/generated-configure.sh: line 84: 5: Bad file descriptor
====
sureshadapa@localhost jdk8u345-b01 % pwd
/Users/sureshadapa/Library/Caches/Homebrew/downloads/jdk8u345-b01
sureshadapa@localhost jdk8u345-b01 % grep -ir 'Failed to determine Xcode version' *
common/autoconf/toolchain.m4: AC_MSG_ERROR([Failed to determine Xcode version.])
common/autoconf/generated-configure.sh: as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
====
sureshadapa@localhost jdk8u345-b01 % brew install Xcode
Running `brew update --auto-update`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
You have 28 outdated formulae and 1 outdated cask installed.
You can upgrade them with brew upgrade
or list them with brew outdated.
Warning: No available formula with the name "xcode". Did you mean xcodegen?
==> Searching for similarly named formulae...
These similarly named formulae were found:
xcode-kotlin xcodegen
To install one of them, run (for example):
brew install xcode-kotlin
Xcode can be installed from the App Store.
Installing Xcode from AppStore
==== Will keep you posted...
Please don't keep us posted, the first message already mentions:
Do not report this issue to Homebrew/brew or Homebrew/core!
same error:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000010d1fa027, pid=27024, tid=0x000000000000af03
#
# JRE version: OpenJDK Runtime Environment (8.0_352) (build 1.8.0_352-bre_2022_11_08_21_10-b00)
# Java VM: OpenJDK 64-Bit Server VM (25.352-b00 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V [libjvm.dylib+0x53d027]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumpi
ng, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# https://github.com/Homebrew/homebrew-core/issues
#
I have solved my problem by re-installing the Xcode 12.4 for catalina and move (important) to application folder correctly. sorry to trouble. all good now!
I tested this with opendjk@8, tomcat@8 (tomcat 7 is now EOL), on macOS Ventura.
This worked without issue:
➜ ~ /usr/local/Cellar/openjdk@8/1.8.0-382_1/bin/jcmd 88264 JFR.start name=default settings=default
88264:
Started recording 1. No limit specified, using maxsize=250MB as default.
Use jcmd 88264 JFR.dump name=default filename=FILEPATH to copy recording data to file.
@iMichka, there's doubt about which build of OpenJDK 8 you tested with. The issue occurs only with the brew build, as indicated by the 'bre' prefix.
JRE version: OpenJDK Runtime Environment (8.0_322) (build 1.8.0_322-bre_2022_02_28_15_01-b00)
Here is what I did:
➜ ~ JRE_HOME=/usr/local/opt/openjdk@8 /usr/local/opt/tomcat@8/bin/catalina run
Using CATALINA_BASE: /usr/local/Cellar/tomcat@8/8.5.93/libexec
Using CATALINA_HOME: /usr/local/Cellar/tomcat@8/8.5.93/libexec
Using CATALINA_TMPDIR: /usr/local/Cellar/tomcat@8/8.5.93/libexec/temp
Using JRE_HOME: /usr/local/opt/openjdk@8
Using CLASSPATH: /usr/local/Cellar/tomcat@8/8.5.93/libexec/bin/bootstrap.jar:/usr/local/Cellar/tomcat@8/8.5.93/libexec/bin/tomcat-juli.jar
Using CATALINA_OPTS:
27-Sep-2023 21:19:08.498 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/8.5.93
27-Sep-2023 21:19:08.503 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Aug 23 2023 22:43:14 UTC
27-Sep-2023 21:19:08.503 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.93.0
27-Sep-2023 21:19:08.503 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Mac OS X
27-Sep-2023 21:19:08.503 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 13.5.1
27-Sep-2023 21:19:08.503 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86_64
27-Sep-2023 21:19:08.503 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/local/Cellar/openjdk@8/1.8.0-382_1/libexec/openjdk.jdk/Contents/Home/jre
27-Sep-2023 21:19:08.503 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_382-bre_2023_09_05_21_07-b00
27-Sep-2023 21:19:08.503 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Homebrew
27-Sep-2023 21:19:08.504 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/Cellar/tomcat@8/8.5.93/libexec
27-Sep-2023 21:19:08.504 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/Cellar/tomcat@8/8.5.93/libexec
27-Sep-2023 21:19:08.504 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/Cellar/tomcat@8/8.5.93/libexec/conf/logging.properties
27-Sep-2023 21:19:08.504 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
27-Sep-2023 21:19:08.504 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
27-Sep-2023 21:19:08.504 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
27-Sep-2023 21:19:08.504 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
27-Sep-2023 21:19:08.505 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
27-Sep-2023 21:19:08.505 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/Cellar/tomcat@8/8.5.93/libexec
27-Sep-2023 21:19:08.505 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/Cellar/tomcat@8/8.5.93/libexec
27-Sep-2023 21:19:08.505 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/Cellar/tomcat@8/8.5.93/libexec/temp
27-Sep-2023 21:19:08.505 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [/Users/michkapopoff/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
27-Sep-2023 21:19:08.594 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
27-Sep-2023 21:19:08.620 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 422 ms
27-Sep-2023 21:19:08.723 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
27-Sep-2023 21:19:08.723 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/8.5.93]
27-Sep-2023 21:19:08.732 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/Cellar/tomcat@8/8.5.93/libexec/webapps/docs]
27-Sep-2023 21:19:08.957 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/Cellar/tomcat@8/8.5.93/libexec/webapps/docs] has finished in [223] ms
27-Sep-2023 21:19:08.957 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/Cellar/tomcat@8/8.5.93/libexec/webapps/manager]
27-Sep-2023 21:19:08.982 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/Cellar/tomcat@8/8.5.93/libexec/webapps/manager] has finished in [25] ms
27-Sep-2023 21:19:08.982 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/Cellar/tomcat@8/8.5.93/libexec/webapps/examples]
27-Sep-2023 21:19:09.192 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/Cellar/tomcat@8/8.5.93/libexec/webapps/examples] has finished in [210] ms
27-Sep-2023 21:19:09.192 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/Cellar/tomcat@8/8.5.93/libexec/webapps/ROOT]
27-Sep-2023 21:19:09.202 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/Cellar/tomcat@8/8.5.93/libexec/webapps/ROOT] has finished in [10] ms
27-Sep-2023 21:19:09.203 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/Cellar/tomcat@8/8.5.93/libexec/webapps/host-manager]
27-Sep-2023 21:19:09.215 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/Cellar/tomcat@8/8.5.93/libexec/webapps/host-manager] has finished in [12] ms
27-Sep-2023 21:19:09.217 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
27-Sep-2023 21:19:09.229 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 609 ms
/usr/local/opt/openjdk@8/bin/jcmd 6627 JFR.start name=default settings=default
6627:
Started recording 1. No limit specified, using maxsize=250MB as default.
Use jcmd 6627 JFR.dump name=default filename=FILEPATH to copy recording data to file.
On macOS Ventura (Intel), with all the latest versions of brew, openjdk@8 and tomcat@8
@Godagen @archzi still having this issue? I could not reproduce this locally.
Closing. The initial report dates from July 2022 … if we were not able to fix this since that time, no-one will probably do it. Sorry