harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Werner Froidevaux (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6628) Deadlock in getProxyClass()
Date Thu, 26 Aug 2010 10:03:54 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Werner Froidevaux updated HARMONY-6628:
---------------------------------------

    Attachment: TestProxy.java

I have attached a JUnit which blocks at in Proxy.getProxyClass() at line 'synchronized (loaderCache)'.

> Deadlock in getProxyClass()
> ---------------------------
>
>                 Key: HARMONY-6628
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6628
>             Project: Harmony
>          Issue Type: Bug
>          Components: JDK
>    Affects Versions: 5.0M14
>         Environment: harmony-5.0-jdk-946978/
> harmony-6.0-jdk-946981/
> Linux-32
> Eclipse 3.5
>            Reporter: Werner Froidevaux
>            Priority: Blocker
>         Attachments: TestProxy.java
>
>
> In certain situations the method java.lang.reflect.Proxy.getProxyClass() produces a deadlock.
This seems always to be the case when getProxyClass() is called recursively by defineClassImpl().
> public static Class<?> getProxyClass(
>   ClassLoader loader,
>   Class<?>[] interfaces
> ) throws IllegalArgumentException {
>     ...
>     synchronized (loaderCache) {
>         ...
>         newClass = defineClassImpl(loader, ...);
>         ...
>     }
> }
> When the native method recursively invokes getClassImpl() (via newProxyInstance()) the
VM is locked at synchronized (loaderCache). Because I only have one thread (Main) a deadlock
must never occur. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message