Skip to content

Run JDK 21 workflows with latest JDK (21.0.7 as of April 2025)#18128

Closed
abhishekrb19 wants to merge 1 commit intomasterfrom
try_latest_21_jdk
Closed

Run JDK 21 workflows with latest JDK (21.0.7 as of April 2025)#18128
abhishekrb19 wants to merge 1 commit intomasterfrom
try_latest_21_jdk

Conversation

@abhishekrb19
Copy link
Copy Markdown
Contributor

JDK 21.0.6 was released in April 2025. This change is prompted by a recent dev discussion.
It’s effectively another attempt at #17694, which was reverted in #17806 due to sporadic segfaults observed with JDK 21.0.6.

Hopefully the segfaults don't occur with the latest JDK and fixes #17429.

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

Effectively another attempt at #17694 but it was
reverted in #17806 due to sporadic
segfaults seen with JDK 21.0.6.
@github-actions github-actions Bot added the GHA label Jun 12, 2025
@kgyrtkirk kgyrtkirk added the tests:all-jdk Runs tests also on other supported jdk versions label Jun 12, 2025
@kgyrtkirk
Copy link
Copy Markdown
Member

let's run the all jdk tests a few times :)

@kgyrtkirk kgyrtkirk closed this Jun 12, 2025
@kgyrtkirk kgyrtkirk reopened this Jun 12, 2025
@kgyrtkirk
Copy link
Copy Markdown
Member

close/open to trigger new run with new labels

@abhishekrb19
Copy link
Copy Markdown
Contributor Author

Hmm, one of the indexing module UTs org.apache.druid.indexing.common.task.IndexTaskTest crashed with a segfault with JDK 21 (21.0.7):

Error:  Command was /bin/sh -c cd '/home/runner/work/druid/druid/indexing-service' && '/opt/hostedtoolcache/Java_Zulu_jdk/21.0.7-6/x64/bin/java' '-javaagent:/home/runner/.m2/repository/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar=destfile=/home/runner/work/druid/druid/indexing-service/target/jacoco-e94850aa.exec,excludes=org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientSyncImpl.class' '--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED' '--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED' '--add-opens=java.base/java.nio=ALL-UNNAMED' '--add-opens=java.base/sun.nio.ch=ALL-UNNAMED' '--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED' '--add-opens=java.base/java.io=ALL-UNNAMED' '--add-opens=java.base/java.lang=ALL-UNNAMED' '--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED' '--add-opens=java.base/java.util=ALL-UNNAMED' '-Djava.security.manager=allow' '-Xmx2048m' '-XX:MaxDirectMemorySize=2500m' '-XX:+ExitOnOutOfMemoryError' '-XX:+HeapDumpOnOutOfMemoryError' '-Duser.language=en' '-Duser.GroupByQueryRunnerTest.javacountry=US' '-Dfile.encoding=UTF-8' '-Duser.timezone=UTC' '-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager' '-Daws.region=us-east-1' '-Ddruid.test.stupidPool.poison=true' '-XX:OnOutOfMemoryError=/home/runner/work/druid/druid/dev/chmod-heap-dumps.sh' '-XX:HeapDumpPath=/home/runner/work/druid/druid/target' '-Ddruid.indexing.doubleStorage=double' '-jar' '/home/runner/work/druid/druid/indexing-service/target/surefire/surefirebooter-20250612170805114_4173.jar' '/home/runner/work/druid/druid/indexing-service/target/surefire' '2025-06-12T16-52-22_610-jvmRun1' 'surefire-20250612170805114_4171tmp' 'surefire_3-20250612170805114_4172tmp'
Error:  Error occurred in starting fork, check output in log
Error:  Process Exit Code: 134
Error:  Crashed tests:
Error:  org.apache.druid.indexing.common.task.IndexTaskTest
Error:  org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?

The relevant segfault from the dump hs_err_pid5889.log:

