RFR: JDK-8303549: [AIX] TestNativeStack.java is failing with exit value 1

David Holmes dholmes at openjdk.org
Tue May 30 08:12:56 UTC 2023


On Tue, 30 May 2023 04:55:36 GMT, Varada M <duke at openjdk.org> wrote:

> Stackoverflow exception has caused an exit value 1 when native thread is attaching as daemon. 
> On AIX the default stack for posix thread is 192 KB. For this particular test we run thread in pthread_create() which is defined in pthread library thus not following JVM thread creation routines. Hence we have to explicitly provide stack size. 
> 
> Reported Issue :[JDK-8303549]( https://bugs.openjdk.org/browse/JDK-8303549)

I'm still a little confused about this issue because we have:

./os_cpu/aix_ppc/os_aix_ppc.cpp:size_t os::_java_thread_min_stack_allowed = 64 * K;

but the current issues suggests the pthread default of 192K is too small, so 64K is definitely too small!

I would expect we have the same problem with other tests ... though some of them may be (artificially?) restricted to run on Linux. I have a test in https://github.com/openjdk/jdk/pull/14139 that will likely need the same adjustment.

test/hotspot/jtreg/runtime/jni/nativeStack/libnativeStack.c line 112:

> 110:   warning = warn;
> 111: 
> 112: #ifdef AIX

I don't think we need to make this AIX specific, but of course the chosen value must work on all platforms.

test/hotspot/jtreg/runtime/jni/nativeStack/libnativeStack.c line 115:

> 113:   pthread_attr_t attr;
> 114:   pthread_attr_init(&attr);
> 115:   size_t stack_size = 0x100000;

Can we use a human readable value please e.g. `1 * M`

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

PR Review: https://git.openjdk.org/jdk/pull/14209#pullrequestreview-1450333594
PR Review Comment: https://git.openjdk.org/jdk/pull/14209#discussion_r1209865645
PR Review Comment: https://git.openjdk.org/jdk/pull/14209#discussion_r1209867840


More information about the hotspot-runtime-dev mailing list