Skip to content

Commit

Permalink
8210373: Deadlock in libj2gss.so when loading "j2gss" and "net" libra…
Browse files Browse the repository at this point in the history
…ries in parallel.

Reviewed-by: xuelei
  • Loading branch information
wangweij committed Feb 23, 2021
1 parent 0217d69 commit 991f7c1
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -71,8 +71,12 @@ public HashMap<String, String> run() {
DEBUG = Boolean.parseBoolean(
System.getProperty("sun.security.nativegss.debug"));
try {
// Ensure the InetAddress class is loaded before
// loading j2gss. The library will access this class
// and a deadlock might happen. See JDK-8210373.
Class.forName("java.net.InetAddress");
System.loadLibrary("j2gss");
} catch (Error err) {
} catch (ClassNotFoundException | Error err) {
debug("No j2gss library found!");
if (DEBUG) err.printStackTrace();
return null;
Expand Down

3 comments on commit 991f7c1

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on 991f7c1 Jan 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 991f7c1 Jan 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin Could not automatically backport 991f7c13 to openjdk/jdk11u-dev due to conflicts in the following files:

  • src/java.security.jgss/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk11u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk11u-dev master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b GoeLin-backport-991f7c13

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk 991f7c1303998b090cdc25f87b253afaf7302ec6

# Backport the commit
$ git cherry-pick --no-commit 991f7c1303998b090cdc25f87b253afaf7302ec6
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 991f7c1303998b090cdc25f87b253afaf7302ec6'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk11u-dev with the title Backport 991f7c1303998b090cdc25f87b253afaf7302ec6.

Please sign in to comment.