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

8265683: vmTestbase/nsk/jdb tests failed with "JDWP exit error AGENT_ERROR_INTERNAL(181)" #3634

Closed
wants to merge 2 commits into from

Conversation

plummercj
Copy link
Contributor

@plummercj plummercj commented Apr 22, 2021

This bug was introduced by my recent changes for JDK-8265028, which attempted to speed up ThreadNode lookups by not looking in the runningThreads list if the TLS lookup failed. At the time it was thought that the thread could not possibly be on the list, but it turns out sometimes it can.

For now I'm just doing a quick fix to replace the assert being triggered with a lookup instead, which is pretty much how it worked before JDK-8265028. However, I eventually want to get back to not having to do the lookup, but first I need to better understand why this is happening in the first place, and the tests are failing too often to wait for that, thus the quick fix.


Progress

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

Issue

  • JDK-8265683: vmTestbase/nsk/jdb tests failed with "JDWP exit error AGENT_ERROR_INTERNAL(181)"

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3634

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 22, 2021

👋 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
Copy link

openjdk bot commented Apr 22, 2021

@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 Apr 22, 2021
@plummercj plummercj changed the title 8261702: vmTestbase/nsk/jdb tests failed with "JDWP exit error AGENT_ERROR_INTERNAL(181)" 8265683: vmTestbase/nsk/jdb tests failed with "JDWP exit error AGENT_ERROR_INTERNAL(181)" Apr 22, 2021
@plummercj
Copy link
Contributor Author

plummercj commented Apr 22, 2021

/issue JDK-8265683

@openjdk
Copy link

openjdk bot commented Apr 22, 2021

@plummercj This issue is referenced in the PR title - it will now be updated.

@plummercj plummercj marked this pull request as ready for review Apr 22, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 22, 2021
@mlbridge
Copy link

mlbridge bot commented Apr 22, 2021

Webrevs

@openjdk
Copy link

openjdk bot commented Apr 22, 2021

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

8265683: vmTestbase/nsk/jdb tests failed with "JDWP exit error AGENT_ERROR_INTERNAL(181)"

Reviewed-by: amenkov, dcubed

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

  • 7a55914: 8264196: Change link_and_cleanup_shared_classes(CATCH) to CHECK
  • b84f690: 8265793: Remove duplicate jtreg TEST.groups references for some client tests
  • 0e00598: 8265782: Bump bootjdk to jdk-17+19 on macosx-aarch64 at Oracle
  • e81baea: 8265786: ProblemList serviceability/sa/sadebugd/DisableRegistryTest.java on ZGC
  • ca0de26: 8265699: (bf) Scopes passed to ScopedMemoryAccess.copy[Swap]Memory in incorrect order
  • b930bb1: 8265461: G1: Forwarding pointer removal thread sizing
  • f834557: 8258915: Temporary buffer cleanup
  • 31d8a19: 8265105: gc/arguments/TestSelectDefaultGC.java fails when compiler1 is disabled
  • 657f103: 8057543: Replace javac's Filter with Predicate (and lambdas)
  • 8758b55: 8265591: Remove vestiages of intermediate JSR 175 annotation format
  • ... and 2 more: https://git.openjdk.java.net/jdk/compare/9499175064a8073f37a63a2696fb47f26ae89865...master

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 Apr 22, 2021
Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Thumbs up for the quick and dirty fix.

Do you plan to another bug to continue your investigation?

* Search runningThreads list. The TLS lookup may have failed because the
* thread has terminated, but the ThreadNode may still be present.
*/
if ( node == NULL ) {
Copy link
Member

@dcubed-ojdk dcubed-ojdk Apr 22, 2021

Choose a reason for hiding this comment

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

nit - s/( /(/ and s/ )/)/

Copy link
Contributor Author

@plummercj plummercj Apr 22, 2021

Choose a reason for hiding this comment

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

The extra spaces are intentional to remain consistent with the surrounding code.

* thread has terminated, but the ThreadNode may still be present.
*/
if ( node == NULL ) {
if (list == NULL || list == &runningThreads ) {
Copy link
Member

@dcubed-ojdk dcubed-ojdk Apr 22, 2021

Choose a reason for hiding this comment

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

nit - s/ )/)/

Copy link
Member

@dcubed-ojdk dcubed-ojdk Apr 22, 2021

Choose a reason for hiding this comment

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

In that case, this one is inconsistent.

Copy link
Contributor Author

@plummercj plummercj Apr 22, 2021

Choose a reason for hiding this comment

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

Ok. Fixed.

@plummercj
Copy link
Contributor Author

plummercj commented Apr 22, 2021

Do you plan to another bug to continue your investigation?

Yes. The search of runningThreads becomes a performance issue in Loom when the list could have a million items.

* thread has terminated, but the ThreadNode may still be present.
*/
if ( node == NULL ) {
if (list == NULL || list == &runningThreads ) {
Copy link
Member

@dcubed-ojdk dcubed-ojdk Apr 22, 2021

Choose a reason for hiding this comment

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

In that case, this one is inconsistent.

@plummercj
Copy link
Contributor Author

plummercj commented Apr 22, 2021

/integrate

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

openjdk bot commented Apr 22, 2021

@plummercj Since your change was applied there have been 12 commits pushed to the master branch:

  • 7a55914: 8264196: Change link_and_cleanup_shared_classes(CATCH) to CHECK
  • b84f690: 8265793: Remove duplicate jtreg TEST.groups references for some client tests
  • 0e00598: 8265782: Bump bootjdk to jdk-17+19 on macosx-aarch64 at Oracle
  • e81baea: 8265786: ProblemList serviceability/sa/sadebugd/DisableRegistryTest.java on ZGC
  • ca0de26: 8265699: (bf) Scopes passed to ScopedMemoryAccess.copy[Swap]Memory in incorrect order
  • b930bb1: 8265461: G1: Forwarding pointer removal thread sizing
  • f834557: 8258915: Temporary buffer cleanup
  • 31d8a19: 8265105: gc/arguments/TestSelectDefaultGC.java fails when compiler1 is disabled
  • 657f103: 8057543: Replace javac's Filter with Predicate (and lambdas)
  • 8758b55: 8265591: Remove vestiages of intermediate JSR 175 annotation format
  • ... and 2 more: https://git.openjdk.java.net/jdk/compare/9499175064a8073f37a63a2696fb47f26ae89865...master

Your commit was automatically rebased without conflicts.

Pushed as commit a8ddbd1.

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

@plummercj plummercj deleted the 8265683_tls_fix branch Dec 13, 2021
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
3 participants