[8u] RFR: JDK-8231584: Deadlock with ClassLoader.findLibrary and System.loadLibrary call
Anton Kozlov
akozlov at azul.com
Fri Feb 21 11:34:22 UTC 2020
On 18.10.2019 15:14, Anton Kozlov wrote:
>
> On 17.10.2019 14:45, Andrew Dinn wrote:
>> backport looks good.
>
>
> On 16.10.2019 22:26, Hohensee, Paul wrote:
>> Your backport looks good to me
>
Alexey recently posted few notes on this backport to JBS [1], refering to discovered regression [2].
I think that discussion should be continued on this alias, where more interested people can follow it.
Third-party software assumes JDK implementation details: uses reflection to change private field of system class and depends on subsequent behavior.
But it seems we should support they anyway.
We can revert to old behavior by reverting the patch.
We can invent a new patch which restores lazy initialization checks again, but then we'll need some additional synchronization, previous lazy-init-check was called by synchronized method.
For context, discussed bug JDK-8231584 is broader version of JDK-8194653, for which we don't have a fix.
Perhaps, we can invent a fix for latter bug instead, involving only specific class loader and/or specific class (which <clinit> loads a library).
The problem is that we don't have a reliable reproducer for JDK-8194653. We have synthetic cases built, which IMHO can be fixed only by a general fix (this one).
Thanks,
Anton
1: https://bugs.openjdk.java.net/browse/JDK-8231584?focusedCommentId=14318106&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14318106
2: https://mail.openjdk.java.net/pipermail/jdk8u-dev/2020-January/011026.html
More information about the jdk8u-dev
mailing list