Skip to content

Conversation

@kevinjwalls
Copy link
Contributor

@kevinjwalls kevinjwalls commented Sep 13, 2024

JDP tests only make 3 attempts to find a free port, using getFreePort().
We know getFreePort() is racy and you need to make sure the port really is fee when trying to use it.

Make 10 attempts. Leave the logic unchanged. Also fix a typo in another test.


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-8310525: DynamicLauncher for JDP test needs to try harder to find a free port (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 20991

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 13, 2024

👋 Welcome back kevinw! 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 Sep 13, 2024

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

8310525: DynamicLauncher for JDP test needs to try harder to find a free port

Reviewed-by: lmesnik, cjplummer

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

  • 996790c: 8339954: Print JVMCI names with the Compiler.{perfmap,codelist,CodeHeap_Analytics} diagnostic commands
  • e1ebeef: 8340131: Refactor internal makeHiddenClassDefiner to take option mask instead of Set
  • 05b9d47: 8340194: Replace usage of -ms with -Xms in LauncherCommon.gmk make file
  • 5459518: 8339627: Cleanup Unsafe.setMemory intrinsic code
  • a4eb9a0: 8339918: Remove checks for outdated -t -tm -Xfuture -checksource -cs -noasyncgc options from the launcher
  • 6be15c3: 8340012: [C2] assert(KlassEncodingMetaspaceMax > pd) failed: change encoding max if new encoding after 8338526
  • 4b79063: 8339842: Open source several AWT focus tests - series 2
  • dc00eb8: 8338912: CDS: Segmented roots array
  • 74add0e: 8340105: Expose BitMap::print_on in release builds
  • 0e0f10f: 8340102: Move assert-only loop in OopMapSort::sort under debug macro
  • ... and 44 more: https://git.openjdk.org/jdk/compare/0b3f2e64e83b589115989f9d14a6c644bc3008aa...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
Copy link

openjdk bot commented Sep 13, 2024

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

  • jmx
  • serviceability

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 serviceability serviceability-dev@openjdk.org jmx jmx-dev@openjdk.org labels Sep 13, 2024
@kevinjwalls kevinjwalls marked this pull request as ready for review September 13, 2024 09:51
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 13, 2024
@mlbridge
Copy link

mlbridge bot commented Sep 13, 2024

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 16, 2024
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.

Bumping the retry count from 3 to 10 seems a bit dubious. Do we really lose out on a race 3 times in a row? It seems like there might be something else going on. However, this change is harmless so I guess it's worth trying.

@kevinjwalls
Copy link
Contributor Author

Thanks Leonid and Chris,
Yes we really do see 3 attempts, on different port numbers, fail with java.net.BindException: Address already in use
Let's see if 10 is enough! 8-)

@kevinjwalls
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 16, 2024

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

  • 89759c8: 8321935: Define the term 'standard doclet'
  • 65b9aba: 8339769: Incorrect error message during startup if working directory does not exist
  • 1640bd2: 8340186: Shenandoah: Missing load_reference_barrier_phantom_narrow match in is_shenandoah_lrb_call
  • 996790c: 8339954: Print JVMCI names with the Compiler.{perfmap,codelist,CodeHeap_Analytics} diagnostic commands
  • e1ebeef: 8340131: Refactor internal makeHiddenClassDefiner to take option mask instead of Set
  • 05b9d47: 8340194: Replace usage of -ms with -Xms in LauncherCommon.gmk make file
  • 5459518: 8339627: Cleanup Unsafe.setMemory intrinsic code
  • a4eb9a0: 8339918: Remove checks for outdated -t -tm -Xfuture -checksource -cs -noasyncgc options from the launcher
  • 6be15c3: 8340012: [C2] assert(KlassEncodingMetaspaceMax > pd) failed: change encoding max if new encoding after 8338526
  • 4b79063: 8339842: Open source several AWT focus tests - series 2
  • ... and 47 more: https://git.openjdk.org/jdk/compare/0b3f2e64e83b589115989f9d14a6c644bc3008aa...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 16, 2024

@kevinjwalls Pushed as commit 59407fa.

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

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 jmx jmx-dev@openjdk.org serviceability serviceability-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants