-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8324781: runtime/Thread/TestAlwaysPreTouchStacks.java failed with Expected a higher ratio between stack committed and reserved #18417
Conversation
👋 Welcome back limingliu-ampere! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
/issue add 8325218 |
@limingliu-ampere |
@limingliu-ampere The following label will be automatically applied to this pull request:
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. |
7dbc1df
to
192855f
Compare
@limingliu-ampere Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
Webrevs
|
// See https://github.com/oracle/linux-uek/issues/23 | ||
const int flag = MADV_POPULATE_WRITE + (os::Linux::_is_uek_release ? 1 : 0); | ||
FLAG_SET_DEFAULT(UseMadvPopulateWrite, (::madvise(0, 0, flag) == 0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read the supporting material and I still can't get this sorted in my head. From my reading some UEK versions have this problem and some do not. But you do this "trick" for all UEK versions and I just don't understand how that works. ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I think it is safe to check 24 for all UEK versions:
- for versions prior to 5.15 UEK, 23 is supported as MADV_DONTEXEC, while 24 is not supported;
- for 5.15 (, 5.16 and 5.17 if existed) UEK, 23 is supported as MADV_POPULATE_WRITE, while 24 is supported as MADV_DOEXEC;
- for 5.18 UEK or newer, both 23 and 24 are supported as the same functions as upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what is the affect of using MADV_DOEXEC when the intent was to use MADV_POPULATE_WRITE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MADV_DOEXEC is not used in os::pd_pretouch_memory, but just used in os::init_2 for 5.15 UEK. The key is MADV_POPULATE_WRITE is supported as 23 on UEK releases if and only if 24 is supported. If the code is confusing, I will check whether the version of kernel is newer than 5.14 here rather than checking the support of 24.
/withdraw |
@limingliu-ampere Unknown command |
/help |
@limingliu-ampere Available commands:
|
Please reopen this, and just run the test with -XX:-UseMadvPopulateWrite. That should solve the problem for the test, no? The test's purpose is not to test Oracle Linux' inability to handle madvise flags correctly but to test -XX:+AlwaysPreTouchStacks. We can and should deal with the Oracle Linux problem independently (Note that I reported the problem to Oracle secalert back in March, and they promised a kernel fix). |
This is being dealt with in #18592, right? (Which I now see needs to be sponsored) |
The testcase failed on Oracle CI since JDK-8315923. The root cause is that Oracle CI runs Linux-5.4.17-UEK where the value of MADV_POPULATE_WRITE (23) is used as MADV_DONTEXEC which is not supported by upstream. This PR solves the testcase failure by checking the support of (MADV_POPULATE_WRITE_value + 1) for UEK releases.
Progress
Issues
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18417/head:pull/18417
$ git checkout pull/18417
Update a local copy of the PR:
$ git checkout pull/18417
$ git pull https://git.openjdk.org/jdk.git pull/18417/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 18417
View PR using the GUI difftool:
$ git pr show -t 18417
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18417.diff
Webrev
Link to Webrev Comment