JDK-8204157 : Compiler.sunflow hangs after JDK-8192992
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-05-31
  • Updated: 2019-09-13
  • Resolved: 2018-06-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11 b20Fixed 12Fixed
Related Reports
Relates :  
Relates :  
We had odd hangup in our SPECjvm tests with current jdk/jdk. Compiler.sunflow seems to be reliably hanging with 100% CPU active in compiled code. Bisection says it started with JDK-8192992.

Hangup seems to happen reliably with -Xmx16g -Xms16g -XX:+AlwaysPreTouch -XX:-TieredCompilation -XX:+DisableExplicitGC -XX:-UseBiasedLocking -XX:+UseParallelGC -Xlog:gc. There are no asserts in fastdebug build.
I think I have a fix. Need to run some extensive testing to confirm.

This is the minimal reproducer so far. [ { match : "com.sun.tools.javac.jvm.ClassReader::readClass", PrintInlining : true, inline : ["-com.sun.tools.javac.util.List::*", "-com.sun.tools.javac.code.Type::*", "-com.sun.tools.javac.jvm.ClassReader::readMemberAttrs", "-com.sun.tools.javac.code.Scope$WriteableScope::create", "-com.sun.tools.javac.code.Scope$ScopeListenerList::symbolAdded", "-com.sun.tools.javac.code.Scope$ScopeImpl::dup", "-com.sun.tools.javac.jvm.ClassReader::readField", "-com.sun.tools.javac.code.Symbol$ClassSymbol::erasure", "-com.sun.tools.javac.code.Scope$ScopeImpl::leave"], //"com.sun.tools.javac.jvm.ClassReader::enterMember" }, { match : "*::*", Exclude : true }, ]

With a generous timeout I managed to get a stable reproducer. The method causing the problem doesn't seem to be any one of those on the stack.

I managed to reproduce it with your hack, and I managed to get a thread dump. But I had to increase the timeout. Also I get some contradictory results, I can make it hang with -XX:-TieredCompilation -XX:CompileCommand=exclude,*::*, but it runs fine with -Xint

No luck reproducing yet? I made a more precise run: reverted http://hg.openjdk.java.net/jdk/jdk/rev/ff5d0ea58d9b -- the test starts to pass. So it definitely looks like JDK-8192992. Also minimized it to -Xmx4g -XX:-TieredCompilation -XX:+UseParallelGC. Sent Nils the hacked-out version of test from our infra.

Yes, I do have a working SPECjvm2008, but I have not been able to reproduce the problem yet. Thank you for your consideration.

ILW = Benchmark hangs with 100% CPU usage (regression), single benchmark, no workaround = HMH = P1

Nils, please have a look.

Nils, tell me if you need a reproducer. Vanilla SPECjvm2008 does not run on jdk11, but I am sure you have the internal version that does. I can spend some time whipping up the reproducer without SPECjvm code.