JDK-6242350 : C2 crash with OSR of method with large frame
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-03-17
  • Updated: 2010-04-03
  • Resolved: 2005-04-06
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
6 b31Fixed
Related Reports
Relates :  
Description
A test case from Hitachi containing an OSR of a method with a very large frame crashes both the client and server compilers on various HotSpot releases. This bug is intended to track the C2 crashes, which at the time of reproduction of the bug occurred on SPARC with 1.5 forward and on x86 with 1.4.2.

The test case from 6227033 is attached.

###@###.### 2005-03-17 19:53:11 GMT

Comments
SUGGESTED FIX Webrev: http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/c2_baseline/2005/20050329202154.kvn.6242350/workspace/webrevs/webrev-2005.03.30/index.html This putback is the cleanup I did to reduce a stack frame size for these methods so that the product VM passes the test: 1. Allocate root's state on _states_arena instead of stack. 2. Reduce number of locals. 3. Provide the same arguments sequence for Reduce*() methods. 4. Replace "(i?_rightOp:_leftOp)[rule"] with "if else". 5. Remove unused second MachNode* argument in MachOperGenerator(). I also did few changes in adlc: 1. Use "Compile* C" argument for "new(C) MachOper" since we passing it already to the MachOperGenerator() method. 2. Remove the generation of unused array regSize[] - it reduces the size of VM by 20K bytes. ###@###.### 2005-04-01 00:08:04 GMT
01-04-2005

WORK AROUND To avoid stack overflow in the Compiler thread use the option -XX:CompilerThreadStackSize=1k (or bigger) which means to use 1 Mb stack for compiler threads. ###@###.### 2005-03-24 23:08:41 GMT ###@###.### 2005-04-01 00:08:03 GMT
24-03-2005

EVALUATION C2, like C1, needs to check if a register name will fit into the oopMap. The crashing, however, appears to be a stack overflow issue. In mustang, at least, the problem is in the matcher. ###@###.### 2005-03-22 17:25:12 GMT In particular, the matcher function Label_Root() appears to be causing the stack overflow. There may be other stack overflow problems downstream. ###@###.### 2005-03-22 23:23:50 GMT The matcher function ReduceInst_Interior() also cause stack overflow for this case. There is recursive calls ReduceInst_Interior() -> ReduceInst() -> ReduceInst_Interior(). The test pass after the implementation of iterative versions of both method. ###@###.### 2005-03-24 23:08:40 GMT ###@###.### 2005-04-01 00:08:03 GMT
22-03-2005