Skip to content

Commit f3a4655

Browse files
authored
Merge pull request #8302 from s1ck/all-mac-workaround-2.5
Extend intel-Mac-Azul workaround to all-Mac
2 parents 28b8734 + 8d8f6c7 commit f3a4655

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

doc/modules/ROOT/pages/installation/index.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ For example, exporting graphs xref:management-ops/graph-export/graph-export-csv.
7777
You can find the list of all the configuration options xref:production-deployment/configuration-settings.adoc[here].
7878
Refer to the <<_installation_methods,installation methods>> for details on how to edit a Neo4j database configuration depending on the Neo4j deployment.
7979

80+
== Graph Data Science on MacOS
81+
82+
If you are running MacOS (x86 or ARM), it is currently required to add the following configuration entry to `neo4j.conf`:
83+
84+
----
85+
server.jvm.additional=-Djol.skipHotspotSAAttach=true
86+
----
87+
88+
8089
== Reference
8190

8291
* xref:installation/supported-neo4j-versions.adoc[Supported Neo4j versions]

doc/modules/ROOT/pages/installation/neo4j-desktop.adoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ If the procedure allowlist is configured, make sure to also include procedures f
3030
dbms.security.procedures.allowlist=gds.*
3131
----
3232

33-
If you are running MacOS on an intel CPU, it is required to add the following configuration entry to the configuration:
33+
If you are running MacOS (x86 or ARM), it is required to add the following configuration entry to the configuration:
3434

3535
----
3636
server.jvm.additional=-Djol.skipHotspotSAAttach=true
3737
----
38-
39-
This is a workaround for a bug in the Java runtime that is used by Neo4j Desktop.

memory-usage/src/main/java/org/neo4j/gds/mem/MemoryUsage.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ private static final class VmInfoHolder {
372372
*/
373373
@SuppressForbidden(reason = "we want to use system.out here")
374374
private static boolean isVmInfoAvailable() {
375-
intelMacWorkaround();
375+
macWorkaround();
376376

377377
var sysOut = System.out;
378378
try {
@@ -389,19 +389,16 @@ private static boolean isVmInfoAvailable() {
389389
}
390390

391391
/**
392-
* JOL currently gets stuck on Azul Zulu 17.44.53-ca-jdk17.0.8.1 on Intel Macs.
392+
* JOL currently kills the JVM on Mac OS X when trying to attach to the Hotspot SA.
393+
* This happens with several JVMs (Java.net, Azul) and on both platforms (x86, ARM).
393394
* <p>
394395
* We can work around this by skipping the Hotspot SA attach.
395396
* See <a href="https://bugs.openjdk.org/browse/CODETOOLS-7903447">OpenJDK issue</a>
396397
* </p>
397398
*/
398399
@Deprecated(forRemoval = true)
399-
private static void intelMacWorkaround() {
400-
var isAzul = System.getProperty("java.vendor").contains("Azul Systems");
401-
var isIntel = System.getProperty("os.arch").contains("x86_64");
402-
var isMac = System.getProperty("os.name").contains("Mac");
403-
404-
if (isAzul && isIntel && isMac) {
400+
private static void macWorkaround() {
401+
if (System.getProperty("os.name").contains("Mac")) {
405402
System.setProperty("jol.skipHotspotSAAttach", "true");
406403
}
407404
}

0 commit comments

Comments
 (0)