Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk18 Public archive

8132785: java/lang/management/ThreadMXBean/ThreadLists.java fails intermittently #14

Closed
wants to merge 2 commits into from

Conversation

dholmes-ora
Copy link
Member

@dholmes-ora dholmes-ora commented Dec 13, 2021

Investigation showed this test was experiencing interference from threads created by other tests in agentvm mode. The simple solution is to run this test isolated using othervm mode. Also added some diagnostics to the test incase we see future failures.

Testing: local and tier3.

Thanks,
David


Progress

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

Issue

  • JDK-8132785: java/lang/management/ThreadMXBean/ThreadLists.java fails intermittently

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 13, 2021

👋 Welcome back dholmes! 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 Dec 13, 2021

@dholmes-ora The following labels will be automatically applied to this pull request:

  • core-libs
  • serviceability

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 serviceability serviceability-dev@openjdk.java.net core-libs core-libs-dev@openjdk.java.net labels Dec 13, 2021
@dholmes-ora dholmes-ora marked this pull request as ready for review December 13, 2021 04:26
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 13, 2021
@mlbridge
Copy link

mlbridge bot commented Dec 13, 2021

Webrevs

@AlanBateman
Copy link

/label remove core-libs

@openjdk
Copy link

openjdk bot commented Dec 13, 2021

@dholmes-ora 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:

8132785: java/lang/management/ThreadMXBean/ThreadLists.java fails intermittently

Reviewed-by: alanb, kevinw, dcubed, sspitsyn

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 ready Pull request is ready to be integrated and removed core-libs core-libs-dev@openjdk.java.net labels Dec 13, 2021
@openjdk
Copy link

openjdk bot commented Dec 13, 2021

@AlanBateman
The core-libs label was successfully removed.

Copy link
Contributor

@kevinjwalls kevinjwalls left a comment

Choose a reason for hiding this comment

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

Yes, othervm and printing the threads from both points of view looks good. 8-)

Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Choose a reason for hiding this comment

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

Thumbs up.
Thanks for including a comment about why othervm is needed.

Copy link

@sspitsyn sspitsyn 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.
Thanks,
Serguei

@dholmes-ora
Copy link
Member Author

Thanks for all the reviews!

/integrate

@openjdk
Copy link

openjdk bot commented Dec 13, 2021

Going to push as commit c93b24d.

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

openjdk bot commented Dec 13, 2021

@dholmes-ora Pushed as commit c93b24d.

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

@dholmes-ora dholmes-ora deleted the 8132785 branch December 13, 2021 21:40
e1iu pushed a commit to e1iu/jdk18 that referenced this pull request Dec 20, 2021
…test fail

This bug appears intermittently and it's caused by vmaskAll_immI[1]
when the vector mask size is smaller than max predicate size of running
machine. It generates an all-true predicate without considering those
inactive bits. That may result in the wrong result of VectorMask.toLong.
The problematic code is as below:

```
        ShortVector.SPECIES_64.MaskAll(true).toLong()

assembly:

        ptrue   p0.h          <= MaskAll(true)
        mov     z16.h, p0/z, openjdk#1
        mov     z17.h, #0
        uzp1    z16.b, z16.b, z17.b
        fmov    x10, d16
        orr     x10, x10, x10, lsr openjdk#7
        orr     x10, x10, x10, lsr openjdk#14
        orr     x10, x10, x10, lsr openjdk#28
        and     x10, x10, #0xff

(gdb) p/x $p0 # on an SVE machine with vector length as 64 in bytes
$1 = {0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55}

Expected:
(gdb) p/x $p0
$1 = {0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}

```

Considering MaskAll is used in VectorMask.fromLong() only for a special
case and relies on the mechanism of inline and intrinsification, even it
could be optimized out, this patch also adds test cases for MaskAll to
reproduce this issue stably.

Also fix a small issue on register utilization for
sve_reduce_[max|min][D|F].

[1] https://github.com/openjdk/jdk18/blob/master/src/hotspot/cpu/aarch64/aarch64_sve.ad#L416

hotspot/compiler/vectorapi, jdk/incubator/vector passed on SVE enabled
system.

[INTERNAL ONLY]

hotspot/compiler/vectorapi, jdk/incubator/vector passed on a64fx.

TEST_LABEL: ent-arch-aarch64 && ent-conformance-enabled && ent-os-ubuntu
JDK_SCOPE: test/jdk/jdk/incubator/vector, test/hotspot/jtreg/compiler/vectorapi

Jira: ENTLLT-4502
CustomizedGitHooks: yes
Change-Id: I401650c1cc32d730603a185d5ebf7bb263a4b539
e1iu pushed a commit to e1iu/jdk18 that referenced this pull request Dec 20, 2021
…test fail

This bug appears intermittently and it's caused by vmaskAll_immI[1]
when the vector mask size is smaller than max predicate size of running
machine. It generates an all-true predicate without considering those
inactive bits. That may result in the wrong result of VectorMask.toLong.
The problematic code is as below:

```
        ShortVector.SPECIES_64.MaskAll(true).toLong()

assembly:

        ptrue   p0.h          <= MaskAll(true)
        mov     z16.h, p0/z, openjdk#1
        mov     z17.h, #0
        uzp1    z16.b, z16.b, z17.b
        fmov    x10, d16
        orr     x10, x10, x10, lsr openjdk#7
        orr     x10, x10, x10, lsr openjdk#14
        orr     x10, x10, x10, lsr openjdk#28
        and     x10, x10, #0xff

(gdb) p/x $p0 # on an SVE machine with vector length as 64 in bytes
$1 = {0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55}

Expected:
(gdb) p/x $p0
$1 = {0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}

```

Considering MaskAll is used in VectorMask.fromLong() only for a special
case and relies on the mechanism of inline and intrinsification, even it
could be optimized out, this patch also adds test cases for MaskAll to
reproduce this issue stably.

Also fix a small issue on register utilization for
sve_reduce_[max|min][D|F].

[1] https://github.com/openjdk/jdk18/blob/master/src/hotspot/cpu/aarch64/aarch64_sve.ad#L416

hotspot/compiler/vectorapi, jdk/incubator/vector passed on SVE enabled
system.

Change-Id: I9631f26f9232ffe7a28b74f14062d945c32fa1fb
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
integrated Pull request has been integrated serviceability serviceability-dev@openjdk.java.net
Development

Successfully merging this pull request may close these issues.

5 participants