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

8327990: [macosx-aarch64] Various tests fail with -XX:+AssertWXAtThreadSync #580

Closed

Conversation

reinrich
Copy link
Member

@reinrich reinrich commented May 16, 2024

I would like to backport openjdk/jdk22u@0c57256 to jdk 21 to get clean testing with -XX:+AssertWXAtThreadSync and avoid crashes because the VM is entered with the wrong WXState. The latter is very unlikely nevertheless aiming for clean tests with -XX:+AssertWXAtThreadSync will help to reduce the probability that users are affected by regressions in this area.

Testing:

I've verified every added WXState change if it is actually required.

The fix passed our CI testing with AssertWXAtThreadSync enabled: JTReg tests: tier1-4 of hotspot and jdk. All of Langtools and jaxp. JCK, SPECjvm2008, SPECjbb2015, Renaissance Suite, and SAP specific tests.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8327990 needs maintainer approval

Issue

  • JDK-8327990: [macosx-aarch64] Various tests fail with -XX:+AssertWXAtThreadSync (Bug - P4 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/580/head:pull/580
$ git checkout pull/580

Update a local copy of the PR:
$ git checkout pull/580
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/580/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 580

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/580.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 16, 2024

👋 Welcome back rrich! 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
Copy link

openjdk bot commented May 16, 2024

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

8327990: [macosx-aarch64] Various tests fail with -XX:+AssertWXAtThreadSync

Reviewed-by: aph

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

  • d7c7326: 8331885: C2: meet between unloaded and speculative types is not symmetric
  • 8991255: 8326734: text-decoration applied to lost when mixed with or
  • ccee9d0: 8332499: Gtest codestrings.validate_vm fail on linux x64 when hsdis is present
  • 33ba538: 8331789: ubsan: deoptimization.cpp:403:29: runtime error: load of value 208, which is not a valid value for type 'bool'
  • ce34aa9: 8332885: Clarify failure_handler self-tests
  • a160bd4: 8294148: Support JSplitPane for instructions and test UI
  • d275f51: 8316104: Open source several Swing SplitPane and RadioButton related tests
  • 9fef7d8: 8325616: JFR ZGC Allocation Stall events should record stack traces
  • 24300eb: 8320602: Lock contention in SchemaDVFactory.getInstance()
  • d87f5a3: 8329995: Restricted access to /proc can cause JFR initialization to crash
  • ... and 79 more: https://git.openjdk.org/jdk21u-dev/compare/6b0467c4736b9bda7fc7650f510754ef91be79f0...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 changed the title Backport 0c572566963be7f941228deda2691ce2fc456c15 8327990: [macosx-aarch64] Various tests fail with -XX:+AssertWXAtThreadSync May 16, 2024
@openjdk
Copy link

openjdk bot commented May 16, 2024

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added approval and removed approval labels Jun 5, 2024
@reinrich reinrich marked this pull request as ready for review June 6, 2024 07:53
@openjdk
Copy link

openjdk bot commented Jun 6, 2024

⚠️ @reinrich This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 6, 2024
@mlbridge
Copy link

mlbridge bot commented Jun 6, 2024

Webrevs

@openjdk openjdk bot added the approval label Jun 6, 2024
@@ -291,6 +291,7 @@ void JfrStorage::register_full(BufferPtr buffer, Thread* thread) {
JavaThread* jt = JavaThread::cast(thread);
if (jt->thread_state() == _thread_in_native) {
// Transition java thread to vm so it can issue a notify.

Choose a reason for hiding this comment

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

I don't understand this comment. Why does issuing a notify need WXWrite?

Copy link
Member Author

Choose a reason for hiding this comment

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

The comment is preexisting. Issuing notify doesn't need WXWrite. It needs a thread state transition ThreadInVMfromNative and that transition requires WXWrite.

Copy link

@theRealAph theRealAph left a comment

Choose a reason for hiding this comment

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

OK. I hate the way this code works, but we need it now.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval labels Jun 6, 2024
@reinrich
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 10, 2024

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

  • 8204bd7: 8323782: Race: Thread::interrupt vs. AbstractInterruptibleChannel.begin
  • 1bb396f: 8313983: jmod create --target-platform should replace existing ModuleTarget attribute
  • f9de294: 8331931: JFR: Avoid loading regex classes during startup
  • ace9524: 8329665: fatal error: memory leak: allocating without ResourceMark
  • d7c7326: 8331885: C2: meet between unloaded and speculative types is not symmetric
  • 8991255: 8326734: text-decoration applied to lost when mixed with or
  • ccee9d0: 8332499: Gtest codestrings.validate_vm fail on linux x64 when hsdis is present
  • 33ba538: 8331789: ubsan: deoptimization.cpp:403:29: runtime error: load of value 208, which is not a valid value for type 'bool'
  • ce34aa9: 8332885: Clarify failure_handler self-tests
  • a160bd4: 8294148: Support JSplitPane for instructions and test UI
  • ... and 83 more: https://git.openjdk.org/jdk21u-dev/compare/6b0467c4736b9bda7fc7650f510754ef91be79f0...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jun 10, 2024

@reinrich Pushed as commit 8da58b9.

💡 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
backport clean integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants