Skip to content

8338630: Test java/nio/channels/DatagramChannel/SendReceiveMaxSize.java timeout #20658

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

Closed
wants to merge 3 commits into from

Conversation

sendaoYan
Copy link
Member

@sendaoYan sendaoYan commented Aug 21, 2024

Hi,
On linux test environments which has docker service, ifconfig shows that docker0 appears to be a virtual ethernet bridge which is created by the docker host. And the docker0 virtual ethernet bridge may cause test java/nio/channels/DatagramChannel/SendReceiveMaxSize.java bind docker0 ander network port.
I think we should just skip "docker0" interfaces when looking for an IPv4 address for tests.
Change has been verified, test fix only, the risk is low.

Additional testing

  • full jtreg test on linux x64
  • full jtreg test on linux aarch64

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-8338630: Test java/nio/channels/DatagramChannel/SendReceiveMaxSize.java timeout (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 20658

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 21, 2024

👋 Welcome back syan! 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 Aug 21, 2024

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

8338630: Test java/nio/channels/DatagramChannel/SendReceiveMaxSize.java timeout

Reviewed-by: dfuchs, jpai, djelinski

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

  • c89a1c3: 8338696: (fs) BasicFileAttributes.creationTime() falls back to epoch if birth time is unavailable (Linux)
  • 813546f: 8338856: [BACKOUT] JDK-8337828: CDS: Trim down minimum GC region alignment
  • 0b5c887: 8338380: Update TLSCommon/interop/AbstractServer to specify an interface to listen for connections
  • 6041c93: 8335664: Parsing jsr broken: assert(bci>= 0 && bci < c->method()->code_size()) failed: index out of bounds
  • 6cf7f9c: 8338662: Shenandoah: Remove excessive ShenandoahVerifier::verify_during_evacuation
  • 129f527: 8338290: Xcode project generator for hotspot
  • 6644dd3: 8338760: Adjust the comment after UseObjectMonitorTable
  • 1d05989: 8334357: Use NonInterleavingLogStream for report_metadata_oome
  • 47c8a6a: 8333265: De-duplicate method references in java.util.stream.FindOps
  • ab8071d: 8338146: Improve Exchanger performance with VirtualThreads
  • ... and 11 more: https://git.openjdk.org/jdk/compare/88ccbb60919e4523064b0da17184eedcd9efa087...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@djelinski, @dfuch, @jaikiran) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 21, 2024
@openjdk
Copy link

openjdk bot commented Aug 21, 2024

@sendaoYan The following labels will be automatically applied to this pull request:

  • core-libs
  • net

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

@openjdk openjdk bot added core-libs core-libs-dev@openjdk.org net net-dev@openjdk.org labels Aug 21, 2024
@mlbridge
Copy link

mlbridge bot commented Aug 21, 2024

Webrevs

@AlanBateman
Copy link
Contributor

AlanBateman commented Aug 21, 2024

/label remove core-libs
/label add nio

@openjdk openjdk bot removed the core-libs core-libs-dev@openjdk.org label Aug 21, 2024
@openjdk
Copy link

openjdk bot commented Aug 21, 2024

@AlanBateman
The core-libs label was successfully removed.

@openjdk openjdk bot added the nio nio-dev@openjdk.org label Aug 21, 2024
@openjdk
Copy link

openjdk bot commented Aug 21, 2024

@AlanBateman
The nio label was successfully added.

@sendaoYan
Copy link
Member Author

/label remove core-libs /label add nio

Thanks.

@sendaoYan
Copy link
Member Author

The GHA test runner report macos-aarch64 runtime/cds/DeterministicDump.java failure, I hava create a new jbs to record this issue. I think the failure is unrelated to this PR.

@dfuch
Copy link
Member

dfuch commented Aug 21, 2024

This looks good to me. Since I suggested the patch maybe someone else should officially approve?
@jaikiran or @djelinski maybe? See the JBS issue for more details.
The issue is that if you bind a DC to the address of the docker0 interface, the datagram sent from that address will appear as coming from another address on the receiver side. This skews the logic of DC tests which might just drop the datagram assuming it's some stray datagram coming from another process.
The proposed change is to just skip docker interfaces when looking for testable addresses. We already have a precedent for awdl and Teredo which we also skip.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 21, 2024
@jaikiran
Copy link
Member

Looks OK to me. Should we be adding that check even within the if (Platform.isOSX()) { a few lines above? I suspect even macos can have docker0 interface?

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Aug 21, 2024
@sendaoYan
Copy link
Member Author

Looks OK to me. Should we be adding that check even within the if (Platform.isOSX()) { a few lines above? I suspect even macos can have docker0 interface?

I am not sure macos can have docker0 interface or not, but add that check on macos will not harmful. The check has been added.

@dfuch
Copy link
Member

dfuch commented Aug 21, 2024

I'd rather avoid adding exceptions until it's proven necessary. I don't know if docker uses the same techniques on macOs and Linux to configure private networks between instances. But since it's unlikely that the name docker0 would be reused for something else then maybe we can keep this change.

@sendaoYan
Copy link
Member Author

sendaoYan commented Aug 22, 2024

I think the name docker0 will not reused for something else, so keep this change seems to be acceptable.

@sendaoYan sendaoYan requested a review from djelinski August 22, 2024 01:20
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 22, 2024
@sendaoYan
Copy link
Member Author

Thanks for the approved.

Copy link
Member

@jaikiran jaikiran left a comment

Choose a reason for hiding this comment

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

Hello @sendaoYan, this looks OK to me. Given that this is changing a test library class and not just a specific test, I'm guessing you have run at least tier1, tier2 (and perhaps even tier3) with these changes?

@sendaoYan
Copy link
Member Author

sendaoYan commented Aug 22, 2024

Hello @sendaoYan, this looks OK to me. Given that this is changing a test library class and not just a specific test, I'm guessing you have run at least tier1, tier2 (and perhaps even tier3) with these changes?

Thanks for your reminding, I will verify this changes by full jtreg tests on linux x64 and linux aarch64.

@sendaoYan
Copy link
Member Author

This PR has been verified by full jtreg tests(include tier1/tier2/tier3/tier4 etc.) on linux x64 and linux aarch64.
/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Aug 23, 2024
@openjdk
Copy link

openjdk bot commented Aug 23, 2024

@sendaoYan
Your change (at version d5c3f69) is now ready to be sponsored by a Committer.

@jaikiran
Copy link
Member

Thank you for running those tests. I ran tier1, tier2 and tier3 in our CI too with these changes and it looks fine. I'll go ahead and sponsor this now.

@jaikiran
Copy link
Member

jaikiran commented Aug 23, 2024

/sponsor

@openjdk
Copy link

openjdk bot commented Aug 23, 2024

@jaikiran Only the author (@sendaoYan) is allowed to issue the integrate command. As this pull request is ready to be sponsored, and you are an eligible sponsor, did you mean to issue the /sponsor command?

@jaikiran
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Aug 23, 2024

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

  • e06652a: 8338810: PPC, s390x: LightweightSynchronizer::exit asserts, missing lock
  • ea33709: 8328880: Events::log_exception should limit the size of the logging message
  • c89a1c3: 8338696: (fs) BasicFileAttributes.creationTime() falls back to epoch if birth time is unavailable (Linux)
  • 813546f: 8338856: [BACKOUT] JDK-8337828: CDS: Trim down minimum GC region alignment
  • 0b5c887: 8338380: Update TLSCommon/interop/AbstractServer to specify an interface to listen for connections
  • 6041c93: 8335664: Parsing jsr broken: assert(bci>= 0 && bci < c->method()->code_size()) failed: index out of bounds
  • 6cf7f9c: 8338662: Shenandoah: Remove excessive ShenandoahVerifier::verify_during_evacuation
  • 129f527: 8338290: Xcode project generator for hotspot
  • 6644dd3: 8338760: Adjust the comment after UseObjectMonitorTable
  • 1d05989: 8334357: Use NonInterleavingLogStream for report_metadata_oome
  • ... and 13 more: https://git.openjdk.org/jdk/compare/88ccbb60919e4523064b0da17184eedcd9efa087...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Aug 23, 2024

@jaikiran @sendaoYan Pushed as commit 8e0d019.

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

@sendaoYan sendaoYan deleted the jbs8338630 branch August 23, 2024 06:42
@sendaoYan
Copy link
Member Author

Thank you for running those tests. I ran tier1, tier2 and tier3 in our CI too with these changes and it looks fine. I'll go ahead and sponsor this now.

Thanks for the verified and sponsor.

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 net net-dev@openjdk.org nio nio-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

5 participants