RFR: 8210373: Deadlock in libj2gss.so when loading "j2gss" and "net" libraries in parallel. [v2]

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Mon Feb 22 21:35:56 UTC 2021


On Mon, 22 Feb 2021 20:56:09 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> `InetAddress` is loading native library `net` and at the same time `SunNativeProvider` is loading `j2gss`, and in the `OnLoad` function inside `j2gss` it is calling `FindClass(env, "java/net/InetAddress")` and thus a deadlock.
>> 
>> We can access `InetAddress` in `SunNativeProvider.<clinit>` before loading the jgss library. i.e. use `Class.forName` to ensure `InetAddress` is initialized. Thanks to @dholmes-ora for providing this workaround.
>> 
>> No new regression test, hard to reproduce.
>
> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add comment

Looks good to me.

-------------

Marked as reviewed by xuelei (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2655



More information about the security-dev mailing list