This came out over the weekend. From blogs.oracle.com:
The problem is apparently caused by Apple changing what happens when the JVM tries to access a protected page to convert it to a JIT compilation. In the past such an access would trigger a SIGBUS signal which the JVM could trap and do the appropriate action to continue the JIT operation. For some reason, Apple decided to change that to a SIGKILL which can't be trapped and causes an immediate termination of the process.
I'd imagine that Apple will get a fix out for this fairly rapidly considering that their own developers need to develop with Java for their various services.
Edit: From bugs.java.com there is some simple c-source that will trigger the bug:
There doesn't seem to be any usernames or emails on Oracle's bug tracker so I don't have an attribution for the above code.
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 problem is apparently caused by Apple changing what happens when the JVM tries to access a protected page to convert it to a JIT compilation. In the past such an access would trigger a SIGBUS signal which the JVM could trap and do the appropriate action to continue the JIT operation. For some reason, Apple decided to change that to a SIGKILL which can't be trapped and causes an immediate termination of the process.
I'd imagine that Apple will get a fix out for this fairly rapidly considering that their own developers need to develop with Java for their various services.
Edit: From bugs.java.com there is some simple c-source that will trigger the bug:
I've managed to narrow this down to this small reproducer:
C:
#include <stdio.h>
#include <sys/mman.h>
#include <pthread.h>
int main() {
pthread_jit_write_protect_np(0);
char* mem = (char*)mmap(0, 16 * 1024, 0, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0);
fprintf(stderr, "addr = %p\n", mem);
char value = *mem;
fprintf(stderr, "value = %c\n", value);
return 0;
}
This results the expected SIGBUS on 14.3, but on 14.4 it results in a SIGKILL.
There doesn't seem to be any usernames or emails on Oracle's bug tracker so I don't have an attribution for the above code.
Last edited: