Live data from Hacker News

macOS 14.4 causes JVM crashes

blogs.oracle.com

31–40 of 160 posts

Re: macOS 14.4 causes JVM crashes

#31
post #20
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?

I don’t think the article claims that a Java process tries to access some other process’s memory. In a typical modern operating system, a memory page can be non-writable and non-executable, writable and non-executable, or non-writable and executable, but not simultaneously writable AND executable. If you generate executable code at runtime, then you need write access to a page to write the executable code into that p…

Thank you, that explained it way better than the original link.

Re: macOS 14.4 causes JVM crashes

#32

Earlier quoted context omitted.

This is what I do when my job forced me to use a mac. I think the only thing I installed on the mac outside of it was Firefox. Worked great for years before I changed jobs that let me bring my own hardware finally.

What is your preferred hardware and flavor of Linux for this? I'm trying to do the same

Rancher Desktop used Lima + QEMU behind the scenes: https://lima-vm.io/

Re: macOS 14.4 causes JVM crashes

#33

Earlier quoted context omitted.

The reasons are literally spelled out in the following paragraphs.

I’m asking because the reasons seem dumb to me, which is why I’m asking people smarter than I am about low-level memory management if they’re legitimate.

The article doesnt say anything about the JVM accessing other processes memory though.

Re: macOS 14.4 causes JVM crashes

#35
post #2

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 If this affects so many versions of Java and nobody notices, is anyone even using Java on macOS?

Sonoma has been out for only one week!

Re: macOS 14.4 causes JVM crashes

#36
A gross and low performance option for now might be to run Java under Rosetta, but I’m saying that based on them saying that this is apple silicon specifically and processes under rosetta have a bunch of quirks to support intel semantics. This would allow you to work around this for now.

That said I’m curious what the exact scenario that leads to this is, I’m assuming it’s not common as you would expect it to have come up during betas and pre -release seeds.

Re: macOS 14.4 causes JVM crashes

#37

Well, that’s why Apple forbids use of private APIs in the App Store apps. If you built all your tech stack on the foundation of some peculiar nondocumented platform’s behavior, don’t be surprised when this stack breaks.

This is not an API. It's the handling of writes to memory the process has protected. In the past this would generate a signal the process could handle and recover from. Now it generates a sigkill which is uncatchable / unrecoverable from.

These behaviours have been historically well documented.

Re: macOS 14.4 causes JVM crashes

#38
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?

It depends on exactly what is being done.

A fairly common idiom is to use memory protection to provide zero cost access checks, as you can generally catch the signals produced by most memory faults, and then work out where things went wrong and convert the memory access error into a catchable exception, or to lazily construct data structures or code.

So you want the trap, but the trap itself can be handled. It sounds like there’s been a semantic change when the trap occurs for execution of an address or an access to an executable page.

There are also a bunch of poorly documented Mac APIs to inform the memory manager and linker about JIT regions and I wonder if it’s related to those. It really depends on exactly what oracle’s jvm is trying to do, and what the subsequent cause of the fault is.

Certainly it’s a less than optimal failure though :-/

Re: macOS 14.4 causes JVM crashes

#39
post #37

Well, that’s why Apple forbids use of private APIs in the App Store apps. If you built all your tech stack on the foundation of some peculiar nondocumented platform’s behavior, don’t be surprised when this stack breaks.

This is not an API. It's the handling of writes to memory the process has protected. In the past this would generate a signal the process could handle and recover from. Now it generates a sigkill which is uncatchable / unrecoverable from. These behaviours have been historically well documented.

All system idiosyncrasies are APIs in the long run ;)

Re: macOS 14.4 causes JVM crashes

#40
post #37

Earlier quoted context omitted.

This is not an API. It's the handling of writes to memory the process has protected. In the past this would generate a signal the process could handle and recover from. Now it generates a sigkill which is uncatchable / unrecoverable from. These behaviours have been historically well documented.

All system idiosyncrasies are APIs in the long run ;)

The change of a SIGSEGV to a SIGKILL, seriously?
Post reply on HN