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

8283717: vmTestbase/nsk/jdi/ThreadStartEvent/thread/thread001 failed due to SocketTimeoutException #8003

Closed
wants to merge 2 commits into from

Conversation

plummercj
Copy link
Contributor

@plummercj plummercj commented Mar 28, 2022

In this test the debuggee creates a couple of threads, and the debugger checks to make sure it gets a ThreadStartEvent for each of these threads, plus one for the main debuggee thread. Once it has done this, it disables the ThreadStartRequest and sends a "quit" command to the debuggee. However, another ThreadStartEvent can arrive after the expected 3, and this will cause all debuggee threads to be suspended (since the ThreadStartRequest uses the SUSPEND_ALL). If this happens the debuggee cannot even read "quit" message and terminate, so the debugger times out waiting. The solution is to simply to an unconditional vm.resume() after disabling ThreadStartRequest.

Note this bug was observed in loom due to the creation of carrier threads, but it could potentially happen in jdk also since the jvm creates numerous threads on startup, and they can potentially be delayed a bit.


Progress

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

Issue

  • JDK-8283717: vmTestbase/nsk/jdi/ThreadStartEvent/thread/thread001 failed due to SocketTimeoutException

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8003

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 28, 2022

👋 Welcome back cjplummer! 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 Mar 28, 2022
@openjdk
Copy link

openjdk bot commented Mar 28, 2022

@plummercj The following label will be automatically applied to this pull request:

  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the serviceability serviceability-dev@openjdk.org label Mar 28, 2022
@mlbridge
Copy link

mlbridge bot commented Mar 28, 2022

Webrevs

@openjdk
Copy link

openjdk bot commented Mar 28, 2022

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

8283717: vmTestbase/nsk/jdi/ThreadStartEvent/thread/thread001 failed due to SocketTimeoutException

Reviewed-by: lmesnik, amenkov, 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 5 new commits pushed to the master branch:

  • f01cce2: 8264160: Regex \b is not consistent with \w without UNICODE_CHARACTER_CLASS
  • 634800a: 8283806: [BACKOUT] JDK 19 L10n resource files update - msgdrop 10
  • 9b49900: 8283603: Remove redundant qualifier in Windows specific Attach Operation
  • d8fd222: 8282538: PKCS11 tests fail on CentOS Stream 9
  • d472c01: 8283711: Remove redundant 'new String' calls after concatenation

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 Mar 28, 2022
Copy link
Contributor

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

@plummercj
Copy link
Contributor Author

Thanks for the reviews!

@plummercj
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Mar 29, 2022

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

  • 9591306: 8283772: Make sun.net.dns.ResolverConfiguration sealed
  • 5359387: 8024624: [TEST_BUG] [macosx] CTRL+RIGHT(LEFT) doesn't move selection on next cell in JTable on Aqua L&F
  • f074775: 8281284: Write JSlider accessibility test
  • fe670ff: 8283692: Add PrintIdealPhase that includes block scheduling
  • ab17f88: 8283626: AArch64: Set relocInfo::offset_unit to 4
  • c3d903a: 8282936: Write a regression test for JDK-4615365
  • cc598e0: 8283774: TestZoneOffset::test_immutable should ignore ZoneOffset::rules
  • 0e788e0: 8283781: Avoid allocating unused lastRulesCaches
  • 043b0a7: 8273355: Flickering on tooltip appearance IntelliJ IDEA 2021.2.1
  • 2367228: 8283834: Unmappable character for US-ASCII encoding in TestPredicateInputBelowLoopPredicate
  • ... and 6 more: https://git.openjdk.java.net/jdk/compare/c0aecd15ae8d7abf37901f785fccaff2317c3b23...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 29, 2022

@plummercj Pushed as commit f9f439a.

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

@plummercj plummercj deleted the 8283717-thread001 branch October 11, 2022 18:51
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