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

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


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:

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 (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  []  Node::add_req(Node*)+0xb5
V  []  Matcher::find_shared(Node*)+0x48e
V  []  Matcher::match()+0x8cd
V  []  Compile::Code_Gen()+0x73
V  []  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0x113b
V  []  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x1d2
V  []  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x3d6
V  []  CompileBroker::compiler_thread_loop()+0x28b
V  []  JavaThread::thread_main_inner()+0x108
V  []  thread_native_entry(Thread*)+0xf2
C  []  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: (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 Schindler
uschindler at 
ASF Member, Apache Lucene PMC / Committer
Bremen, Germany

More information about the hotspot-compiler-dev mailing list