-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Conversation
👋 Welcome back amenkov! A progress list of the required criteria for merging this PR into |
@alexmenkov The following label will be automatically applied to this pull request:
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. |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@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:
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
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
/integrate |
Going to push as commit b530c02.
Your commit was automatically rebased without conflicts. |
@alexmenkov Pushed as commit b530c02. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
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 usesin6addr_any
for listening.But the fix had a typo - the loop goes through returned addresses (
ai
variable), but checks iflistenAddr
equalsin6addr_any
. This is always false (becauselistenAddr
equalsmappedAny
), 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
Issue
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