Opened 3 years ago

Closed 3 years ago

#62985 closed defect (fixed)

openjdk16-zulu crashes on m1

Reported by: catap (Kirill A. Korinsky) Owned by: breun (Nils Breunese)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: openjdk16-zulu

Description

Let me just share a log:

catap@Mac-mini ~ % java                              
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.

catap@Mac-mini ~ % sudo port install openjdk16-zulu  
--->  Fetching archive for openjdk16-zulu
--->  Attempting to fetch openjdk16-zulu-16.30.15_0.darwin_20.arm64.tbz2 from https://fra.de.packages.macports.org/openjdk16-zulu
--->  Attempting to fetch openjdk16-zulu-16.30.15_0.darwin_20.arm64.tbz2 from https://packages.macports.org/openjdk16-zulu
--->  Attempting to fetch openjdk16-zulu-16.30.15_0.darwin_20.arm64.tbz2 from https://nue.de.packages.macports.org/openjdk16-zulu
--->  Fetching distfiles for openjdk16-zulu
--->  Verifying checksums for openjdk16-zulu
--->  Extracting openjdk16-zulu
--->  Configuring openjdk16-zulu
--->  Building openjdk16-zulu
--->  Staging openjdk16-zulu into destroot
Warning: openjdk16-zulu installs files outside the common directory structure.
--->  Installing openjdk16-zulu @16.30.15_0
--->  Activating openjdk16-zulu @16.30.15_0
--->  Cleaning openjdk16-zulu
--->  Scanning binaries for linking errors
--->  No broken files found.
--->  No broken ports found.
--->  Some of the ports you installed have notes:
  openjdk16-zulu has the following notes:
    If you have more than one JDK installed you can make openjdk16-zulu the default
    by adding the following line to your shell profile:
    
        export JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk16-zulu/Contents/Home
catap@Mac-mini ~ % export JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk16-zulu/Contents/Home
catap@Mac-mini ~ % java                                                                           
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (sharedRuntime.cpp:532), pid=16264, tid=10243
#  Error: ShouldNotReachHere()
#
# JRE version: OpenJDK Runtime Environment Zulu16.30+15-CA (16.0.1+9) (build 16.0.1+9)
# Java VM: OpenJDK 64-Bit Server VM Zulu16.30+15-CA (16.0.1+9, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# No core dump will be written. 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:
# /Users/catap/hs_err_pid16264.log
#
# If you would like to submit a bug report, please visit:
#   http://www.azulsystems.com/support/
#
zsh: abort      java
catap@Mac-mini ~ % 

Change History (15)

comment:1 Changed 3 years ago by catap (Kirill A. Korinsky)

Ok, it is JDK bug: https://bugs.openjdk.java.net/browse/JDK-8267235

And looks like just update JDK is enough ;)

comment:2 Changed 3 years ago by catap (Kirill A. Korinsky)

Nope, a fix contains in:

  • openjdk8u302
  • 11.0.12
  • 16.0.2

and all of them aren't released yet :(

comment:3 Changed 3 years ago by reneeotten (Renee Otten)

Owner: set to breun
Port: openjdk16-zulu added
Status: newassigned

comment:4 Changed 3 years ago by breun (Nils Breunese)

I don't have an M1 to test on myself, but I do see there is an update available, so I'll upgrade the port to Zulu 16.30.19, maybe that helps.

comment:5 Changed 3 years ago by breun (Nils Breunese)

It seems version 16.30.19 is only available for arm64, x86_64 is still at 16.30.15. I don't know if MacPorts actually supports different versions of a subport for different architectures.

comment:6 Changed 3 years ago by breun (Nils Breunese)

@catap If you download the 16.30.19 .tar.gz from https://www.azul.com/downloads/?version=java-16-sts&os=macos&architecture=arm-64-bit&package=jdk, does that work on your machine?

comment:7 Changed 3 years ago by catap (Kirill A. Korinsky)

@breun my original zulu-jdk supported it ;) Feel free to reuse my hacks.

comment:8 Changed 3 years ago by catap (Kirill A. Korinsky)

catap@Mac-mini zulu16.30.19-ca-jdk16.0.1-macosx_aarch64 % ./bin/java -version
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment Zulu16.30+19-CA (build 16.0.1+9)
OpenJDK 64-Bit Server VM Zulu16.30+19-CA (build 16.0.1+9, mixed mode)
catap@Mac-mini zulu16.30.19-ca-jdk16.0.1-macosx_aarch64 % 

zulu16.30.19-ca-jdk16.0.1-macosx_aarch64 seems working fine

comment:9 Changed 3 years ago by catap (Kirill A. Korinsky)

@breun FYI this bug exists at all JDK that I've installed to this machine. 8, 11 and 16.

comment:10 Changed 3 years ago by breun (Nils Breunese)

@catap For Java 8 and 11 the latest versions of Azul Zulu OpenJDK are already in MacPorts. If you directly download the arm64 .tar.gz releases for Java 8 and 11 from https://www.azul.com/downloads/?os=macos&architecture=arm-64-bit&package=jdk, do those also not work?

comment:11 Changed 3 years ago by breun (Nils Breunese)

I've updated openjdk16-zulu for arm64 to 16.30.19 via https://github.com/macports/macports-ports/pull/11169

Does that help?

comment:12 Changed 3 years ago by catap (Kirill A. Korinsky)

@breun looks like my original test with different version of java was wrong, and it seems that I've tested only java 16.

The good news: all available zulu jdk are working fine.

Thanks!

comment:13 Changed 3 years ago by catap (Kirill A. Korinsky)

Maybe it is a good idea to add simple test => call java -version?

comment:14 Changed 3 years ago by breun (Nils Breunese)

comment:15 Changed 3 years ago by breun (Nils Breunese)

Resolution: fixed
Status: assignedclosed

In f1afa4462c8fc0263028449c3424d88667c0de40/macports-ports (master):

openjdk*: add test

Closes: #62985

Note: See TracTickets for help on using tickets.