adobe / adobe/AEMCS-CDN-Log-Analysis-Tooling
Elasticsearch not working on Apple M4 processors
- Dominant language
- No language data
- Stars
- 18
- Forks
- 7
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
**Logs**
```
Attaching to elasticsearch, kibana, logstash
elasticsearch | #
elasticsearch | # A fatal error has been detected by the Java Runtime Environment:
elasticsearch | #
elasticsearch | # SIGILL (0x4) at pc=0x0000ffff983faa08, pid=7, tid=16
elasticsearch | #
elasticsearch | # JRE version: (20.0.2+9) (build )
elasticsearch | # Java VM: OpenJDK 64-Bit Server VM (20.0.2+9-78, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, serial gc, linux-aarch64)
elasticsearch | # Problematic frame:
elasticsearch | # j java.lang.System.registerNatives()V+0 java.base@20.0.2
elasticsearch | #
elasticsearch | # Core dump will be written. Default location: /usr/share/elasticsearch/core
elasticsearch | #
elasticsearch | # An error report file with more information is saved as:
elasticsearch | # /usr/share/elasticsearch/hs_err_pid7.log
elasticsearch | [0.086s][warning][os] Loading hsdis library failed
elasticsearch | #
elasticsearch | # The crash happened outside the Java Virtual Machine in native code.
elasticsearch | # See problematic frame for where to report the bug.
elasticsearch | #
logstash | Using bundled JDK: /usr/share/logstash/jdk
elasticsearch exited with code 134
```
**Fix**
- Bump versions of elasticsearch and the rest >= 8.17.0
- Add:
- 'ES_JAVA_OPTS=-XX:UseSVE=0'
- 'CLI_JAVA_OPTS=-XX:UseSVE=0'
**Example**:
```
services:
elasticsearch:
image: elasticsearch:8.17.0
container_name: elasticsearch
environment:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m -XX:UseSVE=0"
CLI_JAVA_OPTS: -XX:UseSVE=0
```
More details: https://github.com/elastic/elasticsearch/issues/118583#issuecomment-2546897726
Contributor guide
Research direction
Inspect the repository's Elasticsearch service definition and related service version settings, using the provided Elasticsearch 8.17.0 example as the reference. Start the stack and confirm Elasticsearch, Kibana, and Logstash run on Apple M4 processors without the SIGILL crash; done means the services start successfully with the required Java options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, elasticsearch
- Domain
- devops, search
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100