Skip to content

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

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)

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

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants