Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch fails to start on Azul Platform Prime JDK (formerly Zing) from 7.11 onwards #91577

Closed
deepak-gittyup opened this issue Nov 15, 2022 · 3 comments
Labels
>bug needs:triage Requires assignment of a team area label

Comments

@deepak-gittyup
Copy link

Elasticsearch Version

7.17.6

Installed Plugins

No response

Java Version

Zing 64-Bit Tiered VM Zing22.08.0.0+3 (build 11.0.16.1-zing_22.08.0.0-b3-product-azlinuxM-X86_64, mixed mode)

OS Version

4.4.0-210-generic #242-Ubuntu

Problem Description

After upgrading ES to a higher version i.e 7.17.6, ES hits NullPointerException and fails to start on Azul Platform Prime JDK (formerly Zing)

The issue reproduced even on a more recent version (relative to 7.17.6): 8.4.2

While trying to identify the breaking point, I noticed that the issue is reproducible from elasticsearch-7.11.0 onwards
Issue does not reproduce on elasticsearch-7.10.0

Steps to Reproduce

cd /home/user/
wget https://cdn.azul.com/zing-zvm/ZVM22.08.0.0/zing22.08.0.0-3-jdk11.0.16.1-linux_x64.tar.gz
tar -xf zing22.08.0.0-3-jdk11.0.16.1-linux_x64.tar.gz

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.6-linux-x86_64.tar.gz
tar -xf elasticsearch-7.17.6-linux-x86_64.tar.gz
cd elasticsearch-7.17.6

ES_JAVA_HOME=/home/user/zing22.08.0.0-3-jdk11.0.16.1-linux_x64 bin/elasticsearch

Warning: Maximum heap size rounded up to 512 MB
Exception in thread "main" java.lang.NullPointerException
        at org.elasticsearch.tools.launchers.JvmErgonomics.tuneG1GCHeapRegion(JvmErgonomics.java:86)
        at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:60)
        at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions(JvmOptionsParser.java:135)
        at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOptionsParser.java:86)

Logs (if relevant)

No response

@deepak-gittyup deepak-gittyup added >bug needs:triage Requires assignment of a team area label labels Nov 15, 2022
@deepak-gittyup
Copy link
Author

The current understanding is: ES (version elasticsearch-7.11.0 onwards) assumes that the JDK being used supports G1GC
But Azul Platform Prime (formerly Zing) has its own C4 garbage collector (does not have G1GC)

@nik9000
Copy link
Member

nik9000 commented Nov 15, 2022

Zing isn't supported: https://www.elastic.co/support/matrix#matrix_jvm

@nik9000 nik9000 closed this as completed Nov 15, 2022
DmitryNekrasov added a commit to DmitryNekrasov/elasticsearch that referenced this issue Jan 27, 2023
This patch fixes some issues when starting Elasticsearch on the Azul Platform Prime JDK.
The first of them is related to the fact that the Azul Platform Prime JDK does not have a G1 garbage collector, and, as a result, there are no options for configuring it. One fix checks that these options exist and are not null.
The second fix is related to the following. When parsing the message output, which is obtained using the -XX:+PrintFlagsFinal option, we are tied to the fact that there is an origin field in the PrintFlagsFinal message string. This is valid for jdk11+ versions, however jdk8 does not have this field. Older versions of the Azul Platform Prime JDK use the PrintFlagsFinal message format that jdk8 uses, but for later versions. The second fix adds a null check for the origin field in the JvmOption class.
Relates elastic#91577.
@Holmistr
Copy link

Disclaimer: I work at Azul.

For the benefit of any future readers - Azul Platform Prime (formerly Azul Zing) works seemlessly with Elasticsearch. The startup issue described here was trivial - ES startup scripts applied some G1 GC tuning flags that Prime didn't support (as it doesn't have G1 GC). When those tuning flags are removed, ES starts up fine and works without problems. We have submitted a PR to not apply the VM flags when they are not supported (#93197), but the change was not accepted for the reasons mentioned in the PR.

We therefore applied the fix on Azul's side - we now accept those G1 GC flags, just simply ignore them :)

Long story short - Elasticsearch is guaranteed (by Azul) to work fine with Azul Platform Prime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug needs:triage Requires assignment of a team area label
Projects
None yet
Development

No branches or pull requests

3 participants