Skip to content

Conversation

@DamonFool
Copy link
Member

@DamonFool DamonFool commented May 13, 2022

Hi all,

Some tests fail with Shenandoah GC after JDK-8282191.
The reason is that the assert in ShenandoahControlThread::request_gc misses the case of GCCause::_codecache_GC_threshold.
It would be better to fix it.

Thanks.
Best regards,
Jie


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (1 review required, with at least 1 reviewer)

Issue

  • JDK-8286681: ShenandoahControlThread::request_gc misses the case of GCCause::_codecache_GC_threshold

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8691

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented May 13, 2022

👋 Welcome back jiefu! 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 13, 2022

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

  • core-libs
  • 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 core-libs core-libs-dev@openjdk.org hotspot-gc hotspot-gc-dev@openjdk.org shenandoah shenandoah-dev@openjdk.org labels May 13, 2022
@DamonFool DamonFool changed the title ShenandoahControlThread::request_gc misses the case of GCCause::_codecache_GC_threshold 8286681: ShenandoahControlThread::request_gc misses the case of GCCause::_codecache_GC_threshold May 13, 2022
@openjdk openjdk bot added the rfr Pull request is ready for review label May 13, 2022
@mlbridge
Copy link

mlbridge bot commented May 13, 2022

Webrevs

* -Xbatch
* -XX:+UseShenandoahGC
* TestIntrinsics
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed? The parameters looks the same as the first test description so if you are testing with +ShenandoahGC then it will run already.

Copy link
Member Author

Choose a reason for hiding this comment

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

Without -XX:+UseShenandoahGC, this bug wouldn't be exposed.

What do you mean by if you are testing with +ShenandoahGC then it will run already?

Copy link
Contributor

Choose a reason for hiding this comment

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

I assume you are running the tests with:
make run-tests TEST_OPTS_JAVA_OPTIONS="-XX:+UseShenandoahGC"
in which case, all of the tests you select to run will be run with that GC.

What you have is not wrong but wouldn't be a better to add a new test to test/hotspot/jtreg/gc rather than relying on test in test/jdk/java/foreign?

Copy link
Member Author

Choose a reason for hiding this comment

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

I assume you are running the tests with: make run-tests TEST_OPTS_JAVA_OPTIONS="-XX:+UseShenandoahGC" in which case, all of the tests you select to run will be run with that GC.

Yes, you're right.

What you have is not wrong but wouldn't be a better to add a new test to test/hotspot/jtreg/gc rather than relying on test in test/jdk/java/foreign?

I would suggest reusing the existing test in java/foreign.
This is because this bug was first triggered after Implementation of Foreign Function & Memory API (Preview) integration.
And I don't want a copy-paste code duplication in a new test file.
Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I agree with @AlanBateman - in the sense that this seems to go down a slippery slope where every test would need to be executed against all possible GCs. AFAIK, there are no other foreign tests doing this.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I agree with @AlanBateman - in the sense that this seems to go down a slippery slope where every test would need to be executed against all possible GCs. AFAIK, there are no other foreign tests doing this.

I think it's a waste of time to write a separate test for this bug.

I can't understand why you are against adding one more test config in the foreign test.
Yes, it caught the bug in ShenandoahGC but who knows it wouldn't find some other bugs in the foreign api in the future.
If you are still against the newly added test config, I can revert the test change.
Thanks.

Copy link
Member

Choose a reason for hiding this comment

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

My comment seems to have never made it through. The problem with what your are doing is two-fold:

  1. When running the test suite specifically to test xGC for whatever x you are now forcing a test run for Shenandoah.
  2. When x is Shenandoah then you run this test twice.

You don't need a config just to run this with Shenandoah - you run the test suite with Shenandoah.

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 test change had been reverted.
Thanks.

Copy link
Contributor

@zhengyu123 zhengyu123 left a comment

Choose a reason for hiding this comment

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

LGTM

@openjdk
Copy link

openjdk bot commented May 13, 2022

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

8286681: ShenandoahControlThread::request_gc misses the case of GCCause::_codecache_GC_threshold

Reviewed-by: zgu

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

  • cbe7e7b: 8284956: Potential leak awtImageData/color_data when initializes X11GraphicsEnvironment
  • 8daf08d: 8286628: Remove unused BufferNode::Allocator::flush_free_list
  • 04df8b7: 8286194: ExecutorShutdown test fails intermittently
  • 0be1f3e: 8286689: (se) Adjusting to select timeout after EINTR messed up after JDK-8286378
  • 6a1b098: 8278039: Code completion not woking after some statements such as "if" or "while"
  • 11fa03f: 8282160: JShell circularly-required classes cannot be defined
  • d5ae383: 8286117: Remove unnecessary indirection and unused code in UL

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 May 13, 2022
@DamonFool
Copy link
Member Author

LGTM

Thanks @zhengyu123 for the review.
/integrate

@openjdk
Copy link

openjdk bot commented May 14, 2022

Going to push as commit 9eb15c9.
Since your change was applied there have been 16 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 May 14, 2022
@openjdk openjdk bot closed this May 14, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 14, 2022
@openjdk
Copy link

openjdk bot commented May 14, 2022

@DamonFool Pushed as commit 9eb15c9.

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

@DamonFool DamonFool deleted the JDK-8286681 branch May 14, 2022 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org 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.

5 participants