JDK-6684385 : Loop unswitching crashes without LoopNode
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2008-04-04
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
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 6 JDK 7 Other
6u14Fixed 7Fixed hs13Fixed
Description
FULL PRODUCT VERSION :
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)


FULL OS VERSION :
Linux xx.yy.zz 2.6.9-22.20.ELsmp #1 SMP Fri Nov 18 03:04:44 EST 2005 x86_64 x86_64 x86_64 GNU/Linux


A DESCRIPTION OF THE PROBLEM :
If you download the open source product java2html and run it against the java classes in the openjdk/jdk/src/share/classes directory it crashes about one time in three.

THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: No

THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Download java2html.jar from http://www.java2html.com

Set CLASSPATH to point to j2h.jar and then try

java j2h -m 4 -n JFREE -js <Place where openjdk lives>/jdk/src/share/classes -d <some directory>


EXPECTED VERSUS ACTUAL BEHAVIOR :
It should run through all the *.java files and produce .html versions of them in the output directory.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Attached seperatly

REPRODUCIBILITY :
This bug can be reproduced often.

---------- BEGIN SOURCE ----------
As per instructions above
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Disable loop unswitching: -XX:-LoopUnswitching

Comments
EVALUATION Due to the strange handling of irreducible loops, a non-irreducible loop was found on the second call to build_loop_tree(), and therfore was not beautified. The fix is to simply change change policy_unswitching() to return false for any loop which does not have a LoopNode for a head.
04-04-2008

EVALUATION Problem reproduces on x86 machines on solaris through hs12. Server compiler is crashing in policy_unswitching() when _head is not a LoopNode. Problem could be trivially fixed by checking for is_loop(), however, since this is first sighting of the failure, there may other issues giving rise to the situation.
04-04-2008