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

[JDK20] GetStackTraceNotSuspendedStress Fails #17307

Closed
babsingh opened this issue Apr 28, 2023 · 3 comments
Closed

[JDK20] GetStackTraceNotSuspendedStress Fails #17307

babsingh opened this issue Apr 28, 2023 · 3 comments
Labels
Milestone

Comments

@babsingh
Copy link
Contributor

serviceability/jvmti/stress/StackTrace/NotSuspended/GetStackTraceNotSuspendedStressTest.java

#16203 has been completed. While enabling GetStackTraceNotSuspendedStress, the below error was seen. Fields in a VirtualThread instance are GC'ed while it is being used. The Java object is retained if the GC policy is changed to -Xgcpolicy:optthruput or -Xgcpolicy:none.

make test TEST="jtreg:test/hotspot/jtreg/serviceability/jvmti/stress/StackTrace/NotSuspended" JTREG="JAVA_OPTIONS=--enable-preview -Dvm.continuations=true;VERBOSE=all"

>>>> with default GC policy <<<<

STDOUT:
Agent_OnLoad started
Agent_OnLoad finished
Synchronization point checkStatus(0) called.
Data 0x7f270c0a72c8 0x7f26ec002bc8
Agent: wait for thread to start
Agent: started
STDERR:
java.lang.NullPointerException: Cannot read field "scheduler" because "this" is null
	at java.base/java.lang.VirtualThread.submitRunContinuation(VirtualThread.java:241)
	at java.base/java.lang.VirtualThread.start(VirtualThread.java:535)
	at java.base/java.lang.VirtualThread.start(VirtualThread.java:548)
	at GetStackTraceNotSuspendedStressTest.test1(GetStackTraceNotSuspendedStressTest.java:78)
	at GetStackTraceNotSuspendedStressTest.runTest(GetStackTraceNotSuspendedStressTest.java:89)
	at GetStackTraceNotSuspendedStressTest.main(GetStackTraceNotSuspendedStressTest.java:102)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
	at java.base/java.lang.Thread.run(Thread.java:1639)

JavaTest Message: Test threw exception: java.lang.NullPointerException: Cannot read field "scheduler" because "this" is null
JavaTest Message: shutting down test

>>>> with -Xgcpolicy:optthruput or -Xgcpolicy:none <<<<

STDOUT:
Agent_OnLoad started
Agent_OnLoad finished
Synchronization point checkStatus(0) called.
Data 0x7f2a900946e8 0x7f2a6c0026f8
Agent: wait for thread to start
Agent: started
STDERR:
STATUS:Passed.
@babsingh babsingh added this to the Java 20.0.2 milestone Apr 28, 2023
@babsingh
Copy link
Contributor Author

fyi @LinHu2016 @amicic @dmitripivkine

@LinHu2016
Copy link
Contributor

Hi @babsingh, is it intermittent issue or only related with any platforms? I haven't reproduced the issue locally.

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>
@babsingh
Copy link
Contributor Author

babsingh commented May 2, 2023

@LinHu2016 I am also unable to reproduce it after I updated my repos in the morning. Last Friday, I was able to reproduce it consistently. For the time being, I will close this issue. The failing test is being enabled in adoptium/aqa-tests#4554.

@babsingh babsingh closed this as completed May 2, 2023
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants