Live data from Hacker News

macOS 14.4 causes JVM crashes

blogs.oracle.com

21–30 of 160 posts

Re: macOS 14.4 causes JVM crashes

#21
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's not. It's trying to access unmapped or protected memory in its own process.

Basically what its used for is to implement an 'if' that's super fast on the most likely path but super slow on the less likely path.

It's not super clear what its being used for (this is often used for the GC but the fact that graal isn't affected means that likely still works). Possibly they are using this to detect attempts to use inline-cache entries that have been deleted.

Re: macOS 14.4 causes JVM crashes

#22
Apple and macOS is slowly becoming another Windows in terms of stability.

There was a HN post about a hashicorp founder using Linux within a vm on their mbp. Might adopt that same approach, if I can find the og post.

Re: macOS 14.4 causes JVM crashes

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

Minecraft runs on various Javas.

And there's a known issue with an interaction between minecraft, Java, and the video drivers that crashes out and it can be traced back all the way to here: https://github.com/glfw/glfw/issues/1997

It's not fixed.

Re: macOS 14.4 causes JVM crashes

#24
post #21
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's not. It's trying to access unmapped or protected memory in its own process. Basically what its used for is to implement an 'if' that's super fast on the most likely path but super slow on the less likely path. It's not super clear what its being used for (this is often used for the GC but the fact that graal isn't affected means that likely still works). Possibly they are using this to detect attempts to use inl…

object.field is implemented as a direct load from the object; if the object turned out to be null, then the resultant signal is caught and turned into a NullPointerException

Re: macOS 14.4 causes JVM crashes

#25

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.

JIT compilation can happen at any time. The runtime wants to create a native version of a previously interpreted snippet of code when it is called frequently enough to warrant this.

The article also describes W^X functionality, which means a region of memory is either executable (x)or writable. On macOS 14.4 violating this either-or condition results in a signal that can not be handled by the process.

Re: macOS 14.4 causes JVM crashes

#26
post #22

Apple and macOS is slowly becoming another Windows in terms of stability. There was a HN post about a hashicorp founder using Linux within a vm on their mbp. Might adopt that same approach, if I can find the og post.

Here’s the YouTube link from Mitchell. I was thinking about doing something similar lately too.

https://youtu.be/ubDMLoWz76U?si=ipmho73-r9FzZpBp

Re: macOS 14.4 causes JVM crashes

#27
post #22

Apple and macOS is slowly becoming another Windows in terms of stability. There was a HN post about a hashicorp founder using Linux within a vm on their mbp. Might adopt that same approach, if I can find the og post.

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.

Re: macOS 14.4 causes JVM crashes

#28
post #22

Apple and macOS is slowly becoming another Windows in terms of stability. There was a HN post about a hashicorp founder using Linux within a vm on their mbp. Might adopt that same approach, if I can find the og post.

To be fair, this is the kind of breakage I'd expect from macOS, but never from Windows

Re: macOS 14.4 causes JVM crashes

#29
post #22

Apple and macOS is slowly becoming another Windows in terms of stability. There was a HN post about a hashicorp founder using Linux within a vm on their mbp. Might adopt that same approach, if I can find the og post.

When's the last time you had a BSOD on Windows? I honestly can't recall.

Re: macOS 14.4 causes JVM crashes

#30
post #22

Apple and macOS is slowly becoming another Windows in terms of stability. There was a HN post about a hashicorp founder using Linux within a vm on their mbp. Might adopt that same approach, if I can find the og post.

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
Post reply on HN