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

8315827: Kitchensink.java and RenaissanceStressTest.java time out with jvmti module errors #16982

Closed
wants to merge 1 commit into from

Conversation

mgronlun
Copy link

@mgronlun mgronlun commented Dec 5, 2023

Greetings,

A deadlock interaction pattern has surfaced where the JFR sampler thread has suspended a thread, reportedly in state thread_in_java. That thread is currently running barrier code and is holding a semaphore as part of logging inside of LogFileOutput::write( ).

When the JFR thread sampler attempts to read the thread status from the thread object, it triggers the same barrier code, eventually waiting for the semaphore inside LogFileOutput::write( ). Since the owner is suspended, a deadlock ensues.

To avoid triggering barriers as part of the sampler code, we can avoid reading the thread status from the thread object as part of sampling. This is especially so because we know what the thread state is at this point, especially for _thread_in_java but also for _thread_in_native. It is most likely JavaThreadStatus::RUNNABLE (5). Write it as a constant.

Testing: jdk_jfr

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-8315827: Kitchensink.java and RenaissanceStressTest.java time out with jvmti module errors (Bug - P2)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16982

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 5, 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 Dec 5, 2023
@openjdk
Copy link

openjdk bot commented Dec 5, 2023

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

  • hotspot-jfr

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

mlbridge bot commented Dec 5, 2023

Webrevs

@openjdk
Copy link

openjdk bot commented Dec 6, 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:

8315827: Kitchensink.java and RenaissanceStressTest.java time out with jvmti module errors

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

  • a9cb120: 8320948: NPE due to unreported compiler error
  • 4ef24e2: 8319938: TestFileChooserSingleDirectorySelection.java fails with "getSelectedFiles returned empty array"
  • cc25d8b: 8319662: ForkJoinPool trims worker threads too slowly
  • 90e433d: 8320144: Compilation crashes when a custom annotation with invalid default value is used
  • 50f3124: 8320892: AArch64: Restore FPU control state after JNI
  • 0217b5a: 8321248: ClassFile API ClassModel::verify is inconsistent with the rest of the API
  • 7fbfb3b: 8321369: Unproblemlist gc/cslocker/TestCSLocker.java
  • 2678e4c: 8319111: Mismatched MemorySegment heap access is not consistently intrinsified
  • a0920aa: 8321159: SymbolLookup.libraryLookup(Path, Arena) Assumes default Filesystem
  • 9d77677: 8321124: java/util/stream/GatherersTest.java times out
  • ... and 19 more: https://git.openjdk.org/jdk/compare/027b5dbb6a299e49d3dcbe67d529d6edc67f16d9...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 Dec 6, 2023
@mgronlun
Copy link
Author

mgronlun commented Dec 6, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Dec 6, 2023

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

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 6, 2023

@mgronlun Pushed as commit 75a7c19.

💡 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-jfr hotspot-jfr-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants