<br><font size=1 face="sans-serif"><b>Adrian <abrock@REDHAT.COM></b></font><tt><font size=2>
wrote on 25/05/2007 12:44:54:<br>
<br>
> On Thu, 2007-05-24 at 11:00 +0100, Glyn Normington wrote:<br>
> > A better approach would be for the Java 7 platform to provide
first<br>
> > class support for JSR 291. This boils down to standardising the<br>
> > experimental class loader deadlock fix ([1])<br>
> <br>
> Fixing the deadlock just moves the problem.<br>
> <br>
> You'll still get ClassCircularityErrors when competing threads<br>
> try to load classes using locks other than the classloader<br>
> synchronization or they don't synchronize on the loadClass()<br>
> or they release the lock during the classloading request<br>
> to let others have a go (again to avoid the deadlock).<br>
> <br>
> This is because of the way the dictionary class determines<br>
> whether a circular load is occuring.<br>
> <br>
> Although I haven't tried it with OpenJDK so maybe the<br>
> dictionary class contains some other fixes to workaround the<br>
> problem?<br>
> <br>
> The simple form of the problem:<br>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4699981<br>
> has been fixed in recent JDKs, but spurious CCEs<br>
> still exist in other cases.<br>
> e.g. the testAbstractFactoryConcurrent() here:<br>
> http://viewvc.jboss.org/cgi-bin/viewvc.<br>
> cgi/jbossas/projects/microcontainer/trunk/classloader/src/tests/org/jboss/test/classloader/delegate/test/DelegateUnitTestCase.<br>
> java?revision=62792&view=markup<br>
> will show CCEs in the log if you enable TRACE logging.<br>
> <br>
> 1445 TRACE [ClassLoaderManager] Run failed with exception<br>
> java.lang.ClassCircularityError:<br>
> org/jboss/test/classloader/delegate/support/b/TestFactoryImplementation<br>
> at java.lang.ClassLoader.defineClass1(Native
Method)<br>
> at java.lang.ClassLoader.defineClass(ClassLoader.java:620)<br>
</font></tt>
<br><tt><font size=2>Some spurious CCEs were indeed fixed before the experimental
deadlock fix was introduced, but there may be more to do to make this fix
robust and complete. If you raise a sunbug for the above testcase, best
to report it here so that class loader rearchitecture folks can take it
into consideration for Java 7.</font></tt>
<br>
<br><tt><font size=2>Glyn</font></tt><font size=3 face="sans-serif"><br>
</font>
<br><font size=3 face="sans-serif"><br>
</font>
<hr><font size=2 face="sans-serif"><br>
<i><br>
</i></font>
<p><font size=2 face="sans-serif"><i>Unless stated otherwise above:<br>
IBM United Kingdom Limited - Registered in England and Wales with number
741598. <br>
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU</i></font>
<p><font size=2 face="sans-serif"><br>
</font><font size=3 face="sans-serif"><br>
</font>
<br>
<br><font size=3 face="sans-serif"><br>
</font>