Live data from Hacker News

macOS 14.4 causes JVM crashes

blogs.oracle.com

61–70 of 160 posts

Re: macOS 14.4 causes JVM crashes

#62
post #47

> 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. […] 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. This isn’t just any old thread triggering SIGKILL, i…

So MacOS is trying to be smart, changes their API, and now we're blaming the JVM for doing something we don't understand?

At least they could have provided a path back to the old behavior.

Re: macOS 14.4 causes JVM crashes

#63
post #3

> "As a normal part of the just-in-time compile and execute cycle, processes running on macOS may access memory in protected memory regions." I'm just a lowly JavaScript/TypeScript/PHP programmer, but what is the Very Good Reason that Java trying to access other processes' memory?

In a virtual memory operating system, every program has its own address space. Accessing an unmapped address is not the same as trying to access another process's memory.

It's also pretty common to use memory protection to autoextend stacks... Allocate the stack size you need, ask the OS to mark the page(s) after the stack as protected, catch the signal when you hit the protection, allocate some more stack and a new protected page unless the stack is too big. Works for heaps too.

Let the MMU hardware check accesses, so you don't have to check everything in software all the time.

Re: macOS 14.4 causes JVM crashes

#65

I just bought a MacBook Pro with the M3 Max chip and installed MATLAB R2023b. Sonoma 14.3 is in place. As a requirement, I had to also install Corretto 8. MathWorks only supports the Java 8 JRE included with Amazon Corretto 8. I am already having several problems in MATLAB with his new setup. Can I assume that updating to Sonoma 14.4 might very well cause even more problems? I really don't understand any of this.

".. is affecting all Java versions from Java 8 to the early access builds of JDK 22. There is no workaround available .."

Do not update until Apple fixes the issue.

Re: macOS 14.4 causes JVM crashes

#67

Earlier quoted context omitted.

The change of a SIGSEGV to a SIGKILL, seriously?

And, why not? macOS is Apple’s IP and they have all rights to do with it as they want. Buy the way, Chrome/Node.js JavaScript engine uses JIT compilation too. Are they affected?

No. MacOS is UNIX Certified. This is a bug in MacOS. Breaks POSIX compliance.

Re: macOS 14.4 causes JVM crashes

#68
post #46

Earlier quoted context omitted.

And, why not? macOS is Apple’s IP and they have all rights to do with it as they want. Buy the way, Chrome/Node.js JavaScript engine uses JIT compilation too. Are they affected?

This breaks POSIX compatibility, which is basically saying FU to how a lot of developers expect to interact with an operating system for decades now.

It is not obvious to me that this breaks POSIX compatibility. The kernel may choose to signal a process with SIGSEGV on a memory protection violation but I can't find anything that suggests this is required.

Last I checked, macOS formally maintains POSIX certification. Linux is not POSIX compliant, so I wouldn't use Linux as the measure of what is correct behavior under POSIX.

Re: macOS 14.4 causes JVM crashes

#69
post #46

Earlier quoted context omitted.

This breaks POSIX compatibility, which is basically saying FU to how a lot of developers expect to interact with an operating system for decades now.

It is not obvious to me that this breaks POSIX compatibility. The kernel may choose to signal a process with SIGSEGV on a memory protection violation but I can't find anything that suggests this is required . Last I checked, macOS formally maintains POSIX certification. Linux is not POSIX compliant, so I wouldn't use Linux as the measure of what is correct behavior under POSIX.

POSIX.1-2017 specification. Section titled "Memory Protection"

https://pubs.opengroup.org/onlinepubs/9699919799/functions/V...

Re: macOS 14.4 causes JVM crashes

#70
post #67

Earlier quoted context omitted.

And, why not? macOS is Apple’s IP and they have all rights to do with it as they want. Buy the way, Chrome/Node.js JavaScript engine uses JIT compilation too. Are they affected?

No. MacOS is UNIX Certified. This is a bug in MacOS. Breaks POSIX compliance.

[deleted]
Post reply on HN