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

8297285: Shenandoah pacing causes assertion failure during VM initialization #11360

Closed
wants to merge 3 commits into from

Conversation

ashu-mehra
Copy link
Contributor

@ashu-mehra ashu-mehra commented Nov 24, 2022

Please review the fix for the assertion failure seen during VM init due to pacing in shenandoah gc.
The fix is to avoid pacing during VM initialization as the main thread is not yet an active java thread.

Signed-off-by: Ashutosh Mehra asmehra@redhat.com


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-8297285: Shenandoah pacing causes assertion failure during VM initialization

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11360

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

Using diff file

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

initialization

Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
@bridgekeeper
Copy link

bridgekeeper bot commented Nov 24, 2022

👋 Welcome back ashu-mehra! 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 24, 2022
@openjdk
Copy link

openjdk bot commented Nov 24, 2022

@ashu-mehra The following labels will be automatically applied to this pull request:

  • hotspot-gc
  • shenandoah

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 hotspot-gc hotspot-gc-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels Nov 24, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 24, 2022

Webrevs

fix compile failure

Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
@ashu-mehra
Copy link
Contributor Author

zero build was failing with following compile error:

/usr/bin/ld: /home/runner/work/jdk/jdk/build/linux-x64/hotspot/variant-zero/libjvm/objs/shenandoahPacer.o: in function `JavaThread::is_active_Java_thread() const':
/home/runner/work/jdk/jdk/src/hotspot/share/runtime/javaThread.hpp:514: undefined reference to `JavaThread::is_terminated() const'

Pushed a commit to include the necessary header file.

@ashu-mehra
Copy link
Contributor Author

Can I please get reviews for this PR.

Copy link
Contributor

@rkennke rkennke left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thank you, Ashu!

@openjdk
Copy link

openjdk bot commented Dec 1, 2022

@ashu-mehra 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:

8297285: Shenandoah pacing causes assertion failure during VM initialization

Reviewed-by: rkennke, phh

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

  • df07255: 8297984: Turn on warnings as errors for javadoc
  • 227364d: 8297953: Fix several C2 IR matching tests for RISC-V
  • 1370228: 8297941: Add override modifier in space.hpp
  • 319faa5: 8296084: javax/swing/JSpinner/4788637/bug4788637.java fails intermittently on a VM
  • b73363f: 8297686: JFR: Improve documentation of EventStream::onMetadata(Consumer)
  • 1376f33: 8297911: Memory leak in JfrUpcalls::on_retransform
  • 5c0ff26: 8291444: GHA builds/tests won't run manually if disabled from automatic running
  • 6d0fbb2: 8297645: Drop the test/jdk/java/net/httpclient/reactivestreams-tck-tests/TckDriver.java test
  • 687fd71: 8297549: RISC-V: Add support for Vector API vector load const operation
  • d50015a: 8297715: RISC-V: C2: Use single-bit instructions from the Zbs extension
  • ... and 230 more: https://git.openjdk.org/jdk/compare/819af69f408261f55af883ba015c1f6179236582...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@rkennke, @phohensee) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 1, 2022
@ashu-mehra
Copy link
Contributor Author

@rkennke thanks for suggesting and reviewing the fix.

@ashu-mehra
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Dec 1, 2022
@openjdk
Copy link

openjdk bot commented Dec 1, 2022

@ashu-mehra
Your change (at version 60f174f) is now ready to be sponsored by a Committer.

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

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

I'm not familiar with this code, so please bear with me. :) The comment on line 246 says "Thread which is not an active Java thread should also not block.", but the check at line 251 will return (i.e., looks like not block) if the current thread is an active Java thread. Should the check be !current->is_active_Java_thread() instead?

@ashu-mehra
Copy link
Contributor Author

@phohensee you are right. It should be !current->is_active_Java_thread(), how did I miss that !!
Thanks for catching it in time.

Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
@openjdk openjdk bot removed the sponsor Pull request is ready to be sponsored label Dec 2, 2022
Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

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

Looks good now.

@phohensee
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Dec 2, 2022

@phohensee The PR has been updated since the change author (@ashu-mehra) issued the integrate command - the author must perform this command again.

@ashu-mehra
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Dec 2, 2022
@openjdk
Copy link

openjdk bot commented Dec 2, 2022

@ashu-mehra
Your change (at version 17a7b3b) is now ready to be sponsored by a Committer.

@phohensee
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Dec 2, 2022

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

  • df07255: 8297984: Turn on warnings as errors for javadoc
  • 227364d: 8297953: Fix several C2 IR matching tests for RISC-V
  • 1370228: 8297941: Add override modifier in space.hpp
  • 319faa5: 8296084: javax/swing/JSpinner/4788637/bug4788637.java fails intermittently on a VM
  • b73363f: 8297686: JFR: Improve documentation of EventStream::onMetadata(Consumer)
  • 1376f33: 8297911: Memory leak in JfrUpcalls::on_retransform
  • 5c0ff26: 8291444: GHA builds/tests won't run manually if disabled from automatic running
  • 6d0fbb2: 8297645: Drop the test/jdk/java/net/httpclient/reactivestreams-tck-tests/TckDriver.java test
  • 687fd71: 8297549: RISC-V: Add support for Vector API vector load const operation
  • d50015a: 8297715: RISC-V: C2: Use single-bit instructions from the Zbs extension
  • ... and 230 more: https://git.openjdk.org/jdk/compare/819af69f408261f55af883ba015c1f6179236582...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 2, 2022

@phohensee @ashu-mehra Pushed as commit 415cfd2.

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

@ashu-mehra ashu-mehra deleted the JDK-8297285-v1 branch February 7, 2023 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc hotspot-gc-dev@openjdk.org integrated Pull request has been integrated shenandoah shenandoah-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants