Skip to content

Conversation

@dafedafe
Copy link
Contributor

@dafedafe dafedafe commented Jun 2, 2025

The test compiler/startup/StartupOutput.java starts 200 VMs in a loop , this can lead to resource shortages on some (Windows) machines.

There is no real need to run those VMs concurrently (their run is short and basically check that the VM doesn't crash giving limited code cache).

Running them sequentially should be OK and should avoid running out of memory.

Testing: Tier1-3+


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-8358129: compiler/startup/StartupOutput.java runs into out of memory on Windows after JDK-8347406 (Bug - P4)(⚠️ The fixVersion in this issue is [25] but the fixVersion in .jcheck/conf is 26, a new backport will be created when this pr is integrated.)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 25582

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 2, 2025

👋 Welcome back dfenacci! 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 Jun 2, 2025

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

8358129: compiler/startup/StartupOutput.java runs into out of memory on Windows after JDK-8347406

Reviewed-by: thartmann, epeter

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 176 new commits pushed to 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 changed the title JDK-8358129: compiler/startup/StartupOutput.java runs into out of memory on Windows after JDK-8347406 8358129: compiler/startup/StartupOutput.java runs into out of memory on Windows after JDK-8347406 Jun 2, 2025
@openjdk
Copy link

openjdk bot commented Jun 2, 2025

@dafedafe The following label will be automatically applied to this pull request:

  • hotspot-compiler

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 hotspot-compiler hotspot-compiler-dev@openjdk.org label Jun 2, 2025
@dafedafe dafedafe marked this pull request as ready for review June 2, 2025 15:09
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 2, 2025
@mlbridge
Copy link

mlbridge bot commented Jun 2, 2025

Webrevs

Copy link
Contributor

@galderz galderz left a comment

Choose a reason for hiding this comment

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

What impact has this change in the time the test takes to run? If it turns out to be too slow, maybe the processes could be run batches?

@ArnoZeller
Copy link
Contributor

What impact has this change in the time the test takes to run? If it turns out to be too slow, maybe the processes could be run batches?

I checked on one of our windows Machines - the test did run in 11 seconds before and took 48 seconds after this change. Looks fine for me.

Copy link
Member

@TobiHartmann TobiHartmann 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 to me.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 3, 2025
@dafedafe
Copy link
Contributor Author

dafedafe commented Jun 3, 2025

What impact has this change in the time the test takes to run? If it turns out to be too slow, maybe the processes could be run batches?

I checked on one of our windows Machines - the test did run in 11 seconds before and took 48 seconds after this change.

I quickly checked on our machines (few different architectures) and it went from a range between 2 and 10 seconds to a range between 6 and 23 seconds.

out = new OutputAnalyzer(pr[i]);
// The VM should not crash but will probably fail with a "CodeCache is full. Compiler has been disabled." message
out.stdoutShouldNotContain("# A fatal error");
out = new OutputAnalyzer(pb.start());
Copy link
Member

@sendaoYan sendaoYan Jun 3, 2025

Choose a reason for hiding this comment

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

Since we start VMs from concurrently to serially, do we need start VMs 200 times anymore, maybe 20 times or 5 times is enough, or even just 1 time is enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The goal is actually to test the VM startup with different (randomised) code cache sizes. So, I'm not sure that there is another way to do that other than starting a new VM every time. We could definitely try with a lower number but, as the whole test takes just a few seconds to run, I don't think it would make a big difference.

Copy link
Contributor

@eme64 eme64 left a comment

Choose a reason for hiding this comment

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

@dafedafe Thanks for looking into this, looks reasonable 😊

@dafedafe
Copy link
Contributor Author

@TobiHartmann @eme64 thanks for your reviews!

@dafedafe
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 16, 2025

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

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jun 16, 2025

@dafedafe Pushed as commit 534a860.

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

@dafedafe
Copy link
Contributor Author

/backport :jdk25

@openjdk
Copy link

openjdk bot commented Jun 16, 2025

@dafedafe the backport was successfully created on the branch backport-dafedafe-534a8605-jdk25 in my personal fork of openjdk/jdk. To create a pull request with this backport targeting openjdk/jdk:jdk25, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 534a8605 from the openjdk/jdk repository.

The commit being backported was authored by Damon Fenacci on 16 Jun 2025 and was reviewed by Tobias Hartmann and Emanuel Peter.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk:

$ git fetch https://github.com/openjdk-bots/jdk.git backport-dafedafe-534a8605-jdk25:backport-dafedafe-534a8605-jdk25
$ git checkout backport-dafedafe-534a8605-jdk25
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk.git backport-dafedafe-534a8605-jdk25

⚠️ @dafedafe You are not yet a collaborator in my fork openjdk-bots/jdk. An invite will be sent out and you need to accept it before you can proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

6 participants