[OpenJDK 2D-Dev] [8u] RFR JDK-8162461: Hang due to JNI up-call made whilst holding JNI critical lock.

Jayathirth D V jayathirth.d.v at oracle.com
Thu Sep 15 08:29:25 UTC 2016



Please review the following backport to JDK-8u from JDK-9 at your convenience:


JDK-9 review thread : http://mail.openjdk.java.net/pipermail/2d-dev/2016-September/007601.html 


Bug : https://bugs.openjdk.java.net/browse/JDK-8162461 


JDK-8u Webrev : http://cr.openjdk.java.net/~jdv/8162461.8u/webrev.00/ 


Issue : If we try to perform operations like reader.abort()/reader.dispose()/ reader.reset() in any of the IIOReadUpdateListener callbacks, JVM will throw deadlock error.


Root cause : We are making callbacks from native side to Java by holding some resources in JNI critical lock.


Solution : We have to release the JNI critical lock on the resources before we call Java function from native side. If we have JNI critical lock and we throw an Exception in that case also we should release the lock.


I have verified jtreg, JCK and JPRT in JDK8u-dev also.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160915/110d2682/attachment.html>

More information about the 2d-dev mailing list