V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
stimw
V2EX  ›  Apple

m1 更新 11.4 后 Java 报错...

  •  
  •   stimw · May 25, 2021 · 5547 views
    This topic created in 1800 days ago, the information mentioned may be changed or developed.

    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 重装也一样

    Supplement 1  ·  May 26, 2021
    Stack Overflow 上有老哥回复我:

    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.
    30 replies    2021-05-27 09:08:27 +08:00
    gxy2825
        1
    gxy2825  
       May 25, 2021
    刚准备更新,还好来 v 站看了一眼,兄弟保重
    stimw
        2
    stimw  
    OP
       May 25, 2021
    要疯了,安装 azul 的 jdk16 也一样
    yihy8023
        3
    yihy8023  
       May 25, 2021 via iPhone
    正在更新中,别吓我呀
    stimw
        4
    stimw  
    OP
       May 25, 2021 via Android
    有老哥更新完没问题的么。。我是解决不掉了,如果有人没问题我就直接重装了
    stimw
        5
    stimw  
    OP
       May 25, 2021 via Android
    @yihy8023 更新完了能反馈一下吗
    yihy8023
        6
    yihy8023  
       May 25, 2021 via iPhone
    @stimw 没有问题呀,
    ❯ java -version
    openjdk version "1.8.0_282"
    OpenJDK Runtime Environment (Zulu 8.52.0.23-CA-macos-aarch64) (build 1.8.0_282-b08)
    OpenJDK 64-Bit Server VM (Zulu 8.52.0.23-CA-macos-aarch64) (build 25.282-b08, mixed mode)
    stimw
        7
    stimw  
    OP
       May 25, 2021 via Android
    @yihy8023 emm...jdk16 呢
    devinww
        8
    devinww  
       May 25, 2021
    有没有用 8 的。。
    wellsc
        9
    wellsc  
       May 25, 2021
    sdkman 安装试试
    Ayanokouji
        10
    Ayanokouji  
       May 25, 2021
    11.4 jdk16 没问题
    Ayanokouji
        11
    Ayanokouji  
       May 25, 2021
    我的是 intel 的
    stimw
        12
    stimw  
    OP
       May 25, 2021 via Android
    更新一下,重装系统依然没有用
    stimw
        13
    stimw  
    OP
       May 25, 2021 via Android
    @Ayanokouji intel 应该没问题。。m1 真是🐴没了
    stimw
        14
    stimw  
    OP
       May 25, 2021 via Android
    暂时的解决方法:千万不要安装 jdk16 !!!安装 15 !!!
    mons
        15
    mons  
       May 25, 2021
    M1 11.4 Zulu JDK 16 没问题

    java -version
    openjdk version "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)
    MrKrabs
        16
    MrKrabs  
       May 25, 2021
    我觉得 m1 就别第一时间升系统了
    DinnyXu
        17
    DinnyXu  
       May 25, 2021
    open jdk 的适配率还是不够高,就平常的项目使用 open jdk 启动都还有报错,跟系统没有原因
    stimw
        18
    stimw  
    OP
       May 25, 2021 via Android
    @mons 我 15 没问题 16 报错,吐了
    czwen1993
        19
    czwen1993  
       May 25, 2021
    邪了,我没更新,但今天也出现类似的问题

    No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again

    然后我执行 ulimit -c unlimited 好像就没出现了。

    不过我是 intel 。
    stimw
        20
    stimw  
    OP
       May 25, 2021 via Android
    @czwen1993 对我没啥用。。
    Mitt
        21
    Mitt  
       May 25, 2021 via iPhone
    m1 复现😵‍💫
    Mitt
        22
    Mitt  
       May 25, 2021
    但目测应该是 jdk 自己做了啥硬核判断,日志里显示 ClassNotFound
    haiironezumi
        23
    haiironezumi  
       May 25, 2021
    环境
    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
        24
    bugprogrammer  
       May 25, 2021
    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
        25
    bugprogrammer  
       May 25, 2021
    m1 下测试的
    stimw
        26
    stimw  
    OP
       May 26, 2021 via Android
    我去提问后有人回答我了:

    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
        27
    stimw  
    OP
       May 26, 2021 via Android
    @mons
    @Mitt
    @bugprogrammer
    看楼上哈
    bugprogrammer
        28
    bugprogrammer  
       May 26, 2021
    @stimw 可能我直接升级到 11.5 beta 规避了这个坑?
    mxi1
        29
    mxi1  
       May 26, 2021
    @mons 我也尝试 zulu 了;问题是一样的;看前面大家分享的 bugreport 讨论,貌似是 java vm 的实现问题;。。
    byte10
        30
    byte10  
       May 27, 2021
    @stimw 这个时候 vscode 远程开发 的好处就来了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1471 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 59ms · UTC 16:54 · PVG 00:54 · LAX 09:54 · JFK 12:54
    ♥ Do have faith in what you're doing.