[jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class
Aleksei Voitylov
avoitylov at openjdk.java.net
Mon Jun 21 18:23:27 UTC 2021
On Mon, 21 Jun 2021 13:26:14 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 against JDK17.
>>
>> This fixes the deadlock in ClassLoader between the two lock objects - a lock object associated with the class being loaded, and the ClassLoader.loadedLibraryNames hash map, locked during the native library load operation.
>>
>> Further details can be found in the original PR.
>>
>> Testing: jtreg and jck testing with no regressions. A new regression test was developed.
>
> @voitylov JDK 17 is an RDP 1 and I wonder if this long standing issue is critical or not. I've skimmed through the changes and I don't see any issue but if this is really intended for openjdk/jdk17 then I think it would be useful to have more eyes on it.
@AlanBateman I think it's worth to be included in JDK17 because in case someone hits this (like netty), the impact is high (a framework or an application can't start) and there is no viable workaround without rewriting code. The scope of change in the last version, at the same time, is limited.
-------------
PR: https://git.openjdk.java.net/jdk17/pull/96
More information about the core-libs-dev
mailing list