Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into from

Conversation

wangweij
Copy link
Contributor

@wangweij wangweij commented Feb 19, 2021

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.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

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

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2655/head:pull/2655
$ git checkout pull/2655

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 19, 2021

👋 Welcome back weijun! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 19, 2021
@openjdk
Copy link

openjdk bot commented Feb 19, 2021

@wangweij The following label will be automatically applied to this pull request:

  • security

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the security security-dev@openjdk.org label Feb 19, 2021
@mlbridge
Copy link

mlbridge bot commented Feb 19, 2021

Webrevs

Copy link
Member

@XueleiFan XueleiFan left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@openjdk
Copy link

openjdk bot commented Feb 22, 2021

@wangweij This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

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

Reviewed-by: xuelei

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 60 new commits pushed to the master branch:

  • a867288: 8211227: Inconsistent TLS protocol version in debug output
  • 7b924d8: 8261973: Shenandoah: Cleanup/simplify root verifier
  • 63f8fc8: 8259662: Don't wrap SocketExceptions into SSLExceptions in SSLSocketImpl
  • cf0019d: 8259942: Enable customizations in CompileJavaModules.gmk and Main.gmk
  • a6a7e43: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions
  • d7eebda: 8261391: ZGC crash - SEGV in RevokeOneBias::do_thread
  • 5b7b18c: 8259800: timeout in tck test testForkJoin(ForkJoinPool8Test)
  • 419717d: 8261803: Remove unused TaskTerminator in g1 full gc ref proc executor
  • 011f5a5: 8261799: Remove unnecessary cast in psParallelCompact.hpp
  • e9d7c07: 8248318: Remove superfluous use of boxing in ObjectStreamClass
  • ... and 50 more: https://git.openjdk.java.net/jdk/compare/05301f5fd2b5f2357024a3d7bb788270861220a8...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 22, 2021
@wangweij
Copy link
Contributor Author

/integrate

@openjdk openjdk bot closed this Feb 23, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 23, 2021
@openjdk
Copy link

openjdk bot commented Feb 23, 2021

@wangweij Since your change was applied there have been 65 commits pushed to the master branch:

  • 0217d69: 8261975: Missing "classpath exception" in VectorSupport.java
  • f2bde05: 8262097: Improve CompilerConfig ergonomics to fix a VM crash after JDK-8261229
  • aea474c: 8261269: When using clhsdb to "inspect" a java object, clhsdb prints "Oop for..." twice
  • a7e2e80: 8260695: The java.awt.color.ICC_Profile#getData/getData(int) are not thread safe
  • a30fb4f: 8255867: SignatureScheme JSSE property does not preserve ordering in handshake messages
  • a867288: 8211227: Inconsistent TLS protocol version in debug output
  • 7b924d8: 8261973: Shenandoah: Cleanup/simplify root verifier
  • 63f8fc8: 8259662: Don't wrap SocketExceptions into SSLExceptions in SSLSocketImpl
  • cf0019d: 8259942: Enable customizations in CompileJavaModules.gmk and Main.gmk
  • a6a7e43: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions
  • ... and 55 more: https://git.openjdk.java.net/jdk/compare/05301f5fd2b5f2357024a3d7bb788270861220a8...master

Your commit was automatically rebased without conflicts.

Pushed as commit 991f7c1.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@wangweij wangweij deleted the 8210373 branch February 23, 2021 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated security security-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

2 participants