Update bundled JDK to Java 22 (again)
This commit re-bumps the bundled JDK to Java 22 now that we have a tested workaround for the G1GC bug (https://bugs.openjdk.org/browse/JDK-8329528).
relates #108571 relates #106987
Pinging @elastic/es-delivery (Team:Delivery)
Hi @rjernst, I've created a changelog YAML for you.
FYI, I added a couple of version tags, this needs to get backported to 7.17 as well (eventually). Also, you will want to revert these changes as well. This is the bit to remove the explicit toolchain stuff for Java 22 which is no longer necessary once the bundled JDK is bumped.
💔 Backport failed
| Status | Branch | Result |
|---|---|---|
| ✅ | 8.14 | |
| ❌ | 7.17 | Commit could not be cherrypicked due to conflicts |
| ❌ | 8.13 | Commit could not be cherrypicked due to conflicts |
You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 108654
Hey 👋🏻
I have a cluster running on 7.17.22 that just randomly failed with the following stack trace:
[2024-07-31T01:35:58,030][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [XXX] fatal error in thread [elasticsearch[XXX][management][T#1]], exiting
java.lang.IncompatibleClassChangeError: Class Ljdk.internal.vm.FillerArray; does not implement the requested interface java.util.Collection
at java.util.Collections$UnmodifiableCollection.stream(Collections.java:1131) ~[?:?]
at org.elasticsearch.index.seqno.ReplicationTracker.getRetentionLeases(ReplicationTracker.java:250) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.shard.IndexShard.getRetentionLeases(IndexShard.java:2638) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.shard.IndexShard.syncRetentionLeases(IndexShard.java:2756) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.IndexService.lambda$sync$19(IndexService.java:967) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.shard.IndexShard.lambda$runUnderPrimaryPermit$26(IndexShard.java:3496) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:136) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.shard.IndexShard.lambda$wrapPrimaryOperationPermitListener$23(IndexShard.java:3450) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.action.ActionListener$DelegatingFailureActionListener.onResponse(ActionListener.java:219) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.shard.IndexShardOperationPermits.acquire(IndexShardOperationPermits.java:253) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.shard.IndexShardOperationPermits.acquire(IndexShardOperationPermits.java:199) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.shard.IndexShard.acquirePrimaryOperationPermit(IndexShard.java:3421) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.shard.IndexShard.acquirePrimaryOperationPermit(IndexShard.java:3409) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.shard.IndexShard.runUnderPrimaryPermit(IndexShard.java:3499) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.IndexService.sync(IndexService.java:967) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.IndexService.syncRetentionLeases(IndexService.java:951) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.IndexService.access$900(IndexService.java:102) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.index.IndexService$AsyncRetentionLeaseSyncTask.runInternal(IndexService.java:1141) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.common.util.concurrent.AbstractAsyncTask.run(AbstractAsyncTask.java:133) ~[elasticsearch-7.17.22.jar:7.17.22]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:718) ~[elasticsearch-7.17.22.jar:7.17.22]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1570) [?:?]
I arrived at that PR https://github.com/elastic/elasticsearch/pull/107142 and was puzzled to see that I had open JDK 22:
/usr/share/elasticsearch/jdk/bin/java --version
openjdk 22.0.1 2024-04-16
OpenJDK Runtime Environment (build 22.0.1+8-16)
OpenJDK 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)
Until I found it was re-bumped.
Are we planning on upgrading the 7.17 JDK version back to 22, or keep it on 21?
Are we planning on upgrading the 7.17 JDK version back to 22, or keep it on 21?
Yes, that has been done. https://github.com/elastic/elasticsearch/pull/108689