➜  -cat ./indexing-service/hs_err_pid5889.log
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f79a1912099, pid=5889, tid=5904
#
# JRE version: OpenJDK Runtime Environment Zulu21.42+21-CRaC-CA (21.0.7+6) (build 21.0.7+6-LTS)
# Java VM: OpenJDK 64-Bit Server VM Zulu21.42+21-CRaC-CA (21.0.7+6-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xf12099]  BoolNode::Ideal(PhaseGVN*, bool)+0x19
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t 9223372036854775808 %h" (or dumping to /home/runner/work/druid/druid/indexing-service/core.5889)
#
# If you would like to submit a bug report, please visit:
#   http://www.azul.com/support/
#

---------------  S U M M A R Y ------------

Command Line: -javaagent:/home/runner/.m2/repository/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar=destfile=/home/runner/work/druid/druid/indexing-service/target/jacoco-e94850aa.exec,excludes=org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskClientSyncImpl.class --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED -Djava.security.manager=allow -Xmx2048m -XX:MaxDirectMemorySize=2500m -XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -Duser.language=en -Duser.GroupByQueryRunnerTest.javacountry=US -Dfile.encoding=UTF-8 -Duser.timezone=UTC -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Daws.region=us-east-1 -Ddruid.test.stupidPool.poison=true -XX:OnOutOfMemoryError=/home/runner/work/druid/druid/dev/chmod-heap-dumps.sh -XX:HeapDumpPath=/home/runner/work/druid/druid/target -Ddruid.indexing.doubleStorage=double /home/runner/work/druid/druid/indexing-service/target/surefire/surefirebooter-20250612170805114_4173.jar /home/runner/work/druid/druid/indexing-service/target/surefire 2025-06-12T16-52-22_610-jvmRun1 surefire-20250612170805114_4171tmp surefire_3-20250612170805114_4172tmp

Host: AMD EPYC 7763 64-Core Processor, 4 cores, 15G, Ubuntu 24.04.2 LTS
Time: Thu Jun 12 17:09:46 2025 UTC elapsed time: 101.849667 seconds (0d 0h 1m 41s)

---------------  T H R E A D  ---------------

Current thread (0x00007f799c1c8b30):  JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=5904, stack(0x00007f7980da2000,0x00007f7980ea2000) (1024K)]


Current CompileTask:
C2:101849 41665       4       com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector::_addFields (1077 bytes)

Stack: [0x00007f7980da2000,0x00007f7980ea2000],  sp=0x00007f7980e9d690,  free space=1005k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xf12099]  BoolNode::Ideal(PhaseGVN*, bool)+0x19
V  [libjvm.so+0xd608ee]  PhaseIterGVN::transform_old(Node*)+0x9e
V  [libjvm.so+0x6b4d2a]  Conv2BNode::Ideal(PhaseGVN*, bool)+0x17a
V  [libjvm.so+0xd608ee]  PhaseIterGVN::transform_old(Node*)+0x9e
V  [libjvm.so+0xd5c599]  PhaseIterGVN::optimize()+0xf9
V  [libjvm.so+0x672279]  Compile::Optimize()+0xfc9
V  [libjvm.so+0x6739d6]  Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0xf36
V  [libjvm.so+0x59a64b]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x18b
V  [libjvm.so+0x679e6e]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xc9e
V  [libjvm.so+0x67d198]  CompileBroker::compiler_thread_loop()+0x738
V  [libjvm.so+0x931400]  JavaThread::thread_main_inner()+0x1e0
V  [libjvm.so+0xf82da8]  Thread::call_run()+0xa8
V  [libjvm.so+0xd0df9a]  thread_native_entry(Thread*)+0xda
C  [libc.so.6+0x9caa4]

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x000000000000002c

@abhishekrb19
Copy link
Copy Markdown
Contributor Author

Closing this as the latest JDK 21.0.7 still appears to have segfaults.

@abhishekrb19 abhishekrb19 deleted the try_latest_21_jdk branch June 12, 2025 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GHA tests:all-jdk Runs tests also on other supported jdk versions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segfault in JDK 21 processing tests

2 participants