-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
None
-
x86_64
-
os_x
Running 'java -jar jol-cli-0.17-full.jar internals java.lang.Object' on OpenJDK mainline causes my MacOS Terminal to crash with a SIGSEGV.
It seems to happen in AttachMain.java, during this call:
attachMethod.invoke(agent, (int) request.getProcessId());
How to reproduce:
# Download JOL from Maven Central
% curl -O https://repo.maven.apache.org/maven2/org/openjdk/jol/jol-cli/0.17/jol-cli-0.17-full.jar
# Use a local OpenJDK build on MacOS 12.6.3 (21G419) (Intel)
% build/macosx-x86_64-server-release/images/jdk/bin/java -version
openjdk version "21-internal" 2023-09-19
OpenJDK Runtime Environment (build 21-internal-adhoc.eirbjo.jdk)
OpenJDK 64-Bit Server VM (build 21-internal-adhoc.eirbjo.jdk, mixed mode, sharing)
# Run JOL
% build/macosx-x86_64-server-release/images/jdk/bin/java -jar jol-cli-0.17-full.jar internals java.lang.Object
This consistently leads to a hard crash of Terminal.app. I have tried restarting Terminal, restarting the Mac etc. It crashes hard every time.
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007ff7b7f7ffe8
Exception Codes: 0x0000000000000002, 0x00007ff7b7f7ffe8
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [2307]
Maybe more an Apple problem than a JOL problem, but I thought I'd share anyhow.
It seems to happen in AttachMain.java, during this call:
attachMethod.invoke(agent, (int) request.getProcessId());
How to reproduce:
# Download JOL from Maven Central
% curl -O https://repo.maven.apache.org/maven2/org/openjdk/jol/jol-cli/0.17/jol-cli-0.17-full.jar
# Use a local OpenJDK build on MacOS 12.6.3 (21G419) (Intel)
% build/macosx-x86_64-server-release/images/jdk/bin/java -version
openjdk version "21-internal" 2023-09-19
OpenJDK Runtime Environment (build 21-internal-adhoc.eirbjo.jdk)
OpenJDK 64-Bit Server VM (build 21-internal-adhoc.eirbjo.jdk, mixed mode, sharing)
# Run JOL
% build/macosx-x86_64-server-release/images/jdk/bin/java -jar jol-cli-0.17-full.jar internals java.lang.Object
This consistently leads to a hard crash of Terminal.app. I have tried restarting Terminal, restarting the Mac etc. It crashes hard every time.
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007ff7b7f7ffe8
Exception Codes: 0x0000000000000002, 0x00007ff7b7f7ffe8
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [2307]
Maybe more an Apple problem than a JOL problem, but I thought I'd share anyhow.