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

Weijun Wang weijun at openjdk.java.net
Tue Feb 23 01:02:38 UTC 2021


On Fri, 19 Feb 2021 21:44:15 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.

This pull request has now been integrated.

Changeset: 991f7c13
Author:    Weijun Wang <weijun at openjdk.org>
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



More information about the security-dev mailing list