RFR: JDK-8303549: [AIX] TestNativeStack.java is failing with exit value 1
David Holmes
dholmes at openjdk.org
Tue May 30 12:38:55 UTC 2023
On Tue, 30 May 2023 10:45:18 GMT, Varada M <duke at openjdk.org> wrote:
>> 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.
>
> Yes you are right, then I would change it.
>
>> 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 #14139 that will likely need the same adjustment.
>
> For this test , the default thread stack size is defined here :
> `./src/hotspot/os_cpu/aix_ppc/globals_aix_ppc.hpp : define_pd_global(intx, ThreadStackSize, 2048); // 0 => use system default`
>
> `test/hotspot/jtreg/runtime/jni/getCreatedJavaVMs/TestGetCreatedJavaVMs.java ` failing with an assert failure `assert(k->is_initialized()) failed: need to increase java_thread_min_stack_allowed calculation.` The test is passing when stack size is explicitly provided.
My point is that according to the definition you should be able to specify `-Xss64k` and it will work fine. But obviously that can't be the case if the default 192K is not sufficient. So `_java_thread_min_stack_allowed` seems to be set wrong for this platform.
>> 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`
>
> I got this error when given 1 * M `error: use of undeclared identifier 'M'`
> By giving value as `1024 * 1024` also works.
Sorry I was not thinking straight - this is test code not VM code so no `M`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14209#discussion_r1210208249
PR Review Comment: https://git.openjdk.org/jdk/pull/14209#discussion_r1210205510
More information about the hotspot-runtime-dev
mailing list