Skip to content

8301736: jdk/incubator/concurrent/StructuredTaskScope/StructuredTaskScopeTest.java fail with -Xcomp #12398

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
wants to merge 2 commits into from

Conversation

sunny868
Copy link
Contributor

@sunny868 sunny868 commented Feb 3, 2023

Hi all,
When -Xcomp be used, java thread to block for longer, then causing StructuredTaskScopeTest.java failed frequently on the AArch64 and LoongArch64 architecture.

This PR fix the issue, Please help review it.

Thanks.


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-8301736: jdk/incubator/concurrent/StructuredTaskScope/StructuredTaskScopeTest.java fail with -Xcomp

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 12398

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 3, 2023

👋 Welcome back sunny868! 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 Feb 3, 2023
@openjdk
Copy link

openjdk bot commented Feb 3, 2023

@sunny868 To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an "RFR" email sent to the correct mailing list, you will need to add one or more applicable labels manually using the /label pull request command.

Applicable Labels
  • build
  • client
  • compiler
  • core-libs
  • hotspot
  • hotspot-compiler
  • hotspot-gc
  • hotspot-jfr
  • hotspot-runtime
  • i18n
  • ide-support
  • javadoc
  • jdk
  • jmx
  • kulla
  • net
  • nio
  • security
  • serviceability
  • shenandoah

@@ -614,7 +614,7 @@ public void testJoinUntil4(ThreadFactory factory) throws Exception {
public void testInterruptJoinUntil1(ThreadFactory factory) throws Exception {
try (var scope = new StructuredTaskScope(null, factory)) {
Future<String> future = scope.fork(() -> {
Thread.sleep(Duration.ofMillis(100));
Thread.sleep(Duration.ofMillis(1000));
Copy link
Contributor

@AlanBateman AlanBateman Feb 3, 2023

Choose a reason for hiding this comment

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

As a short term fix, this is okay, Duration.ofSeconds(2) might be a bit more robust. We are iterating on this API so there are test changes in the works, in this case we can change it to poll until the sub-task is parked before calling joinUntil with the interrupt status set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So do I change to Duration.ofSeconds(2) or cancel this PR?

Copy link
Contributor

@AlanBateman AlanBateman Feb 3, 2023

Choose a reason for hiding this comment

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

Go ahead with the change as this testInterruptJoinUntil isn't robust (as you've found with the -Xcomp runs). When we refresh the test we'll replace this part so the subtask does not complete before testing joinUntil with the interrupt status set.

@AlanBateman
Copy link
Contributor

/label add core-libs

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Feb 3, 2023
@openjdk
Copy link

openjdk bot commented Feb 3, 2023

@AlanBateman
The core-libs label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Feb 3, 2023

Webrevs

@openjdk
Copy link

openjdk bot commented Feb 3, 2023

⚠️ @sunny868 the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout 8301736
$ git commit --author='Preferred Full Name <you@example.com>' --allow-empty -m 'Update full name'
$ git push

@openjdk
Copy link

openjdk bot commented Feb 3, 2023

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

8301736: jdk/incubator/concurrent/StructuredTaskScope/StructuredTaskScopeTest.java fail with -Xcomp

Reviewed-by: alanb

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

  • cf68d9f: 8299155: C2: SubTypeCheckNode::verify() should not produce dependencies / oop pool entries
  • 11804b2: 8301050: Detect Xen Virtualization on Linux aarch64
  • b504c94: 8300235: Use VarHandle access in Image(Input | Output)StreamImpl classes
  • 406021a: 8300929: Avoid unnecessary array fill after creation in java.awt.image
  • 7f313b0: 8180266: Convert sun/security/provider/KeyStore/DKSTest.sh to Java Jtreg Test
  • 3ad6aef: 8301313: RISC-V: C2: assert(false) failed: bad AD file due to missing match rule

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.

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 (@AlanBateman) 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 Feb 3, 2023
@sunny868
Copy link
Contributor Author

sunny868 commented Feb 3, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Feb 3, 2023
@openjdk
Copy link

openjdk bot commented Feb 3, 2023

@sunny868
Your change (at version c448c97) is now ready to be sponsored by a Committer.

@sunny868
Copy link
Contributor Author

sunny868 commented Feb 7, 2023

@DamonFool Could you please sponsor it for me?

@AlanBateman
Copy link
Contributor

AlanBateman commented Feb 7, 2023

@DamonFool Could you please sponsor it for me?

Note that the problematic sleep in the joinXXX tests will be replaced if PR 12426 is integrated. It's okay if your change goes first of course, it's just that I hope to replace these sleeps to make the tests more robust.

@DamonFool
Copy link
Member

It's okay if your change goes first of course, it's just that I hope to replace these sleeps to make the tests more robust.

So just sponsor it.
/sponsor

@openjdk
Copy link

openjdk bot commented Feb 7, 2023

Going to push as commit 1aaf394.
Since your change was applied there have been 46 commits pushed to the master branch:

  • 9dad874: 8298413: [s390] CPUInfoTest fails due to uppercase feature string
  • 98433a2: 8296999: AArch64: scalar intrinsics for reverse method in Integer and Long
  • c04a982: 8301818: RISC-V: Factor out function mvw from MacroAssembler
  • 787e16b: 8289077: Add manual tests to open
  • 07fb4f9: 7167356: (javac) investigate failing tests in JavacParserTest
  • 3ac2bed: 8299324: inline_native_setCurrentThread lacks GC barrier for Shenandoah
  • d53ade1: 8301813: Bad caret position in error message
  • 8c01b6e: 8221580: Confusing diagnostic for assigning a static final field in a constructor
  • c129ce4: 8300259: Add test coverage for processing of pending block files in signed JARs
  • b569742: 8301788: AlgorithmId should keep lowercase characters from 3rd party providers
  • ... and 36 more: https://git.openjdk.org/jdk/compare/4c9de876bffe5abb94db1c8c2b919d8243317ff8...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Feb 7, 2023
@openjdk openjdk bot closed this Feb 7, 2023
@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 Feb 7, 2023
@openjdk
Copy link

openjdk bot commented Feb 7, 2023

@DamonFool @sunny868 Pushed as commit 1aaf394.

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

@sunny868
Copy link
Contributor Author

sunny868 commented Feb 7, 2023

It's okay if your change goes first of course, it's just that I hope to replace these sleeps to make the tests more robust.

So just sponsor it. /sponsor

Thank you

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

Successfully merging this pull request may close these issues.

3 participants