Issue with Elasticsearch Docker Deployment on Apple Silicon (M4 Processor, macOS 15.2)

There is a current issue with deploying Elasticsearch via Docker on Mac computers equipped with Apple silicon (M4 processor) and running macOS 15.2.

Here is the error log:

2025-01-15 11:55:22 #
2025-01-15 11:55:22 # A fatal error has been detected by the Java Runtime Environment:
2025-01-15 11:55:22 #
2025-01-15 11:55:22 #  SIGILL (0x4) at pc=0x0000ffff77c680a8, pid=8, tid=17
2025-01-15 11:55:22 #
2025-01-15 11:55:22 # JRE version:  (23.0+37) (build )
2025-01-15 11:55:22 # Java VM: OpenJDK 64-Bit Server VM (23+37-2369, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, serial gc, linux-aarch64)
2025-01-15 11:55:22 # Problematic frame:
2025-01-15 11:55:22 # j  java.lang.System.registerNatives()V+0 java.base@23
2025-01-15 11:55:22 #
2025-01-15 11:55:22 # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
2025-01-15 11:55:22 #
2025-01-15 11:55:22 # An error report file with more information is saved as:
2025-01-15 11:55:22 # /usr/share/elasticsearch/hs_err_pid8.log
2025-01-15 11:55:22 [0.011s][warning][os] Loading hsdis library failed
2025-01-15 11:55:22 #
2025-01-15 11:55:22 # The crash happened outside the Java Virtual Machine in native code.
2025-01-15 11:55:22 # See problematic frame for where to report the bug.
2025-01-15 11:55:22 #
2025-01-15 11:55:22 /usr/local/bin/docker-entrypoint.sh: line 43:     8 Aborted                 ( elasticsearch-keystore create )

Description of the Problem:

The issue does not originate from Elasticsearch itself but is linked to a Java-related problem.

Relevant bug reports have been documented:

JDK-8345296

AWS Corretto JDK bug report

A known workaround involves adding the JAVA_TOOL_OPTIONS flag, but it appears Elasticsearch does not recognise this JAVA_TOOL_OPTIONS environment variables. When I try to add it, I see the following in the elasticsearch logs:

warning: ignoring JAVA_TOOL_OPTIONS=-XX:UseSVE=0

Is there a confirmed workaround or solution for this issue that works effectively in this environment?

Hello, this is indeed an Apple bug specific to M4 processors. Can you please try this workaround?

Edit: That said, I would recommend start-local which applies the workaround automatically and makes local usage easy.

Hi @Quentin_Pradet,

Thank you very much for your prompt response. I tried the workaround, and it is working for me with Elasticsearch version 8.17.0.

1 Like

Hi Quentin, I tried this workaround as well. I'm in the same boat with an M4 processor and macOS 15.2, BUT with the 7.17.23 image of Elasticsearch. Are there any known workarounds short of downgrading my macOS or pushing for an org-wide Elasticsearch update?

Here is my error log:

elasticsearch-1  | #
elasticsearch-1  | # A fatal error has been detected by the Java Runtime Environment:
elasticsearch-1  | #
elasticsearch-1  | #  SIGILL (0x4) at pc=0x0000ffff8013ff68, pid=26, tid=27
elasticsearch-1  | #
elasticsearch-1  | # JRE version:  (22.0.2+9) (build )
elasticsearch-1  | # Java VM: OpenJDK 64-Bit Server VM (22.0.2+9-70, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
elasticsearch-1  | # Problematic frame:
elasticsearch-1  | # j  java.lang.System.registerNatives()V+0 java.base@22.0.2
elasticsearch-1  | #
elasticsearch-1  | # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
elasticsearch-1  | #
elasticsearch-1  | # An error report file with more information is saved as:
elasticsearch-1  | # /tmp/hs_err_pid26.log
elasticsearch-1  | [0.009s][warning][os] Loading hsdis library failed
elasticsearch-1  | #
elasticsearch-1  | # The crash happened outside the Java Virtual Machine in native code.
elasticsearch-1  | # See problematic frame for where to report the bug.
elasticsearch-1  | #
elasticsearch-1  | /usr/share/elasticsearch/bin/elasticsearch-env: line 83:    26 Aborted                 "$JAVA" "$XSHARE" -cp "$ES_CLASSPATH" org.elasticsearch.tools.java_version_checker.JavaVersionChecker
elasticsearch-1 exited with code 134
1 Like

Hi @Matthew_Jones, Elasticsearch 7.x needs a different workaround indeed, see this specific comment from the GitHub thread linked above: macOS 15.2 M4: Unable to launch Elasticsearch Docker container · Issue #118583 · elastic/elasticsearch · GitHub.