United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6988439 Parallel Class Loading test deadlock involving MethodData_lock and Pending List Lock
6988439 : Parallel Class Loading test deadlock involving MethodData_lock and Pending List Lock

Details
Type:
Bug
Submit Date:
2010-09-29
Status:
Closed
Updated Date:
2012-02-01
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
generic,solaris_10
Sub-Component:
runtime
CPU:
x86,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs17.1,hs20,7
Fixed Versions:
hs20

Related Reports
Backport:
Backport:
Backport:
Duplicate:
Duplicate:
Relates:
Relates:

Sub Tasks

Description
Testsuite name: VM
JDK/JRE tested: 1.6.0_22 b05_j4b 
java options: -server -Xmixed -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode
OS/architecture: solaris10_x86 
Reproducible: Sometimes (fails 1 of 10 times)
Reproducible on machine: stt-18.russia.sun.com stt-91.russia.sun.com
Is it a platform specific regression: need to be investigated
Is it a new platform support: N
Is it a Regression: No this is not a regression, test fails on 6u20b02, 6u21b11_j4b
Test run log location:
http://stt-13.russia/results/1.6.0_22/b05_j4b/vm/solaris10-x86-32_vm.parallel_class_loading.testlist/ResultDir/interface/interface.log

Steps to reproduce: 
ssh stt-robot@stt-91
/net/vmsqe.russia/export/gtee/gee/bin/jdk install_bundles -srcdirbase /net/stt-13.russia.sun.com/export/home0/jdk -release 1.6.0_22 -build b05_j4b -jdkrename false -arch solaris-i586
cd /set/stt/newroot/results/1.6.0_22/b05_j4b/vm/solaris10-x86-32_vm.parallel_class_loading.testlist/ResultDir/interface/
sh rerun.sh

Test always fails on 66 iteration 
log:
Iteration #63 of 100, time left: 51 s
Iteration #64 of 100, time left: 50 s
Iteration #65 of 100, time left: 50 s
Iteration #66 of 100, time left: 50 s

test passes with 
java options: -server -Xcomp -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode

Need to be investigated is it reproducable on other platforms.
In light of the evaluation, synopsis changed from:-

   Parallelclass load test fail intermittent with concurrent garbage collector

to:-

   Parallel Class Loading test deadlock involving MethodData_lock and Pending List Lock

thus absolving CMS of all guilt; so help me Lord!

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7/build/hotspot/rev/7cf1a74771e8
                                     
2010-12-25
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/7cf1a74771e8
                                     
2010-12-10
EVALUATION

Summary: Don't acquire methodData_lock while holding pending list lock
                                     
2010-12-10
SUGGESTED FIX

Drop the MethoData_lock around the code that allocates the MDO storage (so that
MD_Lock is not held when trying to GC). The MD_Lock should be made a leaf lock
or whatever the current terminology is for "don't hold this lock when attempting to
allocate or do a GC".
                                     
2010-09-29
EVALUATION

Attempt to allocate (and initiate GC/acquire PLL) while holding MethodData_lock in one thread
deadlocks with ReferenceHandler thread attempting to acquire the MethodData_lock
while holding the PLL.
                                     
2010-09-29



Hardware and Software, Engineered to Work Together