RFR: 8222422: vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses tests failed with Unexpected Exception: null

Jean Christophe Beyler jcbeyler at google.com
Sat May 11 02:20:30 UTC 2019


Hi Daniil,

Looks good to me :)
Jc

*From: *Daniil Titov <daniil.x.titov at oracle.com>
*Date: *Fri, May 10, 2019 at 7:11 PM
*To: *OpenJDK Serviceability

Please review the change that fixes an intermittent failure of the test.
>
> The tests checks the implementation of  the
> com.sun.tools.jdi.ClassLoaderReference class. The problem here is that
> while com.sun.tools.jdi.ClassLoaderReferenceImpl.definedClasses() iterates
> over all loaded classes to retrieve a classloader and compares it to the
> current one, some of the classes might become unloaded and garbage
> collected (e.g. org.graalvm.compiler.nodes.InliningLog$$Lambda$41.899832640
> or jdk.internal.reflect.GeneratedConstructorAccessor1, etc.). If this
> happens then the attempt to retrieve a classloader for the collected class
> results in com.sun.jdi.ObjectCollectedException being thrown.
>
> The fix catches this com.sun.jdi.ObjectCollectedException and continues
> iterating over the rest of the classes.
>
> Webrev: http://cr.openjdk.java.net/~dtitov/8222422/webrev.01
> Bug: https://bugs.openjdk.java.net/browse/JDK-8222422
>
> Thanks!
> --Daniil
>
>
>

-- 

Thanks,
Jc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20190510/f60cf282/attachment.html>


More information about the serviceability-dev mailing list