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

JDK-8317804: com/sun/jdi/JdwpAllowTest.java fails on Alpine 3.17 / 3.18 #17334

Closed
wants to merge 1 commit into from

Conversation

alexmenkov
Copy link

@alexmenkov alexmenkov commented Jan 10, 2024

The change fixes workaround introduced by [JDK-8250630].
The root cause of the test failure was identified by JDK-8250630:
On Apline Linux getaddrinfo function returns 2 entries for "any" address - mapped IPv4 (::ffff:0.0.0.0) and IPv6 (::) and IPv4 is returned first.
When JDWP agent listens on mapped IPv4, it accepts only connections from IPv4 addresses, connections from IPv6 addresses fail with "connection refused" error.
Fix for JDK-8250630 introduced workaround for the case - if we get ::ffff:0.0.0.0 (mappedAny) and :: (in6addr_any) is also returned by getaddrinfo, agent uses in6addr_any for listening.

But the fix had a typo - the loop goes through returned addresses (ai variable), but checks if listenAddr equals in6addr_any. This is always false (because listenAddr equals mappedAny), so the workaround does not work.

Submitter confirmed that the fix resolves the issue.

Testing: tier1, all JDI-related tests (test/hotspot/jtreg/vmTestbase/nsk/jdwp, test/hotspot/jtreg/vmTestbase/nsk/jdi, test/hotspot/jtreg/vmTestbase/nsk/jdb, test/jdk/com/sun/jdi)


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-8317804: com/sun/jdi/JdwpAllowTest.java fails on Alpine 3.17 / 3.18 (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17334

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 10, 2024

👋 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 openjdk bot added the rfr Pull request is ready for review label Jan 10, 2024
@openjdk
Copy link

openjdk bot commented Jan 10, 2024

@alexmenkov 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 Jan 10, 2024
@mlbridge
Copy link

mlbridge bot commented Jan 10, 2024

Webrevs

@plummercj
Copy link
Contributor

There's no explanation here of the root cause and how the fix solves it, and the CR has too much discussion to wade through.

@alexmenkov
Copy link
Author

There's no explanation here of the root cause and how the fix solves it, and the CR has too much discussion to wade through.

Sorry, my fault. Without explanation the fix may look not as simple as it is.
It's a typo in the code - need to take a closer look at the cycle.
I added more details to the description.

Copy link
Contributor

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

@openjdk
Copy link

openjdk bot commented Jan 10, 2024

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

8317804: com/sun/jdi/JdwpAllowTest.java fails on Alpine 3.17 / 3.18

Reviewed-by: cjplummer, mbaesken

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

  • 8569227: 8322589: Add Ideal transformation: (~a) & (~b) => ~(a | b)
  • f4ca41a: 8322816: RISC-V: Incorrect guarantee in patch_vtype
  • 376051a: 8320919: Clarify Locale related system properties
  • a5071e0: 8322817: RISC-V: Eliminate -Wparentheses warnings in riscv code
  • 28d8149: 8323115: x86-32: Incorrect predicates for cmov instruct transforms with UseSSE
  • e9f7db3: 8322880: Eliminate -Wparentheses warnings in arm32 code
  • aba1933: 8323210: Update the usage of cmsFLAGS_COPY_ALPHA
  • f3be138: 8322809: SystemModulesMap::classNames and moduleNames arrays do not match the order

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 Jan 10, 2024
@alexmenkov
Copy link
Author

/integrate

@openjdk
Copy link

openjdk bot commented Jan 11, 2024

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

  • e70cb4e: 8322565: (zipfs) Files.setPosixPermissions should preserve 'external file attributes' bits
  • d89602a: 8322982: CTW fails to build after 8308753
  • 3bd9042: 8320788: The system properties page is missing some properties
  • 525063b: 8322878: Including sealing information Class.toGenericString()
  • c1282b5: 8323540: assert((!((((method)->is_trace_flag_set(((1 << 4) << 8))))))) failed: invariant
  • 5ba69e1: 8322477: order of subclasses in the permits clause can differ between compilations
  • c96cbe4: 8313083: Print 'rss' and 'cache' as part of the container information
  • a7db4fe: 8323428: Shenandoah: Unused memory in regions compacted during a full GC should be mangled
  • b86c3b7: 8309218: java/util/concurrent/locks/Lock/OOMEInAQS.java still times out with ZGC, Generational ZGC, and SerialGC
  • 475306b: 7057369: (fs spec) FileStore getUsableSpace and getUnallocatedSpace could be clearer
  • ... and 22 more: https://git.openjdk.org/jdk/compare/bc05893f820ff8158897f84b9d2fdaed2cd1661b...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 11, 2024

@alexmenkov Pushed as commit b530c02.

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

@alexmenkov alexmenkov deleted the jdwp_alpine branch January 11, 2024 00:37
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.

3 participants