RFR: 8324781: runtime/Thread/TestAlwaysPreTouchStacks.java failed with Expected a higher ratio between stack committed and reserved

David Holmes dholmes at openjdk.org
Thu Mar 21 05:19:21 UTC 2024


On Thu, 21 Mar 2024 02:49:48 GMT, Liming Liu <duke at openjdk.org> wrote:

> 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.

src/hotspot/os/linux/os_linux.cpp line 4852:

> 4850:     // See https://github.com/oracle/linux-uek/issues/23
> 4851:     const int flag = MADV_POPULATE_WRITE + (os::Linux::_is_uek_release ? 1 : 0);
> 4852:     FLAG_SET_DEFAULT(UseMadvPopulateWrite, (::madvise(0, 0, flag) == 0));

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. ??

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18417#discussion_r1533259861


More information about the hotspot-runtime-dev mailing list