Compiler thread crashing in JDK 10-ea b37, still occuring in b41

Uwe Schindler uschindler at apache.org
Fri Jan 26 17:55:14 UTC 2018


Hi,

the Lucene team found a compiler bug in the recent JDK 10 EA builds. Whenever the ICU4J module in Lucene runs its tests, at some point it fails with a SIGSEGV in the C2 compiler thread. It does not produce broken code, it just crushes the C2 compiler.

We have seen this since the ICU4J upgrade around January 7 (no changes in the JDK EA version), but it still happens with latest JDK 10-ea builds, too (build 41, downloaded today). An example build that failed:
https://jenkins.thetaphi.de/job/Lucene-Solr-7.x-Linux/1250/

It only happens with Java 10, Java 8 (u144) and Java 9.0.1 are both fine.

The stack trace is always looking like this:
Current CompileTask:
C2:   9896 4126       4       org.apache.lucene.analysis.icu.ICUNormalizer2CharFilter::read (135 bytes)

Stack: [0x00007f98107c1000,0x00007f98108c2000],  sp=0x00007f98108bd840,  free space=1010k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xb31a35]  Node::add_req(Node*)+0xb5
V  [libjvm.so+0xaae13e]  Matcher::find_shared(Node*)+0x48e
V  [libjvm.so+0xab11ed]  Matcher::match()+0x8cd
V  [libjvm.so+0x63a1d3]  Compile::Code_Gen()+0x73
V  [libjvm.so+0x63fdbb]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0x113b
V  [libjvm.so+0x565462]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x1d2
V  [libjvm.so+0x647af6]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x3d6
V  [libjvm.so+0x648c8b]  CompileBroker::compiler_thread_loop()+0x28b
V  [libjvm.so+0xcd8748]  JavaThread::thread_main_inner()+0x108
V  [libjvm.so+0xb593d2]  thread_native_entry(Thread*)+0xf2
C  [libpthread.so.0+0x76ba]  start_thread+0xca

More thread details:
=>0x00007f987c280000 JavaThread "C2 CompilerThread2" daemon [_thread_in_native, id=15792, stack(0x00007f98107c1000,0x00007f98108c2000)]

You can download all hs_error and replay logs from the Jenkins build:
https://jenkins.thetaphi.de/job/Lucene-Solr-7.x-Linux/1250/ (see "build artifacts")

To reproduce: Check out Lucene/Solr from Github, change to "lucene" directory and run "ant ivy-bootstrap" (if not already done) and later go to fiolder lucene/analysis/icu and run "ant test" there (seen with with Java 10, G1GC).

Is there already work going on, or is this a new bug? If it's fixed on the JDK10 repo just give me the build number that should have a fix to try, otherwise we should open a bug report.

Uwe

-----
Uwe Schindler
uschindler at apache.org 
ASF Member, Apache Lucene PMC / Committer
Bremen, Germany
http://lucene.apache.org/




More information about the hotspot-compiler-dev mailing list