Skip to content

8273486: Zero: Handle DiagnoseSyncOnValueBasedClasses VM option #5412

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

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Sep 8, 2021

JDK-8257027 added a diagnostic option to check for synchronization on value-based classes. Zero does not support it, so it would fail the relevant test:

$ CONF=linux-x86_64-zero-fastdebug make exploded-test TEST=runtime/Monitor/SyncOnValueBasedClassTest.java

STDERR:
 stdout: [];
 stderr: [Exception in thread "main" java.lang.RuntimeException: synchronization on value based class did not fail
	at SyncOnValueBasedClassTest$FatalTest.main(SyncOnValueBasedClassTest.java:128)
]
 exitValue = 1

java.lang.RuntimeException: 'fatal error: Synchronizing on object' missing from stdout/stderr 

Template interpreters implement this check by going to to slowpath that calls InterpreterRuntime::monitorenter. Zero already goes to that path when UseHeavyMonitors is enabled, so we might just enable it when lock diagnostics is requested. This would cost us zero (pun intended) when diagnostic option is disabled.

Additional testing:

  • Linux x86_64 Zero, affected test now passes

Progress

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

Issue

  • JDK-8273486: Zero: Handle DiagnoseSyncOnValueBasedClasses VM option

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5412/head:pull/5412
$ git checkout pull/5412

Update a local copy of the PR:
$ git checkout pull/5412
$ git pull https://git.openjdk.java.net/jdk pull/5412/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5412

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5412.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 8, 2021

👋 Welcome back shade! 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 Sep 8, 2021
@openjdk
Copy link

openjdk bot commented Sep 8, 2021

@shipilev 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 Sep 8, 2021
@mlbridge
Copy link

mlbridge bot commented Sep 8, 2021

Webrevs

@shipilev
Copy link
Member Author

Any takers? :)

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.

Hi Aleksey,

Change seems fine. I'm a little surprised this is all you need.

Cheers,
David

@openjdk
Copy link

openjdk bot commented Sep 14, 2021

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

8273486: Zero: Handle DiagnoseSyncOnValueBasedClasses VM option

Reviewed-by: dholmes

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

  • c54a918: 8273691: Missing comma after 2021 in GraphemeTestAccessor.java copyright notice
  • 3d9dc8f: 8273430: Suspicious duplicate condition in java.util.regex.Grapheme#isExcludedSpacingMark
  • 5095068: 8273675: Remove unused Universe::_verify_in_progress flag
  • fc0f854: 8246797: A convenient method to read OPTIONAL element
  • 6cf5079: 8273513: Make java.io.FilterInputStream specification more precise about overrides
  • b4b1210: 8273616: Fix trivial doc typos in the java.base module
  • 7c26ddb: 8195809: [TESTBUG] jps and jcmd -l support for containers is not tested
  • 4cfa230: 8273259: Character.getName doesn't follow Unicode spec for ideographs
  • f9b2507: 8271834: TestStringDeduplicationAgeThreshold intermittent failures on Shenandoah
  • 261cb44: 8273629: compiler/uncommontrap/TestDeoptOOM.java fails with release VMs
  • ... and 84 more: https://git.openjdk.java.net/jdk/compare/3cd95a2932ab6a2cb39322354f7ad181de8bfc9e...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 Sep 14, 2021
@shipilev
Copy link
Member Author

Change seems fine. I'm a little surprised this is all you need.

Thanks. Yes, the magic of reusing the existing UseHeavyMonitors paths. It would be a minor problem if we ever decide to ditch that option, but that's the issue for another day.

/integrate

@openjdk
Copy link

openjdk bot commented Sep 14, 2021

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

  • 8d73ee6: 8273471: Add foldmultilines to UL for stdout/err
  • c54a918: 8273691: Missing comma after 2021 in GraphemeTestAccessor.java copyright notice
  • 3d9dc8f: 8273430: Suspicious duplicate condition in java.util.regex.Grapheme#isExcludedSpacingMark
  • 5095068: 8273675: Remove unused Universe::_verify_in_progress flag
  • fc0f854: 8246797: A convenient method to read OPTIONAL element
  • 6cf5079: 8273513: Make java.io.FilterInputStream specification more precise about overrides
  • b4b1210: 8273616: Fix trivial doc typos in the java.base module
  • 7c26ddb: 8195809: [TESTBUG] jps and jcmd -l support for containers is not tested
  • 4cfa230: 8273259: Character.getName doesn't follow Unicode spec for ideographs
  • f9b2507: 8271834: TestStringDeduplicationAgeThreshold intermittent failures on Shenandoah
  • ... and 85 more: https://git.openjdk.java.net/jdk/compare/3cd95a2932ab6a2cb39322354f7ad181de8bfc9e...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 14, 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 Sep 14, 2021
@openjdk
Copy link

openjdk bot commented Sep 14, 2021

@shipilev Pushed as commit 86a8e55.

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

@shipilev shipilev deleted the JDK-8273486-zero-diag-synconvalue branch September 14, 2021 08:37
Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

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

LGTM

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
Development

Successfully merging this pull request may close these issues.

3 participants