JDK-6420244 : Recursion in kill_dead_code() causes compiler stack overflow when run CTW
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2006-05-01
  • Updated: 2010-04-03
  • Resolved: 2006-05-11
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 b84Fixed
Related Reports
Relates :  
Description
I, Ross and Tom observed a stack overflow in a compiler thread method kill_dead_code()
when running fastdebug version of C2 on sol-x86. 
The fastdebug VM stack frame size is larger then in product VM 
but the problem could occure in product version also.

/tmp/kvn/jdk1.6.0/bin/java -server -XX:+VerifyGraphEdges -XX:+VerifyIterativeGVN -Xss4m -verify -XX:-ShowMessageBoxOnError -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=1 -Xbootclasspath/p:/net/vmsqe.sfbay/export/backup/testbase/CompileTheWorld/jarfiles/JavaWebServer1.1.3.jar
...
CompileTheWorld (965) : mlsoft/mct/MlEKey
CompileTheWorld (966) : mlsoft/mct/MlResource
CompileTheWorld (967) : mlsoft/mct/MlGrid
/tmp/kvn/test/workdir/run.JavaWebServer1.1.3.jar.1.ksh[67]: 15796 Segmentation Fault
Exit Value 139

[t@11 l@11]: where
current thread: t@11
  [1] Unique_Node_List::remove(this = ???, n = ???) (optimized), at 0xfe25cead (line ~1531) in "/net/jaberwocky/export/home2/work/6359849/src/share/vm/opto/node.cpp"
=>[2] kill_dead_code(dead = ???, igvn = ???) (optimized), at 0xfe259008 (line ~916) in "/net/jaberwocky/export/home2/work/6359849/src/share/vm/opto/node.cpp"
  [3] kill_dead_code(dead = ???, igvn = ???) (optimized), at 0xfe25955c (line ~946) in "/net/jaberwocky/export/home2/work/6359849/src/share/vm/opto/node.cpp"
  [4] kill_dead_code(dead = ???, igvn = ???) (optimized), at 0xfe25955c (line ~946) in "/net/jaberwocky/export/home2/work/6359849/src/share/vm/opto/node.cpp"
  [5] kill_dead_code(dead = ???, igvn = ???) (optimized), at 0xfe25955c (line ~946) in "/net/jaberwocky/export/home2/work/6359849/src/share/vm/opto/node.cpp"

Comments
SUGGESTED FIX Webrev: http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/c2_baseline/2006/20060503151930.kvn.6420244/workspace/webrevs/webrev-2006.05.03/index.html
04-05-2006

SUGGESTED FIX Convert kill_dead_code() into iterative version.
01-05-2006

EVALUATION The stack overflow caused by deep recursion in kill_dead_code() when big part of the Ideal nodes graph becomes dead (unreachable).
01-05-2006