United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7043040 JSR292: JRuby bench/shootout/binarytrees.ruby-2.ruby SEGV: constantPoolKlass::oop_follow_contents
JDK-7043040 : JSR292: JRuby bench/shootout/binarytrees.ruby-2.ruby SEGV: constantPoolKlass::oop_follow_contents

Details
Type:
Bug
Submit Date:
2011-05-09
Status:
Closed
Updated Date:
2011-07-29
Project Name:
JDK
Resolved Date:
2011-07-18
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
hs21
Fixed Versions:
hs21 (b13)

Related Reports
Backport:

Sub Tasks

Description
http://mail.openjdk.java.net/pipermail/mlvm-dev/2011-May/002978.html

$ bin/jruby.sh --server bench/shootout/binarytrees.ruby-2.ruby 15
stretch tree of depth 16         check: -1
65536    trees of depth 4        check: -65536
16384    trees of depth 6        check: -16384
4096     trees of depth 8        check: -4096
1024     trees of depth 10       check: -1024
256      trees of depth 12       check: -256
64       trees of depth 14       check: -64
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xfd2c148a, pid=214384, tid=6
#
# JRE version: 7.0-b141
# Java VM: Java HotSpot(TM) Server VM (21.0-b11-fastdebug mixed mode solaris-x86 )
# Problematic frame:
# V  [libjvm.so+0xac148a]  void constantPoolKlass::oop_follow_contents(oop)+0x4a6


Stack: [0xd5885000,0xd5905000],  sp=0xd59045d0,  free space=509k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xac148a]  void constantPoolKlass::oop_follow_contents(oop)+0x4a6
V  [libjvm.so+0x16581fa]  void MarkSweep::follow_stack()+0x1fa
V  [libjvm.so+0x194f51d]  void PSMarkSweep::mark_sweep_phase1(bool)+0x125
V  [libjvm.so+0x194dae5]  void PSMarkSweep::invoke_no_policy(bool)+0x509
V  [libjvm.so+0x1992d19]  void PSScavenge::invoke()+0x205
V  [libjvm.so+0x18ac470]  HeapWord*ParallelScavengeHeap::failed_mem_allocate(unsigned,bool)+0x120
V  [libjvm.so+0x1cf2398]  void VM_ParallelGCFailedAllocation::doit()+0xc4
V  [libjvm.so+0x1d19bba]  void VM_Operation::evaluate()+0xe2
V  [libjvm.so+0x1d17e50]  void VMThread::loop()+0x788
V  [libjvm.so+0x1d17059]  void VMThread::run()+0xc1
V  [libjvm.so+0x184e573]  java_start+0x6fb
C  [libc.so.1+0xbb2dc]  _thrp_setup+0x9d
C  [libc.so.1+0xbb580]  _lwp_start+0x0

VM_Operation (0xfc5fbfd0): ParallelGCFailedAllocation, mode: safepoint, requested by thread 0x0809b000

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/69c94f488271
                                     
2011-05-11
EVALUATION

7043040: JSR292: JRuby bench/shootout/binarytrees.ruby-2.ruby SEGV: constantPoolKlass::oop_follow_contents
Reviewed-by: kvn, ysr

The logic in oop_push_constants was skipping JVM_CONSTANT_Object
entries which would cause corruption in later GCs.  The fix is to use
is_pointer_entry to identify roots like all the other visitor.  The
verify_on method was also too weak so it missed the problem when run
with the verify GC flags.  Tested with failing test from report.
                                     
2011-05-11
EVALUATION

It works with UseSerialGC and UseG1GC.
*** (#1 of 1): [ UNSAVED ] ###@###.###
                                     
2011-05-09



Hardware and Software, Engineered to Work Together