m1 更新 11.4 后 Java 报错...

2021-05-25 11:46:44 +08:00
 stimw

A fatal error has been detected by the Java Runtime Environment:

Internal Error (sharedRuntime.cpp:531), pid=2424, tid=7427

Error: ShouldNotReachHere()

JRE version: OpenJDK Runtime Environment (16.0+14) (build 16+14)

Java VM: OpenJDK 64-Bit Server VM (16+14, mixed mode, tiered, compressed oops, 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

If you would like to submit a bug report, please visit: https://bugreport.java.com/bugreport/crash.jsp

--------------- T H R E A D --------------- Current thread (0x000000015400be00): JavaThread "main" [_thread_in_Java, id=7427, stack(0x000000016d7b0000,0x000000016d9b3000)] Stack: [0x000000016d7b0000,0x000000016d9b3000], sp=0x000000016d9b1750, free space=2053k Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.dylib+0x9b4130] VMError::report_and_die(int, char const*, char const*, char*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x46c V [libjvm.dylib+0x9b4884] VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, char*)+0x40 V [libjvm.dylib+0x2ad690] report_vm_error(char const*, int, char const*, char const*, ...)+0x5c V [libjvm.dylib+0x2ad864] report_should_not_reach_here(char const*, int)+0x2c V [libjvm.dylib+0x818d4c] SharedRuntime::raw_exception_handler_for_return_address(JavaThread*, unsigned char*)+0x178 V [libjvm.dylib+0x818df0] SharedRuntime::exception_handler_for_return_address(JavaThread*, unsigned char*)+0x28 v ~StubRoutines::forward exception j java.lang.Class.forName(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+43 java.base@16

烦得很...用 brew 重装也一样

4987 次点击
所在节点    Apple
30 条回复
Mitt
2021-05-25 19:01:24 +08:00
m1 复现😵‍💫
Mitt
2021-05-25 19:05:50 +08:00
但目测应该是 jdk 自己做了啥硬核判断,日志里显示 ClassNotFound
haiironezumi
2021-05-25 19:35:35 +08:00
环境
openjdk 11.0.10 2021-01-19 LTS
OpenJDK Runtime Environment Zulu11.45+27-CA (build 11.0.10+9-LTS)
OpenJDK 64-Bit Server VM Zulu11.45+27-CA (build 11.0.10+9-LTS, mixed mode)
测试没问题
测试程序 MARS MISP Assembly Runtime Simulator

JDK JRE 一定要用 LTS 版!
bugprogrammer
2021-05-25 23:24:40 +08:00
11.5 beta 凑个热闹
java --version
openjdk 16.0.1 2021-04-20
OpenJDK Runtime Environment Zulu16.30+15-CA (build 16.0.1+9)
OpenJDK 64-Bit Server VM Zulu16.30+15-CA (build 16.0.1+9, mixed mode)
bugprogrammer
2021-05-25 23:25:25 +08:00
m1 下测试的
stimw
2021-05-26 06:56:52 +08:00
我去提问后有人回答我了:

Using the java11 / openjdk@11 brew formula got me going for now.

Did a bit more digging and saw this referenced over at the openjdk issue tracker: https://bugs.openjdk.java.net/browse/JDK-8267235

There is currently a github issue over at https://github.com/Homebrew/homebrew-core/issues/77954 reporting the issue for what is installed by the brew formula itself. It looks like there may be some pull requests already so expect it to be resolved soon.
stimw
2021-05-26 07:06:51 +08:00
@mons
@Mitt
@bugprogrammer
看楼上哈
bugprogrammer
2021-05-26 22:54:27 +08:00
@stimw 可能我直接升级到 11.5 beta 规避了这个坑?
mxi1
2021-05-26 23:48:48 +08:00
@mons 我也尝试 zulu 了;问题是一样的;看前面大家分享的 bugreport 讨论,貌似是 java vm 的实现问题;。。
byte10
2021-05-27 09:08:27 +08:00
@stimw 这个时候 vscode 远程开发 的好处就来了。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/779062

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX