Skip to content

8361751: Test sun/tools/jcmd/TestJcmdSanity.java timed out on Windows#26358

Closed
alexmenkov wants to merge 1 commit intoopenjdk:masterfrom
alexmenkov:jcmd_sanity
Closed

8361751: Test sun/tools/jcmd/TestJcmdSanity.java timed out on Windows#26358
alexmenkov wants to merge 1 commit intoopenjdk:masterfrom
alexmenkov:jcmd_sanity

Conversation

@alexmenkov
Copy link
Copy Markdown

@alexmenkov alexmenkov commented Jul 16, 2025

Tests which run serviceability tools to attach to the main test process can get deadlock with streaming output (see #24672 )
The fix disables attach streaming output for tests in jdk/sun/tools/jcmd

Testing: tier6, tier7


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-8361751: Test sun/tools/jcmd/TestJcmdSanity.java timed out on Windows (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26358

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@alexmenkov
Copy link
Copy Markdown
Author

/label add serviceability

@alexmenkov alexmenkov changed the title fix 8361751 Jul 16, 2025
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Jul 16, 2025

👋 Welcome back amenkov! 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
Copy Markdown

openjdk bot commented Jul 16, 2025

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

8361751: Test sun/tools/jcmd/TestJcmdSanity.java timed out on Windows

Reviewed-by: cjplummer, dholmes, 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 51 new commits pushed to 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 changed the title 8361751 8361751: Test sun/tools/jcmd/TestJcmdSanity.java timed out on Windows Jul 16, 2025
@openjdk openjdk bot added rfr Pull request is ready for review serviceability serviceability-dev@openjdk.org labels Jul 16, 2025
@openjdk
Copy link
Copy Markdown

openjdk bot commented Jul 16, 2025

@alexmenkov
The serviceability label was successfully added.

@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Jul 16, 2025

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 16, 2025
Copy link
Copy Markdown
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.

Okay, but are there other tests we have missed here?

I'm wondering what the value of "streaming output" is when it can lead to deadlocks? Is this just a test problem?

Thanks

@alexmenkov
Copy link
Copy Markdown
Author

Okay, but are there other tests we have missed here?

I'd say this tests was missed in https://bugs.openjdk.org/browse/JDK-8354461 fix.

I'm wondering what the value of "streaming output" is when it can lead to deadlocks? Is this just a test problem?

"Streaming output" means attach operation output is not buffered, but is sent to the client while the handler produce it.
It's useful in real cases, when user runs jcmd or other tool against external target VM (see https://bugs.openjdk.org/browse/JDK-8319055 and related issues).
In tests we often use scenarios when test attaches to itself or like in this case use attach tool to attach to the test process.
And we can get deadlock because producer (operation handler, often executed in safepoint) and consumer (test reads redirected output of the tool) are executed in the same process. It's just test problem (to reproduce real scenario tests should run target VM as a separate process)

@alexmenkov
Copy link
Copy Markdown
Author

/integrate

@openjdk
Copy link
Copy Markdown

openjdk bot commented Jul 18, 2025

Going to push as commit a3843e8.
Since your change was applied there have been 56 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 Jul 18, 2025
@openjdk openjdk bot closed this Jul 18, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jul 18, 2025
@openjdk
Copy link
Copy Markdown

openjdk bot commented Jul 18, 2025

@alexmenkov Pushed as commit a3843e8.

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

@alexmenkov alexmenkov deleted the jcmd_sanity branch July 18, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

4 participants