Skip to content

8371948: TestStackOverflowDuringInit.java fails xss too small on linux-aarch64#28352

Closed
sendaoYan wants to merge 9 commits intoopenjdk:masterfrom
sendaoYan:jbs8371948
Closed

8371948: TestStackOverflowDuringInit.java fails xss too small on linux-aarch64#28352
sendaoYan wants to merge 9 commits intoopenjdk:masterfrom
sendaoYan:jbs8371948

Conversation

@sendaoYan
Copy link
Member

@sendaoYan sendaoYan commented Nov 17, 2025

Hi all,

On linux-aarch64, when page size is 64K, the minimal java thread stack size is 448K. So this PR increase the minimal java thread stack size in test/hotspot/jtreg/runtime/ClassInitErrors/TestStackOverflowDuringInit.java. Below is the calculation formula for the minimal java thread stack size:

page_size = 64K
_java_thread_min_stack_allowed = 72K
_stack_red_zone_size = align_up(StackRedPages * unit, page_size) = align_up(1*4K, 64K) = 64K
_stack_yellow_zone_size = align_up(StackYellowPages * unit, page_size) = align_up(2*4K, 64K) = 64K
_stack_reserved_zone_size = align_up(StackReservedPages * unit, page_size) = align_up(1*4K, 64K) = 64K
_stack_shadow_zone_size = align_up(StackShadowPages * unit, page_size) = align_up(25*4K, 64K) = 128K
_java_thread_min_stack_allowed = align_up(72K+64K+64K+64K+128K, 64K) = 448K

This PR add whitebox API getMinimumJavaStackSize() to the the allowd minimum java stack size, and get the allowed minimum java stack size in test/hotspot/jtreg/runtime/ClassInitErrors/TestStackOverflowDuringInit.java

Change has been verified locally both on linux-x64 and 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-8371948: TestStackOverflowDuringInit.java fails xss too small on linux-aarch64 (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28352

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 17, 2025

👋 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 Nov 17, 2025

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

8371948: TestStackOverflowDuringInit.java fails xss too small on linux-aarch64

Reviewed-by: dholmes, aph

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 166 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 added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Nov 17, 2025
@openjdk
Copy link

openjdk bot commented Nov 17, 2025

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

  • hotspot-runtime

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 rfr Pull request is ready for review label Nov 17, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 17, 2025

Webrevs

@dholmes-ora
Copy link
Member

A more resilient change would be to add a WhiteBox API to obtain the minimum stack for the actual platform in use, and then exec the VM with that as an -Xss value. Is that something you can do?

@sendaoYan
Copy link
Member Author

sendaoYan commented Nov 18, 2025

A more resilient change would be to add a WhiteBox API to obtain the minimum stack for the actual platform in use, and then exec the VM with that as an -Xss value. Is that something you can do?

Okey, Thanks for the suggestion, I will try this in this PR later.

@sendaoYan sendaoYan marked this pull request as draft November 18, 2025 03:12
@openjdk openjdk bot removed the rfr Pull request is ready for review label Nov 18, 2025
@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Dec 9, 2025
@openjdk
Copy link

openjdk bot commented Dec 9, 2025

@sendaoYan hotspot has been added to this pull request based on files touched in new commit(s).

@sendaoYan sendaoYan marked this pull request as ready for review December 9, 2025 14:59
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 9, 2025
Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Looking good. Just a couple of minor issues.

Thanks

Copy link
Member

@dholmes-ora dholmes-ora 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. Thanks

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 11, 2025
@sendaoYan
Copy link
Member Author

Looking for second reviewer since touch the hotspot files.

@sendaoYan
Copy link
Member Author

Thanks for the suggestions and reviews @dholmes-ora @theRealAph

/integrate

@openjdk
Copy link

openjdk bot commented Dec 19, 2025

Going to push as commit 360777c.
Since your change was applied there have been 183 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 Dec 19, 2025
@openjdk openjdk bot closed this Dec 19, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 19, 2025
@openjdk
Copy link

openjdk bot commented Dec 19, 2025

@sendaoYan Pushed as commit 360777c.

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

@sendaoYan sendaoYan deleted the jbs8371948 branch December 19, 2025 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Development

Successfully merging this pull request may close these issues.

3 participants