On Tue, 26 Sep 2023 13:49:02 GMT, Varada M <d...@openjdk.org> wrote: > Similar issue [JDK-8303549](https://bugs.openjdk.org/browse/JDK-8303549) > where AttachCurrentThread is failing on AIX due t stack size issue. > Test cases: > runtime/jni/terminatedThread/TestTerminatedThread.java > vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/TestDescription.java > > vmTestbase/nsk/jvmti/scenarios/jni_interception/JI06/ji06t001/TestDescription.java > > vmTestbase/nsk/jvmti/SetJNIFunctionTable/setjniftab001/TestDescription.java > > Reported Issue : [JDK-8219652](https://bugs.openjdk.org/browse/JDK-8219652)
It seems for some of the fixes instead of making sure the current thread has sufficient stack space , you instead create a new thread with sufficient stack space to attach to. Is there a reason the original thread could not have been created with enough stack space? test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetJNIFunctionTable/setjniftab001/setjniftab001.cpp line 255: > 253: pthread_attr_t attr; > 254: pthread_attr_init(&attr); > 255: pthread_attr_setstacksize(&attr, STACK_SIZE); This is failing to build on Windows. Looks like you don't have the needed #include. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15924#issuecomment-1735853791 PR Review Comment: https://git.openjdk.org/jdk/pull/15924#discussion_r1337467048