RFR (XS) 8010723 - possible deadlock with SystemDictionary_lock

Karen Kinnear karen.kinnear at oracle.com
Fri Mar 29 06:06:35 PDT 2013


Ioi,

Thank you for jumping on this so quickly. I totally appreciate the detailed comments
in the code.

The comment about the the other threads waiting on the SD_lock is not accurate -
there is a wait above, but there is a notify in find_or_define which means that other
threads will get through.

Does the solution depend on this?

thanks,
Karen

On Mar 28, 2013, at 6:17 PM, Ioi Lam wrote:

> Please review:
> 
>      http://cr.openjdk.java.net/~iklam/8010723/sysdic_lock_001/
> 
> Bug: fatal error: acquiring lock Metaspace allocation lock/5 out
>      of order with lock SystemDictionary_lock/4 -- possible deadlock
> 
>     http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8010723
>     https://jbs.oracle.com/bugs/browse/JDK-8010723
> 
> Summary of fix:
> 
>     This crash is caused by the patch in JDK-8007725
>     http://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/1fc4d4768b90
> 
>     The code was calling Klass::remove_unshareable_info() (from within
>     SystemDictionary::clean_up_shared_class) while
>     holding SystemDictionary_lock. This is unnecessary and possibly
>     unsafe.
> 
>     I changed the code to call Klass::remove_unshareable_info() outside
>     of the SystemDictionary_lock. This is OK 
>     because Klass::restore_unshareable_info() is also being called outside
>     of SystemDictionary_lock.
> 
> Tests:
> 
>     I am running the UTE stress tests now. 
> 
> Thanks
> - Ioi
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20130329/67af71de/attachment.html 


More information about the hotspot-runtime-dev mailing list