druid: Segfault in JDK 21 processing tests
We’ve been seeing a high degree of segfaults recently in the processing unit tests under JDK 21. Here’s an example: https://github.com/apache/druid/actions/runs/11528594002/job/32166241444?pr=17414. The common thread is an error like this:
Current CompileTask:
C2:1780380 144967 4 org.apache.druid.query.filter.InDimFilter::optimizeLookup (744 bytes)
Stack: [0x00007f9c045fb000,0x00007f9c046fb000], sp=0x00007f9c046f6660, free space=1005k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0xf15629] BoolNode::Ideal(PhaseGVN*, bool)+0x19
V [libjvm.so+0xd6258e] PhaseIterGVN::transform_old(Node*)+0x9e
V [libjvm.so+0x6ba360] Conv2BNode::Ideal(PhaseGVN*, bool)+0x180
V [libjvm.so+0xd6258e] PhaseIterGVN::transform_old(Node*)+0x9e
V [libjvm.so+0xd5e4a9] PhaseIterGVN::optimize()+0xf9
V [libjvm.so+0x6712cf] Compile::Optimize()+0xf9f
V [libjvm.so+0x672a06] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0xf26
V [libjvm.so+0x598acb] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x18b
V [libjvm.so+0x678ee4] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xca4
V [libjvm.so+0x67c0d8] CompileBroker::compiler_thread_loop()+0x6a8
V [libjvm.so+0x931f40] JavaThread::thread_main_inner()+0x1e0
V [libjvm.so+0xf86b88] Thread::call_run()+0xa8
V [libjvm.so+0xd103ba] thread_native_entry(Thread*)+0xda
Things that did not help include:
- Using Corretto instead of Zulu (#17426)
- Switching off
jfr_profiler(#17418). - Updating various test/build dependencies (#17414).
Since this is in the C2 compiler, and only happens on JDK 21, it seems likely to be a JDK bug rather than something we’re doing wrong.
@pranavbhole has raised a support case with Azul at https://support.azul.com/hc/en-us/requests/65354. We don’t have any special support contract with them, so hopefully they respond out of the goodness of their hearts. Since this issue happens on Corretto too, it’s possibly a broader OpenJDK issue, so we could also consider raising a bug with OpenJDK.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 16 (16 by maintainers)
Commits related to this issue
- Run JDK 21 workflows with 21.0.4. To work around #17429, run our JDK 21 workflows with version 21.0.4. It does not appear to have this problem. — committed to gianm/druid by gianm 2 years ago
- Run JDK 21 workflows with 21.0.4. (#17458) * Run JDK 21 workflows with 21.0.4. To work around #17429, run our JDK 21 workflows with version 21.0.4. It does not appear to have this problem. * U... — committed to apache/druid by gianm 2 years ago
- Run JDK 21 workflows with 21.0.4. (#17458) * Run JDK 21 workflows with 21.0.4. To work around #17429, run our JDK 21 workflows with version 21.0.4. It does not appear to have this problem. * U... — committed to jtuglu1/druid by gianm 2 years ago
- Run JDK 21 workflows with 21.0.4. (#17458) * Run JDK 21 workflows with 21.0.4. To work around #17429, run our JDK 21 workflows with version 21.0.4. It does not appear to have this problem. * U... — committed to clintropolis/druid by gianm 2 years ago
- Run JDK 21 workflows with 21.0.4. (#17458) (#17504) * Run JDK 21 workflows with 21.0.4. To work around #17429, run our JDK 21 workflows with version 21.0.4. It does not appear to have this proble... — committed to apache/druid by clintropolis 2 years ago
“Fixed” for now in #17458. It’s not really fixed for good, this is just a workaround. Hopefully the Azul folks come through for us. If not, it sounds like we’d be able to raise this issue with various other JDK suppliers, as we’ve seen it in others too.
Now a quidem test is failing with:
Maybe JDK 21 is too buggy and we should switch off its unit tests for now 😛
@kgyrtkirk shared a core dump and libs archive with me offline. I’ve attached them to the Azul support case.