An issue introduced by macOS 14.4, which causes Java process to terminate unexpectedly, is affecting all Java versions from Java 8 to the early access builds of JDK 22. There is no workaround available, and since there is no easy way to revert a macOS update, affected users might be unable to return to a stable configuration unless they have a complete backup of their systems prior to the OS update.

The issue was not present in the early access releases for macOS 14.4, so it was discovered only after Apple released the update.

macOS on Apple silicon processors (M1, M2, and M3) includes a feature which controls how and when dynamically generated code can be either produced (written) or executed on a per-thread basis. 

As a normal part of the just-in-time compile and execute cycle, processes running on macOS may access memory in protected memory regions. Prior to the macOS 14.4 update, in certain circumstances, the macOS kernel would respond to these protected memory accesses by sending a signal, SIGBUS or SIGSEGV, to the process. The process could then choose to handle the signal and continue execution.  With macOS 14.4, when a thread is operating in the write mode, if a memory access to a protected memory region is attempted, macOS will send the signal SIGKILL instead. That signal cannot be handled by the process and the process is unconditionally terminated.

The Java Virtual Machine generates code dynamically and leverages the protected memory access signal mechanism both for correctness (e.g., to handle the truncation of memory mapped files) and for performance. With macOS 14.4, programs that attempt this will now terminate instead of having the opportunity to handle the signal.

Ahead-of-Time compiled applications created with GraalVM Native Image should not be affected, but your ability to build new images may be.

Oracle has notified its customers, Apple, and our partners in OpenJDK of this situation. We recommend that users of Java on ARM-based Apple devices running macOS 14 delay applying the update until this issue is resolved.

The issue can be tracked on bugs.java.com with bugID JDK-8327860

来源:https://blogs.oracle.com/java/post/java-on-macos-14-4