Navigation Menu

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

8290908: misc tests fail: assert(!thread->owns_locks()) failed: must release all locks when leaving VM #9699

Closed
wants to merge 1 commit into from

Conversation

sspitsyn
Copy link
Contributor

@sspitsyn sspitsyn commented Aug 1, 2022

This is a regression that has been introduced by the fix of:
8256811: Delayed/missed jdwp class unloading events

This is the relevant comment from Zhengyu:

It is caused by https://bugs.openjdk.org/browse/JDK-8256811 as JvmtiExport::post_object_free() call does not expect under any lock.

I think we can move following code outside of lock, as flush_obect_free_events() races ServiceThread's JvmtiTagMap::flush_all_object_free_events() call anyway.

  if (event_type == JVMTI_EVENT_OBJECT_FREE) {
    flush_object_free_events(env);
  }

The fix is as was suggested by Zhengyu above.
I was not able to reproduce JCK and nsk.jvmti test failures mentioned in the bug report.
However, this fix should address the problem as it moves the call to flush_object_free_events(env) out of a critical section with a lock.


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-8290908: misc tests fail: assert(!thread->owns_locks()) failed: must release all locks when leaving VM

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9699

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 1, 2022

👋 Welcome back sspitsyn! 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 Aug 1, 2022
@openjdk
Copy link

openjdk bot commented Aug 1, 2022

@sspitsyn The following labels will be automatically applied to this pull request:

  • hotspot
  • serviceability

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

@openjdk openjdk bot added serviceability serviceability-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Aug 1, 2022
@mlbridge
Copy link

mlbridge bot commented Aug 1, 2022

Webrevs

@openjdk
Copy link

openjdk bot commented Aug 1, 2022

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

8290908: misc tests fail: assert(!thread->owns_locks()) failed: must release all locks when leaving VM

Reviewed-by: cjplummer, amenkov

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

  • 5acf2d7: 8291578: Remove JMX related tests from ProblemList-svc-vthreads.txt
  • a6564d4: 8291650: Add delay to ClassUnloadEventTest before exiting to give time for JVM to send all events before VMDeath
  • af76c0c: 8291654: AArch64: assert from JDK-8287393 causes crashes
  • a9db5bb: 8291626: Remove Mutex::contains as it is unused
  • a2cff26: 8291597: [BACKOUT] JDK-8289996: Fix array range check hoisting for some scaled loop iv
  • 554f44e: 8282730: LdapLoginModule throw NPE from logout method after login failure
  • f714ac5: 8290718: Remove ALLOCATION_SUPER_CLASS_SPEC
  • 6cbc234: 8287393: AArch64: Remove trampoline_call1
  • 57bf603: 8289948: Improve test coverage for XPath functions: Node Set Functions
  • 1df77ec: 8291060: OPEN_MAX is no longer the max limit on macOS >= 10.6 for RLIMIT_NOFILE
  • ... and 580 more: https://git.openjdk.org/jdk/compare/3475e12fa6c50dbaf53b6b03f3b8032017394c1f...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 Aug 1, 2022
@sspitsyn
Copy link
Contributor Author

sspitsyn commented Aug 2, 2022

Chris and Alex, thank you for review!

@sspitsyn
Copy link
Contributor Author

sspitsyn commented Aug 2, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Aug 2, 2022

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

  • 5acf2d7: 8291578: Remove JMX related tests from ProblemList-svc-vthreads.txt
  • a6564d4: 8291650: Add delay to ClassUnloadEventTest before exiting to give time for JVM to send all events before VMDeath
  • af76c0c: 8291654: AArch64: assert from JDK-8287393 causes crashes
  • a9db5bb: 8291626: Remove Mutex::contains as it is unused
  • a2cff26: 8291597: [BACKOUT] JDK-8289996: Fix array range check hoisting for some scaled loop iv
  • 554f44e: 8282730: LdapLoginModule throw NPE from logout method after login failure
  • f714ac5: 8290718: Remove ALLOCATION_SUPER_CLASS_SPEC
  • 6cbc234: 8287393: AArch64: Remove trampoline_call1
  • 57bf603: 8289948: Improve test coverage for XPath functions: Node Set Functions
  • 1df77ec: 8291060: OPEN_MAX is no longer the max limit on macOS >= 10.6 for RLIMIT_NOFILE
  • ... and 580 more: https://git.openjdk.org/jdk/compare/3475e12fa6c50dbaf53b6b03f3b8032017394c1f...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Aug 2, 2022

@sspitsyn Pushed as commit 0ae8341.

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

@sspitsyn sspitsyn deleted the br2 branch December 15, 2022 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
3 participants