United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6449385 JCK test dup2_x200106m1 fails with Segmentation Fault on x86
JDK-6449385 : JCK test dup2_x200106m1 fails with Segmentation Fault on x86

Details
Type:
Bug
Submit Date:
2006-07-17
Status:
Closed
Updated Date:
2012-03-22
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
hotspot
OS:
solaris,linux,solaris_10
Sub-Component:
compiler
CPU:
x86,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
2.0,3.0,hs14,5.0u4
Fixed Versions:
hs16 (b02)

Related Reports
Backport:
Backport:
Duplicate:

Sub Tasks

Description
Run reproduce.sh from attched archive to reproduce a problem.
bug originally filed on development version of java RTS 2.0 but that appears to be an hotspot bug.
crashes the same way with java 5u4 and a fastdebug build (does not crash with a jvmg or product build)

                                    

Comments
EVALUATION

hotspot bug that show up only with fastdebug builds.
                                     
2006-07-19
EVALUATION

There appears to be an infinite recursion in the c1 compiler code (bug does not reproduce with -Xint nor -server):

Here's part of the stack at the crash:

...
  [1014] GraphBuilder::iterate_bytecodes_for_block(this = ???, bci = ???) (optim
ized), at 0xcd4d9c82 (line ~2414) in "c1_GraphBuilder.cpp"
  [1015] GraphBuilder::connect_to_end(this = ???, beg = ???) (optimized), at 0xc
d4d5ffb (line ~2188) in "c1_GraphBuilder.cpp"
  [1016] GraphBuilder::iterate_all_blocks(this = ???, start_in_current_block_for
_inlining = ???) (optimized), at 0xcd4dbc95 (line ~2517) in "c1_GraphBuilder.cpp
"
  [1017] GraphBuilder::try_inline_jsr(this = ???, jsr_dest_bci = ???) (optimized
), at 0xcd4e0436 (line ~3194) in "c1_GraphBuilder.cpp"
  [1018] GraphBuilder::jsr(this = ???, dest = ???) (optimized), at 0xcd4ce5f8 (l
ine ~1203) in "c1_GraphBuilder.cpp"
  [1019] GraphBuilder::iterate_bytecodes_for_block(this = ???, bci = ???) (optim
ized), at 0xcd4d9c82 (line ~2414) in "c1_GraphBuilder.cpp"
  [1020] GraphBuilder::connect_to_end(this = ???, beg = ???) (optimized), at 0xc
d4d5ffb (line ~2188) in "c1_GraphBuilder.cpp"
  [1021] GraphBuilder::iterate_all_blocks(this = ???, start_in_current_block_for
_inlining = ???) (optimized), at 0xcd4dbc95 (line ~2517) in "c1_GraphBuilder.cpp
"
  [1022] GraphBuilder::try_inline_jsr(this = ???, jsr_dest_bci = ???) (optimized
), at 0xcd4e0436 (line ~3194) in "c1_GraphBuilder.cpp"
  [1023] GraphBuilder::jsr(this = ???, dest = ???) (optimized), at 0xcd4ce5f8 (l
ine ~1203) in "c1_GraphBuilder.cpp"
  [1024] GraphBuilder::iterate_bytecodes_for_block(this = ???, bci = ???) (optim
ized), at 0xcd4d9c82 (line ~2414) in "c1_GraphBuilder.cpp"
  [1025] GraphBuilder::connect_to_end(this = ???, beg = ???) (optimized), at 0xc
d4d5ffb (line ~2188) in "c1_GraphBuilder.cpp"
  [1026] GraphBuilder::iterate_all_blocks(this = ???, start_in_current_block_for
_inlining = ???) (optimized), at 0xcd4dbc95 (line ~2517) in "c1_GraphBuilder.cpp
"
  [1027] GraphBuilder::try_inline_jsr(this = ???, jsr_dest_bci = ???) (optimized
), at 0xcd4e0436 (line ~3194) in "c1_GraphBuilder.cpp"
  [1028] GraphBuilder::jsr(this = ???, dest = ???) (optimized), at 0xcd4ce5f8 (l
ine ~1203) in "c1_GraphBuilder.cpp"
  [1029] GraphBuilder::iterate_bytecodes_for_block(this = ???, bci = ???) (optim
ized), at 0xcd4d9c82 (line ~2414) in "c1_GraphBuilder.cpp"
  [1030] GraphBuilder::connect_to_end(this = ???, beg = ???) (optimized), at 0xc
d4d5ffb (line ~2188) in "c1_GraphBuilder.cpp"
  [1031] GraphBuilder::iterate_all_blocks(this = ???, start_in_current_block_for
_inlining = ???) (optimized), at 0xcd4dbc95 (line ~2517) in "c1_GraphBuilder.cpp
"
  [1032] GraphBuilder::GraphBuilder(this = ???, compilation = ???, scope = ???)
(optimized), at 0xcd4de93c (line ~2882) in "c1_GraphBuilder.cpp"
  [1033] IRScope::build_graph(this = ???, compilation = ???, osr_bci = ???) (opt
imized), at 0xcd4e9afd (line ~122) in "c1_IR.cpp"
  [1034] IRScope::IRScope(this = ???, compilation = ???, caller = ???, caller_bc
i = ???, method = ???, osr_bci = ???, create_graph = ???) (optimized), at 0xcd4e
9d1d (line ~155) in "c1_IR.cpp"
  [1035] IR::IR(this = ???, compilation = ???, method = ???, osr_bci = ???) (opt
imized), at 0xcd4ea386 (line ~270) in "c1_IR.cpp"
  [1036] Compilation::build_hir(this = ???) (optimized), at 0xcd4be8fb (line ~95
) in "c1_Compilation.cpp"
  [1037] Compilation::compile_java_method(this = ???) (optimized), at 0xcd4bf4cf
 (line ~250) in "c1_Compilation.cpp"
  [1038] Compilation::compile_method(this = ???) (optimized), at 0xcd4bf7fa (lin
e ~317) in "c1_Compilation.cpp"
  [1039] Compilation::Compilation(this = ???, compiler = ???, env = ???, method
= ???, osr_bci = ???) (optimized), at 0xcd4c0070 (line ~424) in "c1_Compilation.
cpp"
  [1040] Compiler::compile_method(this = ???, env = ???, method = ???, entry_bci
 = ???) (optimized), at 0xcd4c136a (line ~36) in "c1_Compiler.cpp"
                                     
2006-07-21
EVALUATION

It's not infinite recursion, it's just very deep.  The test case does repeated jsrs to the next bytecode and since C1 parses jsrs using recursion you can recurse fairly deeply before finishing.  The stack size for compiler threads is inconsistently specified as well.   It defaults to the same a VMThreadStackSize if CompilerThreadStackSize == 0.  For some reason on solaris x86 it's specified as 256k instead of 512k as it is on windows and linux.  So solaris x86 is more exposed to stack overflows from the compiler that other platforms.
                                     
2006-07-31
SUGGESTED FIX

Make the stack size be consistent between platforms.
                                     
2006-07-31
WORK AROUND

Increase the compiler threads stack using -XX:CompilerThreadStackSize=512
                                     
2006-07-31
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/1b42d5772ae0
                                     
2009-04-16



Hardware and Software, Engineered to Work Together