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

JDK21 serviceability/jvmti/vthread/PopFrameTest/PopFrameTest.java#platform Fatal error: Breakpoint: Failed in PopFrame #17716

Closed
JasonFengJ9 opened this issue Jun 29, 2023 · 0 comments · Fixed by adoptium/aqa-tests#4684

Comments

@JasonFengJ9
Copy link
Member

JasonFengJ9 commented Jun 29, 2023

Failure link

From an internal build(rhel8x86-rtp-rt2-1):

08:24:53  openjdk version "21-internal" 2023-09-19
08:24:53  OpenJDK Runtime Environment (build 21-internal-adhoc.jenkins.BuildJDK21x86-64linuxPersonal)
08:24:53  Eclipse OpenJ9 VM (build master-163a51495d5, JRE 21 Linux amd64-64-Bit Compressed References 20230624_7 (JIT enabled, AOT enabled)
08:24:53  OpenJ9   - 163a51495d5
08:24:53  OMR      - 59b55e30960
08:24:53  JCL      - e76b3946ed5 based on jdk-21+27)

Rerun in Grinder - Change TARGET to run only the failed test targets.

Optional info

Failure output (captured from console output)

08:27:16  variation: Mode150
08:27:16  JVM_OPTIONS:  -XX:+UseCompressedOops 

08:30:16  TEST: serviceability/jvmti/vthread/PopFrameTest/PopFrameTest.java#platform

08:30:16  STDOUT:
08:30:16  Agent init
08:30:16  
08:30:16  Main #A: method A() must be blocked on entering a synchronized statement
08:30:16  TestTask.run: started
08:30:16  TestTask.A: started
08:30:16  
08:30:16  Main #A.1: unsuspended
08:30:16  Main: popFrame: PopFrame returned code: JVMTI_ERROR_THREAD_NOT_SUSPENDED (13)
08:30:16  Main #A.1: got expected THREAD_NOT_SUSPENDED
08:30:16  
08:30:16  Main #A.2: suspended
08:30:16  Main: suspendThread
08:30:16  Main: popFrame: PopFrame returned code: JVMTI_ERROR_NONE (0)
08:30:16  Main #A.2: got expected JVMTI_ERROR_NONE
08:30:16  Main: resumeThread
08:30:16  TestTask.A: started
08:30:16  TestTask.A: finished
08:30:16  Main: prepareAgent started
08:30:16  Main: prepareAgent finished
08:30:16  Breakpoint: In method TestTask.B(): before sync section
08:30:16  
08:30:16  Main #B: method B() must be blocked in a breakpoint event handler
08:30:16  Main: ensureAtBreakpoint
08:30:16  
08:30:16  Main #B.1: unsuspended
08:30:16  Main: popFrame: PopFrame returned code: JVMTI_ERROR_THREAD_NOT_SUSPENDED (13)
08:30:16  Main #B.1: got expected THREAD_NOT_SUSPENDED
08:30:16  
08:30:16  Main #B.2: suspended
08:30:16  Main: suspendThread
08:30:16  Main: popFrame: PopFrame returned code: JVMTI_ERROR_NONE (0)
08:30:16  Main #B.2: got expected JVMTI_ERROR_NONE
08:30:16  Main: resumeThread
08:30:16  Main: notifyAtBreakpoint
08:30:16  Breakpoint: In method TestTask.B(): after sync section
08:30:16  Breakpoint: In method TestTask.B() finished
08:30:16  
08:30:16  Main #B.3: unsuspended, call PopFrame on own thread
08:30:16  Main: ensureAtBreakpoint
08:30:16  TestTask.B: started
08:30:16  Main: prepareAgent started
08:30:16  Main: prepareAgent finished
08:30:16  Breakpoint: In method TestTask.B(): before sync section
08:30:16  Main: notifyAtBreakpoint
08:30:16  Breakpoint: In method TestTask.B(): after sync section
08:30:16  Breakpoint: PopFrame returned code: JVMTI_ERROR_THREAD_NOT_SUSPENDED (13)
08:30:16  check_jvmti_status: JVMTI function returned error: JVMTI_ERROR_THREAD_NOT_SUSPENDED (13)
08:30:16  STDERR:
08:30:16  
08:30:16  Fatal error: Breakpoint: Failed in PopFrame

08:30:20  --------------------------------------------------
08:30:44  Test results: passed: 118; failed: 7
08:30:53  Report written to /home/jenkins/workspace/Test_openjdk21_j9_extended.openjdk_x86-64_linux_Personal/jvmtest/openjdk/report/html/report.html
08:30:53  Results written to /home/jenkins/workspace/Test_openjdk21_j9_extended.openjdk_x86-64_linux_Personal/aqa-tests/TKG/output_16876095876025/serviceability_jvmti_j9_0/work
08:30:53  Error: Some tests failed or other problems occurred.
08:30:53  -----------------------------------
08:30:53  serviceability_jvmti_j9_0_FAILED

Created from

FYI @babsingh

@JasonFengJ9 JasonFengJ9 added this to the Java 21 milestone Jun 29, 2023
@babsingh babsingh self-assigned this Jun 30, 2023
babsingh added a commit to babsingh/openj9 that referenced this issue Jul 17, 2023
Previously, PopFrame returned JVMTI_ERROR_OPAQUE_FRAME for a virtual
thread.

In JDK21, PopFrame includes support for virtual threads as per the
JVMTI specification:
- Error if a virtual thread is not suspended and not the current
  thread.
- Error if a virtual thread is unomunted since it won't be able to
  pop the current frame.
- For a carrier thread with a virtual thread mounted, the details of
  the carrier thread are derived from targetThread->currentContinuation.

Related:
- eclipse-openj9#17715
- eclipse-openj9#17716

Also, there is no need to halt and resume a thread for inspection since
PopFrame expects the thread to be suspended as per the JVMTI spec. If a
thread is not suspended, it returns JVMTI_ERROR_THREAD_NOT_SUSPENDED.

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue Jul 25, 2023
- StopThreadTest is fixed by eclipse-openj9/openj9#17806.
- PopFrameTest is fixed by eclipse-openj9/openj9#17809.
- GetSetLocalUnsuspended is fixed by eclipse-openj9/openj9#17829.

Closes eclipse-openj9/openj9#17711
Closes eclipse-openj9/openj9#17715
Closes eclipse-openj9/openj9#17716
Closes eclipse-openj9/openj9#17717
Closes eclipse-openj9/openj9#17718

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
llxia pushed a commit to adoptium/aqa-tests that referenced this issue Jul 25, 2023
- StopThreadTest is fixed by eclipse-openj9/openj9#17806.
- PopFrameTest is fixed by eclipse-openj9/openj9#17809.
- GetSetLocalUnsuspended is fixed by eclipse-openj9/openj9#17829.

Closes eclipse-openj9/openj9#17711
Closes eclipse-openj9/openj9#17715
Closes eclipse-openj9/openj9#17716
Closes eclipse-openj9/openj9#17717
Closes eclipse-openj9/openj9#17718

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants