Live data from Hacker News

macOS 14.4 causes JVM crashes

blogs.oracle.com

11–20 of 160 posts

Re: macOS 14.4 causes JVM crashes

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

Maybe not a lot of macOS devs use Java, but a lot of Java devs use macOS

Re: macOS 14.4 causes JVM crashes

#12
post #5
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?

For one, it doesn't affect all versions of Java. Java 20 (an LTS release) and 21, for example, don't have this problem.

Per the bug report, all versions since Java 8 are affected.

Re: macOS 14.4 causes JVM crashes

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

> is anyone even using Java on macOS?

IntelliJ IDEA, the product itself, is JVM based.

Re: macOS 14.4 causes JVM crashes

#15
post #10
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?

It's not terminating directly. I've seen a few IDE crashes this week, less than one per day, but since there's no log there's no easy way to determine it's related to a macOS change.

IntelliJ did this twice to me on Thursday and there was a crash log both times. I only reported one to Apple.

Did you check the Console app for crash reports?

Re: macOS 14.4 causes JVM crashes

#16
post #12
post #5

Earlier quoted context omitted.

For one, it doesn't affect all versions of Java. Java 20 (an LTS release) and 21, for example, don't have this problem.

Per the bug report, all versions since Java 8 are affected.

> Affected Version: 8,11,17,21,22

This has changed (they added 21) since I posted the comment above, so it looks like they’re still getting a handle on it.

Re: macOS 14.4 causes JVM crashes

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

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.

Re: macOS 14.4 causes JVM crashes

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

It broke since recent MacOS 14.4, even at 14.4 betas it worked.

Re: macOS 14.4 causes JVM crashes

#19
post #11
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?

Maybe not a lot of macOS devs use Java, but a lot of Java devs use macOS

Also, if you're a mobile developer you likely have a Mac, and if you're a mobile dev that doesn't target iOS exclusively, then you run java.

Re: macOS 14.4 causes JVM crashes

#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 page. Then you need to tell the operating system to change the page from writable to executable.

If you then try to write to the page, you’ll get a signal (SIGSEGV or SIGBUS, according to the article).

Oracle’s JVM apparently relies on this behavior: a Java process sometimes tries to write to a page (in its own memory space) that is not marked writable. The JVM then catches the SIGSEGV and recovers (perhaps by asking the operating system to change the page back from executable to writable, or by arranging to write to a different page, or to abort the write operation altogether).

Post reply on HN