Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JVMTI SuspendThread/suspendthrd03 Fails #16242

Closed
babsingh opened this issue Nov 1, 2022 · 1 comment
Closed

JVMTI SuspendThread/suspendthrd03 Fails #16242

babsingh opened this issue Nov 1, 2022 · 1 comment

Comments

@babsingh
Copy link
Contributor

babsingh commented Nov 1, 2022

With OpenJ9, the failure is intermittent in JDK19. On some occassions, the test passes with OpenJ9 when the rerun: command is used.

This test passes with the RI. This test only deals with platform threads so it is unrelated to Project Loom. This failure will presumably be seen with JDK8/11/17 as well.

Related: #16187.

Issue(s)

OpenJ9 does not support the below cmdline option. But this is not the root cause of the failure.

JVMJ9VM007W Command-line option unrecognised: -Xlog:thread+smr=debug

The root of cause of the failure is related to the below log output:

Debuggee status sync aborted because agent thread has finished

I believe that there is a synchronization issue which will need to be further triaged.

Test CMD

make test TEST="jtreg:test/hotspot/jtreg/serviceability/jvmti/thread/SuspendThread/suspendthrd03/suspendthrd03.java" JTREG="JAVA_OPTIONS=--enable-preview -Dvm.continuations=true;VERBOSE=all"

Failure Test Output

STDOUT:
Starting TestedThread #0.
Starting tested thread
Sync: thread started
Synchronization point checkStatus(0) called.
Data 0x7f33f40a67d8 0x7f33d0002ad8
Wait for thread to start
Find thread: TestedThread
  ... found thread: 0x7f33f409dc08
Suspend thread: 0x7f33f409dc08
Let thread to run and finish
Get state vector for thread: 0x7f33f409dc08
  ... got state vector:  ALIVE RUNNABLE SUSPENDED (1048581)
Resume thread: 0x7f33f409dc08
INFO: Late suspend thread: 0x7f33f409dc08
INFO: Late resume thread: 0x7f33f409dc08
<-- REPEATED MANY TIMES -->
INFO: Late suspend thread: 0x7f33f409dc08
INFO: Late resume thread: 0x7f33f409dc08
Finishing tested thread
INFO: Late suspend thread: 0x7f33f409dc08
INFO: Late resume thread: 0x7f33f409dc08
<-- REPEATED MANY TIMES -->
INFO: Late suspend thread: 0x7f33f409dc08
INFO: Late resume thread: 0x7f33f409dc08
Sync: thread finished
Synchronization point checkStatus(0) called.
Data 0x7f33f40a67d8 0x7f33d0002ad8
Debuggee status sync aborted because agent thread has finished
STDERR:
JVMJ9VM007W Command-line option unrecognised: -Xlog:thread+smr=debug

Correct/Expected Test Output

...
INFO: Late resume thread: 0x7fa9e009dd08
INFO: Late suspend thread: 0x7fa9e009dd08
INFO: Late suspend thread err: 15
INFO: made 12 late calls to JVM/TI SuspendThread()
INFO: N_LATE_CALLS == 10000 value is large enough to cause a SuspendThread() call after thread exit.
Wait for thread to finish
Sync: thread finished
Synchronization point checkStatus(0) called.
Data 0x7fa9e00a6898 0x7fa9bc002ad8
Delete thread reference
Let debugee to finish
babsingh added a commit to babsingh/aqa-tests that referenced this issue May 2, 2023
- NotSuspended/GetStackTraceNotSuspendedStressTest has been fixed.
- SuspendThread/suspendthrd03 has been removed in JDK20.
- Now, VThreadTest fails because of eclipse-openj9/openj9#15920.

Related:
- eclipse-openj9/openj9#16688
- eclipse-openj9/openj9#16242
- eclipse-openj9/openj9#17307

Depends on eclipse-openj9/openj9#17318

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue May 2, 2023
- NotSuspended/GetStackTraceNotSuspendedStressTest has been fixed.
- SuspendThread/suspendthrd03 has been removed in JDK20.
- Now, VThreadTest fails because of eclipse-openj9/openj9#15920.
- eclipse-openj9/openj9#16185 and eclipse-openj9/openj9#16279 are
permanently excluded. Changed their reason to adoptium#1297 to support
the test tool, which automatically enables tests after the related
issues are closed.

Related:
- eclipse-openj9/openj9#16688
- eclipse-openj9/openj9#16242
- eclipse-openj9/openj9#17307

Depends on eclipse-openj9/openj9#17318

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
llxia added a commit to adoptium/aqa-tests that referenced this issue May 2, 2023
- NotSuspended/GetStackTraceNotSuspendedStressTest has been fixed.
- SuspendThread/suspendthrd03 has been removed in JDK20.
- Now, VThreadTest fails because of eclipse-openj9/openj9#15920.
- eclipse-openj9/openj9#16185 and eclipse-openj9/openj9#16279 are
permanently excluded. Changed their reason to #1297 to support
the test tool, which automatically enables tests after the related
issues are closed.

Related:
- eclipse-openj9/openj9#16688
- eclipse-openj9/openj9#16242
- eclipse-openj9/openj9#17307

Depends on eclipse-openj9/openj9#17318

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Co-authored-by: Martijn Verburg <martijnverburg@gmail.com>
Co-authored-by: Lan Xia <19273206+llxia@users.noreply.github.com>
@babsingh
Copy link
Contributor Author

babsingh commented May 2, 2023

Closing: SuspendThread/suspendthrd03 has been removed in JDK20 extension repo. Also, the test has been removed from JDK20's test exclude list in adoptium/aqa-tests#4554.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant