Thursday, May 19, 2011

JVM crashes with 6u25 - C2 / Tiered Compilation

A collegue of mine experienced frequent crashes of his IntelliJ after updating to the most recent Oracle VM 6u25. Frequent = uptime around 20 minutes. He got incomplete hs_err_pid*.log files. After downgrading to 6u24 the problem disappeared. We reproduced it on linux and window. Some applications seem to be more sensible for the issue than others. But all applications seem to suffer from the problem sooner or later.

So i filed a bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7040769

Yesterday i came across this posting reporting the same problem. Since there is no possibility for discussion i decided to post the story, asking you if you experience the same.

My speculation is that the source for this issue is the 'new' JIT compiler in 6u25. This is default since 6u25. And i found no way to turn it 'off'. Up to 6u24 you could toggle it with "-XX:[+|-]TieredCompilation". But with update 25 not only the default has changed from "false" to "true" but also the toggle has no effect - you could check this with jcosole, see below:

Is there another way to switch of tiered compilation? I don't know.

Do you experience the same problem?

[Update, 19th of May 2011]
A support engineer at Oracle informed me that this may be related to issue 701353. So a workaround should be using -XX:-DoEscapeAnalysis. I'll post an update, if i can verify this. Our internal id for the evaluation is #100106.

[Update, 21st of May 2011]
The proposed workaround fixes the issue. A complete fix should be available in the upcoming Java 6 Update 27 release. No release date until now.

2 comments:

Parag Thakur said...

hello. Do you know if this has now been addressed in 6.0u27? Related bugs have been marked closed but not this one.

thanks!

Stanimir Simeonoff said...

-XX:-TieredCompilation does disable the the C1 compiler, you may see the significantly reduced code cache. I am getting different bugs (during deoptimization), so it does the trick.