RFR: 8285832: runtime/Thread/TooSmallStackSize.java failed "assert(k->is_initialized()) failed: need to increase java_thread_min_stack_allowed calculation"

David Holmes dholmes at openjdk.java.net
Sun May 1 11:39:36 UTC 2022


On Fri, 29 Apr 2022 17:35:57 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> The minimum stack size check for ThreadStackSize, CompilerStackSize and VMStackSize should also be done for windows. I moved this to shared code with platform specific constants.
> Windows platform was checking the option against the current thread's stack size, and not checking ThreadStackSize, and was setting the stack size against that.  It worked until you increase StackShadowPages, and then the calculation is wrong.
> For Windows, the minimum thread stack size with current StackShadowPages of 9 in debug is now 92K rather than 188K.
> The ShadowPageSize is too low for the loom repository and is on the bounds of current mainline, so will be increased when Loom is integrated.  When increased to 11 StackShadowPages, the smallest stack size is 100K.
> Tested with tier1-4 on windows-x64-debug.

src/hotspot/share/runtime/os.cpp line 2007:

> 2005: // page size which again depends on the concrete system the VM is running
> 2006: // on. Space for libc guard pages is not included in this size.
> 2007: jint os::set_minimum_stack_sizes(size_t os_min_stack_allowed) {

Rather than pass in the minimum and spread that knowledge across each OS specific file, can we not just define a field in the os class and have it set appropriately (during os::init()?) - once from os_posix.cpp and once from os_windows.cpp?

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

PR: https://git.openjdk.java.net/jdk/pull/8471


More information about the hotspot-runtime-dev mailing list