RFR: 8300295: [AIX] TestDaemonDestroy fails due to !is_primordial_thread assertion [v5]
Thomas Stuefe
stuefe at openjdk.org
Wed Feb 1 12:34:56 UTC 2023
On Wed, 1 Feb 2023 08:01:11 GMT, Varada M <duke at openjdk.org> wrote:
>> The assertion failure with exit value 134 for the test TestDaemonDestroy.java is because when the JNI_CreateJavaVM is being called by main thread on AIX it prevents the jvm creation on the primordial thread on AIX. This is solved in such a way that when JNI_CreateJavaVM is called it runs in pthread thus enabling the creation of jvm.
>>
>> JBS issue for this test : [JDK-8300295](https://bugs.openjdk.org/browse/JDK-8300295)
>
> Varada M has updated the pull request incrementally with one additional commit since the last revision:
>
> Indentation Fixes
Small nits, otherwise fine.
test/hotspot/jtreg/runtime/jni/daemonDestroy/exedaemonDestroy.c line 124:
> 122: args.argv = argv;
> 123: #ifdef AIX
> 124: size_t adjusted_stack_size = 1024*1024;
Why "adjusted"?
test/hotspot/jtreg/runtime/jni/daemonDestroy/exedaemonDestroy.c line 128:
> 126: pthread_attr_t attr;
> 127: pthread_attr_init(&attr);
> 128: pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
Not necessary; PTHREAD_CREATE_JOINABLE is the default.
test/hotspot/jtreg/runtime/jni/daemonDestroy/exedaemonDestroy.c line 129:
> 127: pthread_attr_init(&attr);
> 128: pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
> 129: pthread_attr_setguardsize(&attr, 0);
Why?
test/hotspot/jtreg/runtime/jni/daemonDestroy/exedaemonDestroy.c line 130:
> 128: pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
> 129: pthread_attr_setguardsize(&attr, 0);
> 130: pthread_attr_setstacksize(&attr, adjusted_stack_size);
Do we really need this? All other platforms seem to live fine with the default stack size.
OTOH primordial thread stack default size and pthread default stack size may differ, maybe its better to be explicit.
-------------
PR: https://git.openjdk.org/jdk/pull/12006
More information about the hotspot-runtime-dev
mailing list