On Fri, 19 Feb 2021 21:44:15 GMT, Weijun Wang <[email protected]> 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.

This pull request has now been integrated.

Changeset: 991f7c13
Author:    Weijun Wang <[email protected]>
URL:       https://git.openjdk.java.net/jdk/commit/991f7c13
Stats:     6 lines in 1 file changed: 4 ins; 0 del; 2 mod

8210373: Deadlock in libj2gss.so when loading "j2gss" and "net" libraries in 
parallel.

Reviewed-by: xuelei

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

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

Reply via email to