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

8319206: [REDO] Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native #16447

Closed
wants to merge 1 commit into from

Conversation

mgronlun
Copy link

@mgronlun mgronlun commented Nov 1, 2023

Greetings,

The original problem was introduced with:

JDK-8313251 - Add NativeLibraryLoad event

The first attempt at resolution:

JDK-8315220 - Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native

was reverted:

JDK-8315930 - Revert "8315220: Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native"

because it ran into:

JDK-8315892 - NativeLibraryLoadEvent dtr fails with "assert(false) failed: Possible safepoint reached by thread that does not allow it"

The reason for JDK-8315892 was that the thread loading the zip library, in thread state native, was the owner of the Zip_lock mutex. This prevented it from transitioning to thread_in_vm.

The Zip_lock mutex was removed as part of:

JDK-8317951 - Refactor loading of zip library to help resolve JDK-8315220

Therefore, it is time to redo the original JDK-8315220, now under this issue, JDK-8319206.

Testing: jdk_jfr, tiers1-6, stress testing

Thanks
Markus


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8319206: [REDO] Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/16447/head:pull/16447
$ git checkout pull/16447

Update a local copy of the PR:
$ git checkout pull/16447
$ git pull https://git.openjdk.org/jdk.git pull/16447/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16447

View PR using the GUI difftool:
$ git pr show -t 16447

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/16447.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 1, 2023

👋 Welcome back mgronlun! 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 Nov 1, 2023
@openjdk
Copy link

openjdk bot commented Nov 1, 2023

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

  • hotspot

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 hotspot hotspot-dev@openjdk.org label Nov 1, 2023
@mlbridge
Copy link

mlbridge bot commented Nov 1, 2023

Webrevs

@mgronlun
Copy link
Author

mgronlun commented Nov 1, 2023

/label add hotspot-jfr

@openjdk
Copy link

openjdk bot commented Nov 1, 2023

@mgronlun
The hotspot-jfr label was successfully added.

@openjdk openjdk bot added the hotspot-jfr hotspot-jfr-dev@openjdk.org label Nov 1, 2023
Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

General runtime changes seem fine. I can't comment on all the JFR-specific aspects but in general that appears okay too.

Thanks

@openjdk
Copy link

openjdk bot commented Nov 2, 2023

@mgronlun 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:

8319206: [REDO] Event NativeLibraryLoad breaks invariant by taking a stacktrace when thread is in state _thread_in_native

Reviewed-by: dholmes, egahlin

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 22 new commits pushed to the master branch:

  • 53bb7cd: 8318957: enhance agentlib:jdwp help output by info about allow option
  • d6ce62e: 8306561: Possible out of bounds access in print_pointer_information
  • 7f31a05: 8319203: Parallel: Rename addr_is_marked_imprecise
  • 4a85f6a: 8317132: Prepare HotSpot for permissive-
  • 5207443: 8317965: TestLoadLibraryDeadlock.java fails with "Unable to load native library.: expected true, was false"
  • ee57e73: 8317612: ChoiceFormat and MessageFormat constructors call non-final public method
  • f262f06: 8319211: Regression in LoopOverNonConstantFP
  • bfaf570: 8311546: Certificate name constraints improperly validated with leading period
  • d354141: 8318694: [JVMCI] disable can_call_java in most contexts for libjvmci compiler threads
  • c86592d: 8319046: Execute tests in source/class-file order in JavadocTester
  • ... and 12 more: https://git.openjdk.org/jdk/compare/f1e878739300ed37c686ba570423c6f8a9fb310f...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 Nov 2, 2023
@mgronlun
Copy link
Author

mgronlun commented Nov 2, 2023

General runtime changes seem fine. I can't comment on all the JFR-specific aspects but in general that appears okay too.

Thanks

Thanks David.

@mgronlun
Copy link
Author

mgronlun commented Nov 2, 2023

Thanks, @dholmes-ora and @egahlin, for the reviews.

@mgronlun
Copy link
Author

mgronlun commented Nov 2, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Nov 2, 2023

Going to push as commit faa8bde.
Since your change was applied there have been 27 commits pushed to the master branch:

  • 4f808c6: 8316538: runtime/handshake/MixedHandshakeWalkStackTest.java crashes with JFR
  • 2d4a4d0: 8315921: Invalid CSS declarations in java.lang class documentation
  • 792d829: 8319205: Parallel: Reenable work stealing after JDK-8310031
  • 23a96bf: 8318894: G1: Use uint for age in G1SurvRateGroup
  • 64f8253: 8317332: Prepare security for permissive-
  • 53bb7cd: 8318957: enhance agentlib:jdwp help output by info about allow option
  • d6ce62e: 8306561: Possible out of bounds access in print_pointer_information
  • 7f31a05: 8319203: Parallel: Rename addr_is_marked_imprecise
  • 4a85f6a: 8317132: Prepare HotSpot for permissive-
  • 5207443: 8317965: TestLoadLibraryDeadlock.java fails with "Unable to load native library.: expected true, was false"
  • ... and 17 more: https://git.openjdk.org/jdk/compare/f1e878739300ed37c686ba570423c6f8a9fb310f...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 2, 2023
@openjdk openjdk bot closed this Nov 2, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 2, 2023
@openjdk
Copy link

openjdk bot commented Nov 2, 2023

@mgronlun Pushed as commit faa8bde.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org hotspot-jfr hotspot-jfr-dev@openjdk.org integrated Pull request has been integrated
3 participants