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 framepop02.java#id1 checks outside a virtual thread's scope #16346

Closed
babsingh opened this issue Nov 21, 2022 · 7 comments · Fixed by adoptium/aqa-tests#4687
Closed

JVMTI framepop02.java#id1 checks outside a virtual thread's scope #16346

babsingh opened this issue Nov 21, 2022 · 7 comments · Fixed by adoptium/aqa-tests#4687
Labels
comp:jvmti jdk19 jdk20 project:loom Used to track Project Loom related work test failure

Comments

@babsingh
Copy link
Contributor

Issue

In framepop02/framepop02.java#id1, the JVMTI frame pop event expects the thread to be a virtual thread after the invocation of VirtualThread.unmount.

This is not true since J9VMThread->threadObject is changed to the carrier thread in VirtualThread.unmount.

Virtual thread's scope is between the mount and unmount phases. The test should enforce its checks within a virtual thread's scope.

Currently, this test is incompatible with OpenJ9 since it enforces its checks outside a virtual thread's scope.

Test CMD

# FramePop/framepop02
make test TEST="jtreg:test/hotspot/jtreg/serviceability/jvmti/events/FramePop/framepop02" JTREG="JAVA_OPTIONS=--enable-preview -Dvm.continuations=true;VERBOSE=all"

Test Output

>>>  Test Thread #5: Ljava/lang/VirtualThread;.setState(I)V, depth = 17
[2022-11-20.21:38:09] >>> Frame Pop
>>>  Test Thread #4: Ljava/lang/VirtualThread;.setState(I)V, depth = 17
[2022-11-20.21:38:09]>>> Method entry
>>>  Test Thread #5: Ljava/lang/VirtualThread;.yieldContinuation()Z, depth = 17
[2022-11-20.21:38:09]>>> Method entry
>>>  Test Thread #4: Ljava/lang/VirtualThread;.yieldContinuation()Z, depth = 17
[2022-11-20.21:38:09]>>> Native Method entry
>>>  Test Thread #5: Ljava/lang/VirtualThread;.notifyJvmtiUnmountBegin(Z)V, depth = 18
[2022-11-20.21:38:09]>>> Method entry
>>>  Test Thread #5: Ljava/lang/VirtualThread;.unmount()V, depth = 18
[2022-11-20.21:38:09]>>> Method entry
>>>  Test Thread #3: Ljava/lang/Thread;.isVirtual()Z, depth = 14
[2022-11-20.21:38:09] >>> Frame Pop
>>>  ForkJoinPool-1-worker-6: Ljava/lang/VirtualThread;.unmount()V, depth = 10
  ForkJoinPool-1-worker-6: Ljava/lang/VirtualThread;.unmount()V, depth = 10
STDERR:

Fatal error: Unknown thread:
@babsingh babsingh added this to the Backlog milestone Nov 21, 2022
babsingh added a commit to babsingh/aqa-tests that referenced this issue Nov 21, 2022
eclipse-openj9/openj9#16212 was fixed by
1. eclipse-openj9/openj9#16290
2. eclipse-openj9/openj9#16293

eclipse-openj9/openj9#16275 is a duplicate of
eclipse-openj9/openj9#16212.

eclipse-openj9/openj9#16229 was fixed by eclipse-openj9/openj9#16323.

FramePop/framepop02 fails with another issue, which is reported in
eclipse-openj9/openj9#16346.

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue Nov 21, 2022
eclipse-openj9/openj9#16212 was fixed by
1. eclipse-openj9/openj9#16290; and
2. eclipse-openj9/openj9#16293.

eclipse-openj9/openj9#16275 is a duplicate of
eclipse-openj9/openj9#16212.

eclipse-openj9/openj9#16229 was fixed by eclipse-openj9/openj9#16323.

FramePop/framepop02 fails with another issue, which is reported in
eclipse-openj9/openj9#16346.

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Mesbah-Alam pushed a commit to adoptium/aqa-tests that referenced this issue Nov 22, 2022
eclipse-openj9/openj9#16212 was fixed by
1. eclipse-openj9/openj9#16290; and
2. eclipse-openj9/openj9#16293.

eclipse-openj9/openj9#16275 is a duplicate of
eclipse-openj9/openj9#16212.

eclipse-openj9/openj9#16229 was fixed by eclipse-openj9/openj9#16323.

FramePop/framepop02 fails with another issue, which is reported in
eclipse-openj9/openj9#16346.

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@dipak-bagadiya
Copy link
Contributor

dipak-bagadiya commented Feb 7, 2023

A similar failure was observed in the following test for enabling FramePop for method.

Test CMD

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

Test Output

Hit #0: VirtualThreadMount #1: enabling FramePop for method: java/lang/VirtualThread::notifyJvmtiMountEnd on virtual thread: 0x26fc10
[New Thread 0x7fffd55cb700 (LWP 144916)]
check_jvmti_status: JVMTI function returned error: JVMTI_ERROR_OPAQUE_FRAME (32)
Fatal error: VirtualThreadMount: error in JVMTI NotifyFramePop

@DanHeidinga DanHeidinga modified the milestones: Backlog, Java 21 Apr 19, 2023
@babsingh
Copy link
Contributor Author

babsingh commented May 3, 2023

@dipak-bagadiya Can you investigate this issue? The first step will be to verify if #16654 fixes this issue.

fyi @thallium @fengxue-IS

@babsingh
Copy link
Contributor Author

babsingh commented May 4, 2023

@dipak-bagadiya #16689 has higher priority. So, this task should be pursued after #16689.

@dipak-bagadiya
Copy link
Contributor

This issue is not resolved by #16654; the test case framepop02 failed with the same error.
@babsingh

@dipak-bagadiya
Copy link
Contributor

The framepop02 failure will fix by #17125.

@babsingh
Copy link
Contributor Author

babsingh commented Jun 1, 2023

#17490 has been opened for the MethodExitTest failure in #16346 (comment) since it is unrelated to the framepop02 failure. This issue will only focus on the framepop02 failure which should be fixed by #17125.

babsingh added a commit to babsingh/aqa-tests that referenced this issue Jul 27, 2023
eclipse-openj9/openj9#17125 fixes framepop02.java#id1, and it was
embedded in eclipse-openj9/openj9#17514 and merged.

Now, the MethodExitTest failure is being tracked through
eclipse-openj9/openj9#17514.

Closes eclipse-openj9/openj9#16346

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue Jul 27, 2023
eclipse-openj9/openj9#17125 fixes framepop02.java#id1, and it was
embedded in eclipse-openj9/openj9#17514 and merged.

Now, the MethodExitTest failure is being tracked through
eclipse-openj9/openj9#17490.

Closes eclipse-openj9/openj9#16346

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@babsingh
Copy link
Contributor Author

babsingh commented Jul 27, 2023

Closing. #17125 fixes this test failure. It was embedded in #17514 and merged. adoptium/aqa-tests#4687 has been opened to re-enable framepop02.java#id1.

llxia pushed a commit to adoptium/aqa-tests that referenced this issue Jul 27, 2023
eclipse-openj9/openj9#17125 fixes framepop02.java#id1, and it was
embedded in eclipse-openj9/openj9#17514 and merged.

Now, the MethodExitTest failure is being tracked through
eclipse-openj9/openj9#17490.

Closes eclipse-openj9/openj9#16346

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jvmti jdk19 jdk20 project:loom Used to track Project Loom related work test failure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants