Java crashes on arm macs with macOS 14.4

Java crashes on arm macs with macOS 14.4

The original is here.

Due to a bug in macOS 14.4, the machine’s Java process may terminate unexpectedly. This affects all Java versions from 8 to 22. There is no way to avoid or work around this bug. And there’s no easy way to roll back a macOS update.

This bug was not present in beta versions of macOS 14.4. He appeared only in the release.

macOS on M1, M2 and M3 Arm processors has a feature that controls how and when executable code is generated and executed in each thread.

In normal operation, the JVM accesses protected memory areas. Prior to version 14.4, macOS sent SIGBUS or SIGSEGV signals to the process in such cases. The process could decide for itself what to do with it and whether to continue working. In version 14.4, when a process tries to write to a protected memory area, masOS sends it a SIGKILL. And the process is forcibly terminated.

The JVM generates executable code dynamically. And it uses protected memory areas to optimize and check the correctness of its work. Because of this, on macOS 14.4 the JVM gets SIGKILL and terminates.

Precompiled native GraalVM applications are not prone to this problem. But there may be a problem with compiling new such applications.

Oracle has alerted its customers, Apple, and the OpenJDK community about this issue. Oracle recommends not upgrading ARM Macs to version 14.4 until Apple fixes the bug.

Link to the ticket.

Related posts