Skip to content

jdk24 java/lang/Thread/virtual/RetryMonitorEnterWhenPinned.java timeout #20955

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

Open
pshipton opened this issue Jan 16, 2025 · 18 comments
Open

jdk24 java/lang/Thread/virtual/RetryMonitorEnterWhenPinned.java timeout #20955

pshipton opened this issue Jan 16, 2025 · 18 comments

Comments

@pshipton
Copy link
Member

https://openj9-jenkins.osuosl.org/job/Test_openjdknext_j9_sanity.openjdk_aarch64_mac_Nightly_testList_0/6
java/lang/Thread/virtual/RetryMonitorEnterWhenPinned.java

timeout

@pshipton
Copy link
Member Author

Excluding via Excluding the tests via adoptium/aqa-tests#5889

@babsingh
Copy link
Contributor

@fengxue-IS Assigning it to you since it is related to Virtual Threads.

@babsingh
Copy link
Contributor

@JasonFengJ9 Could you please take a look at this failure?

  • 100 VirtualThreads (VTs) are attempting to acquire a lock, which has already been acquired. The test expects the VTs to be in the BLOCKED state until the lock is available. The test times out since the VTs are not in the BLOCKED state. We will need to investigate why the VTs don't reach the BLOCKED state.
  • The test needs to be run with -Xint -Xgcpolicy:nogc -XX:+YieldPinnedVirtualThreads to enable the base VM changes for JEP 491. Also, the GC and JIT need to be disabled as the GC and VM-JIT coordination changes for JEP 491 are still in progress.
  • Base VM changes for JEP 491: Jep491 VM support #21273 and Fix hang on vthread unmount when -XX:+YieldPinnedVirtualThreads is enabled #21292
"MainThread" prio=5 Id=15 RUNNABLE
	at java.base@24-internal/java.lang.Thread.sleepImpl(Native Method)
	at java.base@24-internal/java.lang.Thread.sleepNanos(Thread.java:488)
	at java.base@24-internal/java.lang.Thread.sleep(Thread.java:519)
	at app//RetryMonitorEnterWhenPinned.await(RetryMonitorEnterWhenPinned.java:138)
	at app//RetryMonitorEnterWhenPinned.run(RetryMonitorEnterWhenPinned.java:71)
	- locked java.lang.Object@f7d33392
	at app//RetryMonitorEnterWhenPinned.main(RetryMonitorEnterWhenPinned.java:48)

@babsingh babsingh assigned JasonFengJ9 and unassigned fengxue-IS Mar 11, 2025
@JasonFengJ9
Copy link
Member

JasonFengJ9 commented Mar 13, 2025

Update:

java/lang/Thread/virtual/RetryMonitorEnterWhenPinned.java

I reproduced the timeout locally in the original JTReg test suites, attempting to build a standalone test case and hope it helps further investigation.

@JasonFengJ9
Copy link
Member

Update:

100 VirtualThreads (VTs) are attempting to acquire a lock, which has already been acquired. The test expects the VTs to be in the BLOCKED state until the lock is available. The test times out since the VTs are not in the BLOCKED state. We will need to investigate why the VTs don't reach the BLOCKED state.

My experiments show that the test behaviour is related to the number of VTs created for start virtual threads that block on monitorenter, and the command line option -XX:+YieldPinnedVirtualThreads.

A few observations:

  1. Reduce the number of VTs from 100 to 5 or less for start virtual threads that block on monitorenter
    1.1 run with -Xint -Xgcpolicy:nogc, the test can finish successfully;

    1.2 run with -Xint -Xgcpolicy:nogc -XX:+YieldPinnedVirtualThreads, the VTs are NOT in Thread.State.BLOCKED, and waiting at await(thread, Thread.State.BLOCKED).

  2. Reduce the number of VTs from 100 to 10 for start virtual threads that block on monitorenter
    2.1 run with -Xint -Xgcpolicy:nogc, the VTs are in Thread.State.BLOCKED successfully, afterwards the test won't be able to proceed at start virtual threads that block on monitorenter while pinned after the following output produced by System.out.printf("%s waiting for thread #%d to block%n",:
    2025-03-14T02:33:06.842646Z waiting for thread #37 to block
    Changing the number of VTs at start virtual threads that block on monitorenter while pinned doesn't make any difference. The test waits at started.await(), it seems started.countDown() wasn't invoked, or the VT wasn't started and run.

    2.2 run with -Xint -Xgcpolicy:nogc -XX:+YieldPinnedVirtualThreads, the VTs are NOT in Thread.State.BLOCKED, and waiting at await(thread, Thread.State.BLOCKED), this is same as 1.2.

  3. Reduce the number of VTs from 100 to 6 - 9 for start virtual threads that block on monitorenter
    3.1 run with -Xint -Xgcpolicy:nogc, the result is not consistent, could be the same as 1.1 (finish), or 2.1 (wait for a timeout);
    3.2 run with -Xint -Xgcpolicy:nogc -XX:+YieldPinnedVirtualThreads, same as 1.2 (i.e. 2.2, wait for a timeout).

  4. Reduce the number of VTs from 100 to 11 or larger for start virtual threads that block on monitorenter
    4.1 run with -Xint -Xgcpolicy:nogc, same as 1.2 (i.e. 2.2 and 3.2, wait for a timeout);
    4.2 run with -Xint -Xgcpolicy:nogc -XX:+YieldPinnedVirtualThreads, same as 3.1(wait for a timeout).

Note: my local machine int carriersAvailable = Runtime.getRuntime().availableProcessors() is 10.

@JasonFengJ9
Copy link
Member

run with -Xint -Xgcpolicy:nogc, the VTs are NOT in Thread.State.BLOCKED, and waiting at await(thread, Thread.State.BLOCKED).

The thread is in RUNNABLE state.

run with -Xint -Xgcpolicy:nogc -XX:+YieldPinnedVirtualThreads, the VTs are NOT in Thread.State.BLOCKED, and waiting at await(thread, Thread.State.BLOCKED).

The thread is in TERMINATED state.

@JasonFengJ9
Copy link
Member

Update

run with -Xint -Xgcpolicy:nogc -XX:+YieldPinnedVirtualThreads, the VTs are NOT in Thread.State.BLOCKED, and waiting at await(thread, Thread.State.BLOCKED).

The thread is in TERMINATED state.

The reason for the vt in question in TERMINATED is because it actually acquired the lock which supposedly was held by another thread.

There were two other issues while attempting different test cases:

  1. The JVM hangs if there is a System.out.printf("OpenJ9Log thread[%d] = %s - %s %n", i, thread[i], Instant.now()), attach a debugger to the process and got the following stack traces:
* thread #3, name = 'main'
 * frame #0: 0x000000018790e6ec libsystem_kernel.dylib`__psynch_cvwait + 8
   frame #1: 0x000000018794c894 libsystem_pthread.dylib`_pthread_cond_wait + 1204
   frame #2: 0x00000001004891a8 libj9thr29.dylib`monitor_enter_three_tier(self=0x000000012d811c50, monitor=0x000000012da26fb8, isAbortable=0) at omrthread.c:4058:3
   frame #3: 0x0000000100489768 libj9thr29.dylib`omrthread_monitor_enter_using_threadId(monitor=0x000000012da26fb8, threadId=0x000000012d811c50) at omrthread.c:3875:9
   frame #4: 0x00000001009945a8 libj9vm29.dylib`::objectMonitorEnterBlocking(currentThread=0x000000012e07a500) at ObjectMonitor.cpp:193:3
   frame #5: 0x0000000100a222dc libj9vm29.dylib`VM_BytecodeInterpreterFull::enterObjectMonitor(this=0x000000016fc76518, _sp=0x000000016fc764d0, _pc=<no value available>, obj=0x000000030001efa8) at BytecodeInterpreter.hpp:1213:11
   frame #6: 0x0000000100a1fd24 libj9vm29.dylib`VM_BytecodeInterpreterFull::monitorenter(this=0x000000016fc76518, _sp=0x000000016fc764d0, _pc=<no value available>) at BytecodeInterpreter.hpp:8936:22
   frame #7: 0x0000000100a01530 libj9vm29.dylib`VM_BytecodeInterpreterFull::run(this=0x000000016fc76518, vmThread=0x000000012e07a500) at BytecodeInterpreter.hpp:11994:4
   frame #8: 0x00000001009e0dc4 libj9vm29.dylib`::bytecodeLoopFull(currentThread=0x000000012e07a500) at BytecodeInterpreter.inc:112:21
   frame #9: 0x0000000100a92e64 libj9vm29.dylib`cInterpreter + 16
* thread #6
  * frame #0: 0x000000018790e6ec libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000018794c8c0 libsystem_pthread.dylib`_pthread_cond_wait + 1248
    frame #2: 0x000000010048ed64 libj9thr29.dylib`monitor_wait_original(self=0x000000012d812660, monitor=0x000000012e049b68, millis=60000, nanos=0, interruptible=8396800) at omrthread.c:4652:3
    frame #3: 0x000000010048ad8c libj9thr29.dylib`monitor_wait(monitor=0x000000012e049b68, millis=60000, nanos=0, interruptible=8396800) at omrthread.c:4531:10
    frame #4: 0x000000010048ae0c libj9thr29.dylib`omrthread_monitor_wait_interruptable(monitor=0x000000012e049b68, millis=60000, nanos=0) at omrthread.c:4461:9
    frame #5: 0x00000001009b3404 libj9vm29.dylib`::timeCompensationHelper(vmThread=0x000000012d9fa900, threadHelperType='\x01', monitor=0x000000012e049b68, millis=60000, nanos=0) at threadhelp.cpp:449:8
    frame #6: 0x00000001009b2f74 libj9vm29.dylib`::monitorWaitImpl(vmThread=0x000000012d9fa900, object=0x0000000000000000, millis=60000, nanos=0, interruptable=1) at threadhelp.cpp:110:8
    frame #7: 0x0000000100a1497c libj9vm29.dylib`VM_BytecodeInterpreterFull::inlObjectWaitImpl(this=0x000000016fe26798, _sp=0x000000016fe26750, _pc=<no value available>) at BytecodeInterpreter.hpp:5251:22
    frame #8: 0x00000001009ed988 libj9vm29.dylib`VM_BytecodeInterpreterFull::run(this=0x000000016fe26798, vmThread=0x000000012d9fa900) at BytecodeInterpreter.hpp:11207:3
    frame #9: 0x00000001009e0dc4 libj9vm29.dylib`::bytecodeLoopFull(currentThread=0x000000012d9fa900) at BytecodeInterpreter.inc:112:21
    frame #10: 0x0000000100a92e64 libj9vm29.dylib`cInterpreter + 16
* thread #18
  * frame #0: 0x000000018790e6ec libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000018794c894 libsystem_pthread.dylib`_pthread_cond_wait + 1204
    frame #2: 0x000000010048ef14 libj9thr29.dylib`monitor_wait_original(self=0x000000012da53758, monitor=0x000000012e0476b0, millis=0, nanos=0, interruptible=0) at omrthread.c:4686:3
    frame #3: 0x000000010048ad8c libj9thr29.dylib`monitor_wait(monitor=0x000000012e0476b0, millis=0, nanos=0, interruptible=0) at omrthread.c:4531:10
    frame #4: 0x000000010048ad04 libj9thr29.dylib`omrthread_monitor_wait(monitor=0x000000012e0476b0) at omrthread.c:4401:9
    frame #5: 0x00000001009e0bd4 libj9vm29.dylib`::takeVirtualThreadListToUnblock(currentThread=0x000000012da75b00) at ContinuationHelpers.cpp:1138:5
    frame #6: 0x0000000100425d98 libjvm.dylib`::JVM_TakeVirtualThreadListToUnblock(env=0x000000012da75b00, ignored=0x00000001200af630) at javanextvmi.cpp:677:9
    frame #7: 0x000000010036e3b4 libjvm.dylib`JVM_TakeVirtualThreadListToUnblock(env=0x000000012da75b00, ignored=0x00000001200af630) at generated.c:8658:9
    frame #8: 0x0000000100b3efbc libj9vm29.dylib`ffi_call_SYSV + 76
    frame #9: 0x0000000100b3e164 libj9vm29.dylib`ffi_call_int(cif=0x0000000170169170, fn=(libjvm.dylib`JVM_TakeVirtualThreadListToUnblock at generated.c:8641), orig_rvalue=0x000000012da75c18, avalue=0x00000001701692b8, closure=0x0000000000000000) at ffi.c:829:3
    frame #10: 0x0000000100b3db2c libj9vm29.dylib`ffi_call(cif=0x0000000170169170, fn=(libjvm.dylib`JVM_TakeVirtualThreadListToUnblock at generated.c:8641), rvalue=0x000000012da75c18, avalue=0x00000001701692b8) at ffi.c:838:3
    frame #11: 0x0000000100a2ce84 libj9vm29.dylib`VM_BytecodeInterpreterFull::cJNICallout(this=0x000000017016a798, _sp=0x000000017016a750, _pc=<no value available>, receiverAddress=0x00000001200af630, javaArgs=0x000000011580f100, returnType="\tH\xe36", returnStorage=0x000000012da75c18, function=0x000000010036e348, isStatic=true) at BytecodeInterpreter.hpp:2736:5
    frame #12: 0x0000000100a2c8c8 libj9vm29.dylib`VM_BytecodeInterpreterFull::callCFunction(this=0x000000017016a798, _sp=0x000000017016a750, _pc=<no value available>, jniMethodStartAddress=0x000000010036e348, receiverAddress=0x00000001200af630, javaArgs=0x000000011580f0f8, bp=0x0000000170169590, isStatic=true, returnType="\tH\xe36") at BytecodeInterpreter.hpp:2554:23
    frame #13: 0x0000000100a18104 libj9vm29.dylib`VM_BytecodeInterpreterFull::runJNINative(this=0x000000017016a798, _sp=0x000000017016a750, _pc=<no value available>) at BytecodeInterpreter.hpp:2442:9
    frame #14: 0x00000001009efcf0 libj9vm29.dylib`VM_BytecodeInterpreterFull::run(this=0x000000017016a798, vmThread=0x000000012da75b00) at BytecodeInterpreter.hpp:11267:2
    frame #15: 0x00000001009e0dc4 libj9vm29.dylib`::bytecodeLoopFull(currentThread=0x000000012da75b00) at BytecodeInterpreter.inc:112:21
    frame #16: 0x0000000100a92e64 libj9vm29.dylib`cInterpreter + 16
  1. The JVM crashed and was resolved by

These weren't seen if removing -XX:+YieldPinnedVirtualThreads.

@fengxue-IS
Copy link
Contributor

This could be caused by the inflation of blocking enter monitor being inflated during preparePinnedVirtualThreadForUnmount could be incorrectly allowing other threads to enter the while its being hold be another thread.

We need think of how to handle this edge case

@JasonFengJ9
Copy link
Member

With #21494 (merged) and #21459 (draft PR), the test is able to start virtual threads that block on monitorenter, now the test hang at wait for all threads to terminate

----------System.out:(21/1277)----------
2025-03-27T01:26:52.918398Z -- iteration 1 --
2025-03-27T01:26:53.030222Z waiting for thread #120 to block
2025-03-27T01:26:53.482923Z waiting for thread #121 to block
2025-03-27T01:26:53.483307Z waiting for thread #122 to block
2025-03-27T01:26:53.483616Z waiting for thread #124 to block
2025-03-27T01:26:53.483922Z waiting for thread #126 to block
2025-03-27T01:26:53.495302Z waiting for thread #128 to block
2025-03-27T01:26:53.495628Z waiting for thread #130 to block
2025-03-27T01:26:53.495953Z waiting for thread #132 to block
2025-03-27T01:26:53.496254Z waiting for thread #134 to block
2025-03-27T01:26:53.496546Z waiting for thread #136 to block
2025-03-27T01:26:53.498765Z waiting for 200 threads to terminate
2025-03-27T01:28:42.679859Z waiting for 109 threads to terminate
2025-03-27T01:30:31.839972Z waiting for 109 threads to terminate
2025-03-27T01:32:20.982256Z waiting for 109 threads to terminate
2025-03-27T01:34:10.127890Z waiting for 109 threads to terminate
2025-03-27T01:35:59.280134Z waiting for 109 threads to terminate
2025-03-27T01:37:48.447149Z waiting for 109 threads to terminate
2025-03-27T01:39:37.614676Z waiting for 109 threads to terminate
2025-03-27T01:41:26.771168Z waiting for 109 threads to terminate
Timeout signalled after 960 seconds

The test was run with -Xint -Xgcpolicy:nogc -XX:+YieldPinnedVirtualThread.
It seems VT shutdown issue.

@JasonFengJ9
Copy link
Member

Attached debugger to the process while it is waiting for all threads to terminate, got following stacktraces:

(lldb) thread list
Process 35565 stopped
* thread #1: tid = 0xdf8c4, 0x000000019bbeef54 libsystem_kernel.dylib`mach_msg2_trap + 8, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  thread #2: tid = 0xdf8c5, 0x000000019bbf0cac libsystem_kernel.dylib`__ulock_wait + 8
  thread #3: tid = 0xdf8c6, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'main'
  thread #4: tid = 0xdf8c7, 0x000000019bbfde8c libsystem_kernel.dylib`sem_wait + 8, name = 'Signal Reporter'
  thread #5: tid = 0xdf8ce, 0x000000019bbf0ba4 libsystem_kernel.dylib`__workq_kernreturn + 8
  thread #6: tid = 0xdf8d0, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8
  thread #7: tid = 0xdf8d1, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'Finalizer main'
  thread #8: tid = 0xdf8d2, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'GC Worker'
  thread #9: tid = 0xdf8d3, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'GC Worker'
  thread #10: tid = 0xdf8d4, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'GC Worker'
  thread #11: tid = 0xdf8d5, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'GC Worker'
  thread #12: tid = 0xdf8d6, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'GC Worker'
  thread #13: tid = 0xdf8d7, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'GC Worker'
  thread #14: tid = 0xdf8d8, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'GC Worker'
  thread #15: tid = 0xdf8d9, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'GC Worker'
  thread #16: tid = 0xdf8da, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8, name = 'GC Worker'
  thread #17: tid = 0xdf8dc, 0x000000019bbfdee4 libsystem_kernel.dylib`semop + 8
  thread #18: tid = 0xdf8dd, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8
  thread #19: tid = 0xdf8de, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8
  thread #20: tid = 0xdf8df, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8
  thread #21: tid = 0xdf8e2, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8
  thread #22: tid = 0xdf8e3, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8
  thread #23: tid = 0xdf8e4, 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8


* thread #3, name = 'main'
  * frame #0: 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000019bc308c0 libsystem_pthread.dylib`_pthread_cond_wait + 1248
    frame #2: 0x0000000104c6c6cc libj9thr29.dylib`omrthread_park(millis=999, nanos=988334) at omrthread.c:3297:4
    frame #3: 0x00000001051716c4 libj9vm29.dylib`::timeCompensationHelper(vmThread=0x0000000149879f00, threadHelperType='\x03', monitor=0x0000000000000000, millis=999, nanos=988334) at threadhelp.cpp:455:8
    frame #4: 0x00000001051720a0 libj9vm29.dylib`::threadParkImpl(vmThread=0x0000000149879f00, timeoutIsEpochRelative=0, timeout=999988334) at threadpark.cpp:104:9
    frame #5: 0x000000010579bd2c libjclse29.dylib`::Java_sun_misc_Unsafe_park(env=0x0000000149879f00, receiver=0x000000012b0190f0, isAbsolute='\0', time=999988334) at sun_misc_Unsafe.cpp:365:2
....

* thread #6
  * frame #0: 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000019bc308c0 libsystem_pthread.dylib`_pthread_cond_wait + 1248
    frame #2: 0x0000000104c72d24 libj9thr29.dylib`monitor_wait_original(self=0x000000015980aa60, monitor=0x0000000149848d68, millis=60000, nanos=0, interruptible=8396800) at omrthread.c:4652:3
    frame #3: 0x0000000104c6ed4c libj9thr29.dylib`monitor_wait(monitor=0x0000000149848d68, millis=60000, nanos=0, interruptible=8396800) at omrthread.c:4531:10
    frame #4: 0x0000000104c6edcc libj9thr29.dylib`omrthread_monitor_wait_interruptable(monitor=0x0000000149848d68, millis=60000, nanos=0) at omrthread.c:4461:9
    frame #5: 0x0000000105171698 libj9vm29.dylib`::timeCompensationHelper(vmThread=0x000000012b029b00, threadHelperType='\x01', monitor=0x0000000149848d68, millis=60000, nanos=0) at threadhelp.cpp:449:8
    frame #6: 0x0000000105171208 libj9vm29.dylib`::monitorWaitImpl(vmThread=0x000000012b029b00, object=0x0000000000000000, millis=60000, nanos=0, interruptable=1) at threadhelp.cpp:110:8
    frame #7: 0x00000001051d2d2c libj9vm29.dylib`VM_BytecodeInterpreterFull::inlObjectWaitImpl(this=0x000000016b642798, _sp=0x000000016b642750, _pc=<no value available>) at BytecodeInterpreter.hpp:5235:22

* thread #18
  * frame #0: 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000019bc30894 libsystem_pthread.dylib`_pthread_cond_wait + 1204
    frame #2: 0x0000000104c72ed4 libj9thr29.dylib`monitor_wait_original(self=0x0000000159844d58, monitor=0x00000001498468b0, millis=0, nanos=0, interruptible=0) at omrthread.c:4686:3
    frame #3: 0x0000000104c6ed4c libj9thr29.dylib`monitor_wait(monitor=0x00000001498468b0, millis=0, nanos=0, interruptible=0) at omrthread.c:4531:10
    frame #4: 0x0000000104c6ecc4 libj9thr29.dylib`omrthread_monitor_wait(monitor=0x00000001498468b0) at omrthread.c:4401:9
    frame #5: 0x000000010519f0bc libj9vm29.dylib`::takeVirtualThreadListToUnblock(currentThread=0x000000012b0a8f00) at ContinuationHelpers.cpp:1218:5
    frame #6: 0x0000000104c099f8 libjvm.dylib`::JVM_TakeVirtualThreadListToUnblock(env=0x000000012b0a8f00, ignored=0x000000013000f630) at javanextvmi.cpp:677:9
    frame #7: 0x0000000104b523b4 libjvm.dylib`JVM_TakeVirtualThreadListToUnblock(env=0x000000012b0a8f00, ignored=0x000000013000f630) at generated.c:8664:9
    frame #8: 0x00000001052fd2ac libj9vm29.dylib`ffi_call_SYSV + 76
    frame #9: 0x00000001052fc454 libj9vm29.dylib`ffi_call_int(cif=0x000000016b985170, fn=(libjvm.dylib`JVM_TakeVirtualThreadListToUnblock at generated.c:8647), orig_rvalue=0x000000012b0a9018, avalue=0x000000016b9852b8, closure=0x0000000000000000) at ffi.c:829:3
    frame #10: 0x00000001052fbe1c libj9vm29.dylib`ffi_call(cif=0x000000016b985170, fn=(libjvm.dylib`JVM_TakeVirtualThreadListToUnblock at generated.c:8647), rvalue=0x000000012b0a9018, avalue=0x000000016b9852b8) at ffi.c:838:3
    frame #11: 0x00000001051eb23c libj9vm29.dylib`VM_BytecodeInterpreterFull::cJNICallout(this=0x000000016b986798, _sp=0x000000016b986750, _pc=<no value available>, receiverAddress=0x000000013000f630, javaArgs=0x00000001498cd700, returnType="\tH#\xb5\U00000004\U00000001", returnStorage=0x000000012b0a9018, function=0x0000000104b52348, isStatic=true) at BytecodeInterpreter.hpp:2741:5
    frame #12: 0x00000001051eac80 libj9vm29.dylib`VM_BytecodeInterpreterFull::callCFunction(this=0x000000016b986798, _sp=0x000000016b986750, _pc=<no value available>, jniMethodStartAddress=0x0000000104b52348, receiverAddress=0x000000013000f630, javaArgs=0x00000001498cd6f8, bp=0x000000016b985590, isStatic=true, returnType="\tH#\xb5\U00000004\U00000001") at BytecodeInterpreter.hpp:2559:23
    frame #13: 0x00000001051d64ec libj9vm29.dylib`VM_BytecodeInterpreterFull::runJNINative(this=0x000000016b986798, _sp=0x000000016b986750, _pc=<no value available>) at BytecodeInterpreter.hpp:2447:9

* thread #19
  * frame #0: 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000019bc30894 libsystem_pthread.dylib`_pthread_cond_wait + 1204
    frame #2: 0x0000000104c6c77c libj9thr29.dylib`omrthread_park(millis=0, nanos=0) at omrthread.c:3312:4
    frame #3: 0x00000001051716c4 libj9vm29.dylib`::timeCompensationHelper(vmThread=0x00000001498d6500, threadHelperType='\x03', monitor=0x0000000000000000, millis=0, nanos=0) at threadhelp.cpp:455:8
    frame #4: 0x00000001051720a0 libj9vm29.dylib`::threadParkImpl(vmThread=0x00000001498d6500, timeoutIsEpochRelative=0, timeout=0) at threadpark.cpp:104:9
    frame #5: 0x000000010579bd2c libjclse29.dylib`::Java_sun_misc_Unsafe_park(env=0x00000001498d6500, receiver=0x00000001498d5f58, isAbsolute='\0', time=0) at sun_misc_Unsafe.cpp:365:2

* thread #20
  * frame #0: 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000019bc30894 libsystem_pthread.dylib`_pthread_cond_wait + 1204
    frame #2: 0x0000000104c6d168 libj9thr29.dylib`monitor_enter_three_tier(self=0x00000001498d3d58, monitor=0x000000012b06a4f0, isAbortable=0) at omrthread.c:4058:3
    frame #3: 0x0000000104c7310c libj9thr29.dylib`monitor_wait_original(self=0x00000001498d3d58, monitor=0x000000012b06a4f0, millis=16, nanos=0, interruptible=0) at omrthread.c:4763:6
    frame #4: 0x0000000104c6ed4c libj9thr29.dylib`monitor_wait(monitor=0x000000012b06a4f0, millis=16, nanos=0, interruptible=0) at omrthread.c:4531:10
    frame #5: 0x0000000104c6ee04 libj9thr29.dylib`omrthread_monitor_wait_timed(monitor=0x000000012b06a4f0, millis=16, nanos=0) at omrthread.c:4486:9
    frame #6: 0x0000000105152c94 libj9vm29.dylib`::objectMonitorEnterBlocking(currentThread=0x000000012b0d6d00) at ObjectMonitor.cpp:282:4
    frame #7: 0x00000001051e06c4 libj9vm29.dylib`VM_BytecodeInterpreterFull::enterObjectMonitor(this=0x000000016ba68938, _sp=0x000000016ba688f0, _pc=<no value available>, obj=0x000000030030c928) at BytecodeInterpreter.hpp:1215:11
    frame #8: 0x00000001051de10c libj9vm29.dylib`VM_BytecodeInterpreterFull::monitorenter(this=0x000000016ba68938, _sp=0x000000016ba688f0, _pc=<no value available>) at BytecodeInterpreter.hpp:8925:22
    frame #9: 0x00000001051bfa18 libj9vm29.dylib`VM_BytecodeInterpreterFull::run(this=0x000000016ba68938, vmThread=0x000000012b0d6d00) at BytecodeInterpreter.hpp:11983:4
    frame #10: 0x000000010519f2ac libj9vm29.dylib`::bytecodeLoopFull(currentThread=0x000000012b0d6d00) at BytecodeInterpreter.inc:112:21
    frame #11: 0x00000001052510ec libj9vm29.dylib`cInterpreter + 16
    frame #12: 0x0000000105173554 libj9vm29.dylib`::native2InterpJavaUpcall0(data=<unavailable>, argsListPointer=<unavailable>) at UpcallVMHelpers.cpp:65:2
    frame #13: 0x0000000104b4004c
    frame #14: 0x00000001052fc454 libj9vm29.dylib`ffi_call_int(cif=0x000000015a00e670, fn=(libVThreadPinner.dylib`call at libVThreadPinner.c:32:5), orig_rvalue=0x000000012b0d6e18, avalue=0x000000016ba69558, closure=0x0000000000000000) at ffi.c:829:3
    frame #15: 0x00000001052fbe1c libj9vm29.dylib`ffi_call(cif=0x000000015a00e670, fn=(libVThreadPinner.dylib`call at libVThreadPinner.c:32:5), rvalue=0x000000012b0d6e18, avalue=0x000000016ba69558) at ffi.c:838:3
    frame #16: 0x00000001051725d4 libj9vm29.dylib`::ffiCallWithSetJmpForUpcall(currentThread=0x000000012b0d6d00, cif=0x000000015a00e670, function=0x0000000104ccbfb4, returnStorage=0x000000012b0d6e18, values=0x000000016ba69558) at UpcallExceptionHandler.cpp:73:3
    frame #17: 0x00000001051d5470 libj9vm29.dylib`VM_BytecodeInterpreterFull::inlInternalDowncallHandlerInvokeNative(this=0x000000016ba6a798, _sp=0x000000016ba6a750, _pc=<no value available>) at BytecodeInterpreter.hpp:5610:3
    frame #18: 0x00000001051ad9cc libj9vm29.dylib`VM_BytecodeInterpreterFull::run(this=0x000000016ba6a798, vmThread=0x000000012b0d6d00) at BytecodeInterpreter.hpp:11235:3

* thread #22
  * frame #0: 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000019bc30894 libsystem_pthread.dylib`_pthread_cond_wait + 1204
    frame #2: 0x0000000104c6d168 libj9thr29.dylib`monitor_enter_three_tier(self=0x000000012b0ed650, monitor=0x000000012b06a4f0, isAbortable=0) at omrthread.c:4058:3
    frame #3: 0x0000000104c7310c libj9thr29.dylib`monitor_wait_original(self=0x000000012b0ed650, monitor=0x000000012b06a4f0, millis=16, nanos=0, interruptible=0) at omrthread.c:4763:6
    frame #4: 0x0000000104c6ed4c libj9thr29.dylib`monitor_wait(monitor=0x000000012b06a4f0, millis=16, nanos=0, interruptible=0) at omrthread.c:4531:10
    frame #5: 0x0000000104c6ee04 libj9thr29.dylib`omrthread_monitor_wait_timed(monitor=0x000000012b06a4f0, millis=16, nanos=0) at omrthread.c:4486:9
    frame #6: 0x0000000105152c94 libj9vm29.dylib`::objectMonitorEnterBlocking(currentThread=0x000000012b0f0300) at ObjectMonitor.cpp:282:4
    frame #7: 0x00000001051e06c4 libj9vm29.dylib`VM_BytecodeInterpreterFull::enterObjectMonitor(this=0x000000016bb00938, _sp=0x000000016bb008f0, _pc=<no value available>, obj=0x000000030030c928) at BytecodeInterpreter.hpp:1215:11
    frame #8: 0x00000001051de10c libj9vm29.dylib`VM_BytecodeInterpreterFull::monitorenter(this=0x000000016bb00938, _sp=0x000000016bb008f0, _pc=<no value available>) at BytecodeInterpreter.hpp:8925:22
    frame #9: 0x00000001051bfa18 libj9vm29.dylib`VM_BytecodeInterpreterFull::run(this=0x000000016bb00938, vmThread=0x000000012b0f0300) at BytecodeInterpreter.hpp:11983:4
    frame #10: 0x000000010519f2ac libj9vm29.dylib`::bytecodeLoopFull(currentThread=0x000000012b0f0300) at BytecodeInterpreter.inc:112:21
    frame #11: 0x00000001052510ec libj9vm29.dylib`cInterpreter + 16
    frame #12: 0x0000000105173554 libj9vm29.dylib`::native2InterpJavaUpcall0(data=<unavailable>, argsListPointer=<unavailable>) at UpcallVMHelpers.cpp:65:2
    frame #13: 0x0000000104b4004c
    frame #14: 0x00000001052fc454 libj9vm29.dylib`ffi_call_int(cif=0x000000015a00e670, fn=(libVThreadPinner.dylib`call at libVThreadPinner.c:32:5), orig_rvalue=0x000000012b0f0418, avalue=0x000000016bb01558, closure=0x0000000000000000) at ffi.c:829:3
    frame #15: 0x00000001052fbe1c libj9vm29.dylib`ffi_call(cif=0x000000015a00e670, fn=(libVThreadPinner.dylib`call at libVThreadPinner.c:32:5), rvalue=0x000000012b0f0418, avalue=0x000000016bb01558) at ffi.c:838:3
    frame #16: 0x00000001051725d4 libj9vm29.dylib`::ffiCallWithSetJmpForUpcall(currentThread=0x000000012b0f0300, cif=0x000000015a00e670, function=0x0000000104ccbfb4, returnStorage=0x000000012b0f0418, values=0x000000016bb01558) at UpcallExceptionHandler.cpp:73:3
    frame #17: 0x00000001051d5470 libj9vm29.dylib`VM_BytecodeInterpreterFull::inlInternalDowncallHandlerInvokeNative(this=0x000000016bb02798, _sp=0x000000016bb02750, _pc=<no value available>) at BytecodeInterpreter.hpp:5610:3

* thread #23
  * frame #0: 0x000000019bbf26ec libsystem_kernel.dylib`__psynch_cvwait + 8
    frame #1: 0x000000019bc30894 libsystem_pthread.dylib`_pthread_cond_wait + 1204
    frame #2: 0x0000000104c6d168 libj9thr29.dylib`monitor_enter_three_tier(self=0x000000012b0edb58, monitor=0x000000012b06a4f0, isAbortable=0) at omrthread.c:4058:3
    frame #3: 0x0000000104c7310c libj9thr29.dylib`monitor_wait_original(self=0x000000012b0edb58, monitor=0x000000012b06a4f0, millis=16, nanos=0, interruptible=0) at omrthread.c:4763:6
    frame #4: 0x0000000104c6ed4c libj9thr29.dylib`monitor_wait(monitor=0x000000012b06a4f0, millis=16, nanos=0, interruptible=0) at omrthread.c:4531:10
    frame #5: 0x0000000104c6ee04 libj9thr29.dylib`omrthread_monitor_wait_timed(monitor=0x000000012b06a4f0, millis=16, nanos=0) at omrthread.c:4486:9
    frame #6: 0x0000000105152c94 libj9vm29.dylib`::objectMonitorEnterBlocking(currentThread=0x000000012b0f6b00) at ObjectMonitor.cpp:282:4
    frame #7: 0x00000001051e06c4 libj9vm29.dylib`VM_BytecodeInterpreterFull::enterObjectMonitor(this=0x000000016bb4c938, _sp=0x000000016bb4c8f0, _pc=<no value available>, obj=0x000000030030c928) at BytecodeInterpreter.hpp:1215:11
    frame #8: 0x00000001051de10c libj9vm29.dylib`VM_BytecodeInterpreterFull::monitorenter(this=0x000000016bb4c938, _sp=0x000000016bb4c8f0, _pc=<no value available>) at BytecodeInterpreter.hpp:8925:22
    frame #9: 0x00000001051bfa18 libj9vm29.dylib`VM_BytecodeInterpreterFull::run(this=0x000000016bb4c938, vmThread=0x000000012b0f6b00) at BytecodeInterpreter.hpp:11983:4
    frame #10: 0x000000010519f2ac libj9vm29.dylib`::bytecodeLoopFull(currentThread=0x000000012b0f6b00) at BytecodeInterpreter.inc:112:21
    frame #11: 0x00000001052510ec libj9vm29.dylib`cInterpreter + 16
    frame #12: 0x0000000105173554 libj9vm29.dylib`::native2InterpJavaUpcall0(data=<unavailable>, argsListPointer=<unavailable>) at UpcallVMHelpers.cpp:65:2
    frame #13: 0x0000000104b4004c
    frame #14: 0x00000001052fc454 libj9vm29.dylib`ffi_call_int(cif=0x000000015a00e670, fn=(libVThreadPinner.dylib`call at libVThreadPinner.c:32:5), orig_rvalue=0x000000012b0f6c18, avalue=0x000000016bb4d558, closure=0x0000000000000000) at ffi.c:829:3
    frame #15: 0x00000001052fbe1c libj9vm29.dylib`ffi_call(cif=0x000000015a00e670, fn=(libVThreadPinner.dylib`call at libVThreadPinner.c:32:5), rvalue=0x000000012b0f6c18, avalue=0x000000016bb4d558) at ffi.c:838:3
    frame #16: 0x00000001051725d4 libj9vm29.dylib`::ffiCallWithSetJmpForUpcall(currentThread=0x000000012b0f6b00, cif=0x000000015a00e670, function=0x0000000104ccbfb4, returnStorage=0x000000012b0f6c18, values=0x000000016bb4d558) at UpcallExceptionHandler.cpp:73:3
    frame #17: 0x00000001051d5470 libj9vm29.dylib`VM_BytecodeInterpreterFull::inlInternalDowncallHandlerInvokeNative(this=0x000000016bb4e798, _sp=0x000000016bb4e750, _pc=<no value available>) at BytecodeInterpreter.hpp:5610:3
    frame #18: 0x00000001051ad9cc libj9vm29.dylib`VM_BytecodeInterpreterFull::run(this=0x000000016bb4e798, vmThread=0x000000012b0f6b00) at BytecodeInterpreter.hpp:11235:3

It was built from 1652d8b

@JasonFengJ9
Copy link
Member

Tried the testcase with the draft PR

The assertion failure occurred:

17:34:17.243 0x101022f00    j9vm.225    *   ** ASSERTION FAILED ** at /Users/jasonfeng/ivm/builds/jdk24-vt3-tobi-0328/openj9-openjdk-jdk24/openj9/runtime/vm/ContinuationHelpers.cpp:1106: (!(monitor->owner == currentThread->osThread))

The stacktrace is as following:

  * frame #0: 0x0000000100698d94 libj9vm29.dylib`::preparePinnedVirtualThreadForUnmount(currentThread=0x000000011cea0900, syncObj=0x000000030030cd00, isObjectWait=0) at ContinuationHelpers.cpp:1106:5
    frame #1: 0x00000001006daab4 libj9vm29.dylib`VM_BytecodeInterpreterFull::enterObjectMonitor(this=0x000000017045a798, _sp=0x000000017045a750, _pc=<no value available>, obj=0x000000030030cd00) at BytecodeInterpreter.hpp:1207:11
    frame #2: 0x00000001006d8544 libj9vm29.dylib`VM_BytecodeInterpreterFull::monitorenter(this=0x000000017045a798, _sp=0x000000017045a750, _pc=<no value available>) at BytecodeInterpreter.hpp:8925:22
    frame #3: 0x00000001006b9e50 libj9vm29.dylib`VM_BytecodeInterpreterFull::run(this=0x000000017045a798, vmThread=0x000000011cea0900) at BytecodeInterpreter.hpp:11983:4
    frame #4: 0x00000001006996e4 libj9vm29.dylib`::bytecodeLoopFull(currentThread=0x000000011cea0900) at BytecodeInterpreter.inc:112:21
    frame #5: 0x000000010074b524 libj9vm29.dylib`cInterpreter + 16
    frame #6: 0x0000000100681268 libj9vm29.dylib`javaProtectedThreadProc(portLibrary=0x0000000100229f70, entryarg=0x000000011cea0900) at vmthread.cpp:2153:3
    frame #7: 0x000000010033f010 libj9prt29.dylib`omrsig_protect(portLibrary=0x0000000100229f70, fn=(libj9vm29.dylib`javaProtectedThreadProc(J9PortLibrary*, void*) at vmthread.cpp:2133), fn_arg=0x000000011cea0900, handler=(libj9vm29.dylib`structuredSignalHandler at gphandle.c:702), handler_arg=0x000000011cea0900, flags=506, result=0x000000017045af68) at omrsignal.c:425:12
    frame #8: 0x0000000100681168 libj9vm29.dylib`::javaThreadProc(entryarg=0x000000011d01a820) at vmthread.cpp:414:2
    frame #9: 0x00000001001abcf4 libj9thr29.dylib`thread_wrapper(arg=0x000000011ce9dc50) at omrthread.c:1733:2
    frame #10: 0x000000019bc302e4 libsystem_pthread.dylib`_pthread_start + 136

@JasonFengJ9
Copy link
Member

Passed with a recent build.

openjdk version "24-internal" 2025-03-18
OpenJDK Runtime Environment (slowdebug build 24-internal-adhoc.jasonfeng.openj9-openjdk-jdk24)
Eclipse OpenJ9 VM (slowdebug build master-3b892dc225, JRE 24 Mac OS X aarch64-64-Bit 20250401_000000 (JIT enabled, AOT enabled)
OpenJ9   - 3b892dc225
OMR      - cd707e281
JCL      - 61842e354 based on jdk-24+36)

Re-enabling the test

@pshipton pshipton reopened this Apr 1, 2025
@pshipton
Copy link
Member Author

pshipton commented Apr 1, 2025

Waiting for unexclude in 1.06

@JasonFengJ9
Copy link
Member

JasonFengJ9 commented Apr 1, 2025

Just realized that the test was run with -Xint -Xgcpolicy:nogc as per #20955 (comment), it still fails w/o it.
Re-opening, will have to re-exclude the test.

Unhandled exception
Type=Segmentation error vmState=0x00000000
J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000002
Handler1=0000000102A3DF28 Handler2=00000001026B49AC InaccessibleAddress=0000000000000000
x0=000000013C169CE0 x1=000000016E996750 x2=000000016E996748 x3=0000000000000003
x4=0000000000000000 x5=0000000000000001 x6=0000000000000000 x7=0000000000000000
x8=000000013C169CE0 x9=000000016E996798 x10=0000000000000000 x11=000000013C169CC0
x12=000000016E996750 x13=0000000000000000 x14=0000000000004E00 x15=00004E0000004F00
x16=0000000102B06738 x17=00000001F0B6C0F0 x18=0000000000000000 x19=000000013C83CF00
x20=000000013C169C50 x21=0000000102A70DC4 x22=0000000000000000 x23=0000000130248300
x24=00000001026FD9BC x25=0000000102700C70 x26=0000000000000058 x27=000000013D015220
x28=0000000102AC4F20 x29(FP)=000000016E995530 x30(LR)=0000000102B06560 x31(SP)=000000016E9954F0
PC=0000000102B06588 SP=000000016E9954F0
v0=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v1=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v2=00000000cc752b72 (f: 3430230784.000000, d: 1.694759e-314)
v3=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v4=eff7d0c1168f6bdc (f: 378498016.000000, d: -2.310869e+231)
v5=000000002a8925a7 (f: 713631168.000000, d: 3.525806e-315)
v6=94446f0194446f01 (f: 2487512832.000000, d: -4.855772e-211)
v7=000e1781000e1781 (f: 923521.000000, d: 1.959708e-308)
v8=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v9=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v10=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v11=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v12=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v13=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v14=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v15=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v16=bfd0000000000000 (f: 0.000000, d: -2.500000e-01)
v17=3fd557e2d09d3555 (f: 3499963648.000000, d: 3.334891e-01)
v18=bf446d7b72ea5cb4 (f: 1927961728.000000, d: -6.234029e-04)
v19=3fe62e42fefa39ef (f: 4277811712.000000, d: 6.931472e-01)
v20=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v21=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v22=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v23=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v24=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v25=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v26=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v27=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v28=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v29=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v30=692e396a6e65706f (f: 1852141696.000000, d: 4.518592e+198)
v31=6d654d2f6e676965 (f: 1852270976.000000, d: 9.399336e+218)
Module=/Users/jasonfeng/ivm/builds/jdk24-master-debug-0401/openj9-openjdk-jdk24/build/macosx-aarch64-server-slowdebug/images/jdk/lib/default/libj9vm29.dylib
Module_base_address=0000000102A08000 Symbol=_ZN26VM_BytecodeInterpreterFull29buildInternalNativeStackFrameERPmRPh
Symbol_address=0000000102B06500
Target=2_90_20250401_000000 (Mac OS X 15.3.2)
CPU=aarch64 (10 logical CPUs) (0x800000000 RAM)
----------- Stack Backtrace -----------
---------------------------------------
JVMDUMP039I Processing dump event "gpf", detail "" at 2025/04/01 15:16:05 - please wait.

With -Xgcpolicy:nogc

Unhandled exception
Type=Segmentation error vmState=0x00000000
J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000002
Handler1=0000000102A3DF28 Handler2=00000001026B49AC InaccessibleAddress=0000000000000000
x0=000000013C169CE0 x1=000000016E996750 x2=000000016E996748 x3=0000000000000003
x4=0000000000000000 x5=0000000000000001 x6=0000000000000000 x7=0000000000000000
x8=000000013C169CE0 x9=000000016E996798 x10=0000000000000000 x11=000000013C169CC0
x12=000000016E996750 x13=0000000000000000 x14=0000000000004E00 x15=00004E0000004F00
x16=0000000102B06738 x17=00000001F0B6C0F0 x18=0000000000000000 x19=000000013C83CF00
x20=000000013C169C50 x21=0000000102A70DC4 x22=0000000000000000 x23=0000000130248300
x24=00000001026FD9BC x25=0000000102700C70 x26=0000000000000058 x27=000000013D015220
x28=0000000102AC4F20 x29(FP)=000000016E995530 x30(LR)=0000000102B06560 x31(SP)=000000016E9954F0
PC=0000000102B06588 SP=000000016E9954F0
v0=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v1=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v2=00000000cc752b72 (f: 3430230784.000000, d: 1.694759e-314)
v3=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v4=eff7d0c1168f6bdc (f: 378498016.000000, d: -2.310869e+231)
v5=000000002a8925a7 (f: 713631168.000000, d: 3.525806e-315)
v6=94446f0194446f01 (f: 2487512832.000000, d: -4.855772e-211)
v7=000e1781000e1781 (f: 923521.000000, d: 1.959708e-308)
v8=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v9=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v10=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v11=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v12=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v13=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v14=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v15=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v16=bfd0000000000000 (f: 0.000000, d: -2.500000e-01)
v17=3fd557e2d09d3555 (f: 3499963648.000000, d: 3.334891e-01)
v18=bf446d7b72ea5cb4 (f: 1927961728.000000, d: -6.234029e-04)
v19=3fe62e42fefa39ef (f: 4277811712.000000, d: 6.931472e-01)
v20=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v21=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v22=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v23=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v24=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v25=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v26=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v27=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v28=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v29=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v30=692e396a6e65706f (f: 1852141696.000000, d: 4.518592e+198)
v31=6d654d2f6e676965 (f: 1852270976.000000, d: 9.399336e+218)
Module=/Users/jasonfeng/ivm/builds/jdk24-master-debug-0401/openj9-openjdk-jdk24/build/macosx-aarch64-server-slowdebug/images/jdk/lib/default/libj9vm29.dylib
Module_base_address=0000000102A08000 Symbol=_ZN26VM_BytecodeInterpreterFull29buildInternalNativeStackFrameERPmRPh
Symbol_address=0000000102B06500
Target=2_90_20250401_000000 (Mac OS X 15.3.2)
CPU=aarch64 (10 logical CPUs) (0x800000000 RAM)
----------- Stack Backtrace -----------
---------------------------------------
JVMDUMP039I Processing dump event "gpf", detail "" at 2025/04/01 15:16:05 - please wait.

@JasonFengJ9
Copy link
Member

With -Xgcpolicy:nogc -XX:+YieldPinnedVirtualThread, JIT is on

  * frame #0: 0x00000001006da1e8 libj9vm29.dylib`VM_BytecodeInterpreterFull::buildInternalNativeStackFrame(this=0x0000000170d7e798, _sp=0x0000000170d7e750, _pc=<no value available>) at BytecodeInterpreter.hpp:487:18
    frame #1: 0x00000001006d9f58 libj9vm29.dylib`VM_BytecodeInterpreterFull::enterObjectMonitor(this=0x0000000170d7e798, _sp=0x0000000170d7e750, _pc=<no value available>, obj=0x0000000300b95960) at BytecodeInterpreter.hpp:1204:6
    frame #2: 0x00000001006d7a0c libj9vm29.dylib`VM_BytecodeInterpreterFull::monitorenter(this=0x0000000170d7e798, _sp=0x0000000170d7e750, _pc=<no value available>) at BytecodeInterpreter.hpp:8925:22
    frame #3: 0x00000001006b9318 libj9vm29.dylib`VM_BytecodeInterpreterFull::run(this=0x0000000170d7e798, vmThread=0x0000000129025500) at BytecodeInterpreter.hpp:11983:4
    frame #4: 0x0000000100698bac libj9vm29.dylib`::bytecodeLoopFull(currentThread=0x0000000129025500) at BytecodeInterpreter.inc:112:21
    frame #5: 0x000000010074a9ec libj9vm29.dylib`cInterpreter + 16
(lldb) p _sendMethod
(J9Method *) $0 = nullptr. --> EXC_BAD_ACCESS at J9_ROM_METHOD_FROM_RAM_METHOD(_sendMethod)->argCount

With -Xint -XX:+YieldPinnedVirtualThread, GC is enabled

* thread #24, stop reason = EXC_BAD_ACCESS (code=2, address=0x1704fbff8)
  * frame #0: 0x000000010077d5a4 libj9vm29.dylib`outputStackMap(liveStack=0x0000000170537fe8, newStackDescription=0x2000600003ee7260, bits=18446744073709520897) at stackmap.c:574:28
    frame #1: 0x000000010077bd54 libj9vm29.dylib`j9stackmap_StackBitsForPC(portLib=0x0000000100229f70, pc=7, romClass=0x0000000151578020, romMethod=0x00000001515789a8, resultArrayBase=0x0000600003ee8160, resultArraySize=18446744073709551615, userData=0x000000014c014820, getBuffer=(libj9vm29.dylib`j9mapmemory_GetBuffer at mapmemorybuffer.c:45), releaseBuffer=(libj9vm29.dylib`j9mapmemory_ReleaseBuffer at mapmemorybuffer.c:71)) at stackmap.c:136:8
    frame #2: 0x000000010066a01c libj9vm29.dylib`getStackMap(walkState=0x0000000170539660, romClass=0x0000000151578020, romMethod=0x00000001515789a8, offsetPC=7, pushCount=18446744073709551615, result=0x0000600003ee8160) at swalk.c:1555:14
    frame #3: 0x0000000100669be4 libj9vm29.dylib`walkBytecodeFrameSlots(walkState=0x0000000170539660, method=0x00000001515a08a8, offsetPC=7, pendingBase=0x000000014d3780a8, pendingStackHeight=18446744073709551615, localBase=0x000000014d3780e0, numberOfLocals=4, alwaysLocalMap=0) at swalk.c:932:3
    frame #4: 0x0000000100669380 libj9vm29.dylib`walkBytecodeFrame(walkState=0x0000000170539660) at swalk.c:1035:4
    frame #5: 0x00000001006680a8 libj9vm29.dylib`walkStackFrames(currentThread=0x000000014d37c300, walkState=0x0000000170539660) at swalk.c:353:6
    frame #6: 0x00000001006969ac libj9vm29.dylib`::walkContinuationStackFrames(currentThread=0x000000014d37c300, continuation=0x000000014c806e20, threadObject=0x0000000000000000, walkState=0x0000000170539660) at ContinuationHelpers.cpp:546:8
    frame #7: 0x00000001010d8a60 libj9gc29.dylib`GC_VMThreadStackSlotIterator::scanContinuationSlots(vmThread=0x000000014d37c300, continuationObjectPtr=0x00000004ffee7cc8, userData=0x00000001705399a8, oSlotIterator=(libj9gc29.dylib`stackSlotIteratorForScavenge(J9JavaVM*, J9Object**, void*, J9StackWalkState*, void const*) at ScavengerDelegate.cpp:367), includeStackFrameClassReferences=false, trackVisibleFrameDepth=false)(J9JavaVM*, J9Object**, void*, J9StackWalkState*, void const*), bool, bool) at VMThreadStackSlotIterator.cpp:152:2
    frame #8: 0x000000010108a11c libj9gc29.dylib`MM_ScavengerDelegate::scanContinuationNativeSlots(this=0x000000014c00e280, env=0x000000014d37e268, objectPtr=0x00000004ffee7cc8, reason=SCAN_REASON_SCAVENGE, beingMounted=false) at ScavengerDelegate.cpp:395:3
    frame #9: 0x000000010108b72c libj9gc29.dylib`MM_ScavengerDelegate::getObjectScanner(this=0x000000014c00e280, env=0x000000014d37e268, objectPtr=0x00000004ffee7cc8, allocSpace=0x0000000150129cf8, flags=2, reason=SCAN_REASON_SCAVENGE, shouldRemember=0x0000000150129dd0) at ScavengerDelegate.cpp:496:21
    frame #10: 0x000000010102116c libj9gc29.dylib`MM_Scavenger::incrementalScanCacheBySlot(MM_EnvironmentStandard*, MM_CopyScanCacheStandard*) [inlined] MM_Scavenger::getObjectScanner(this=0x000000014c00e220, env=0x000000014d37e268, objectptr=0x00000004ffee7cc8, objectScannerState=0x0000000150129cf8, flags=2, reason=SCAN_REASON_SCAVENGE, shouldRemember=0x0000000150129dd0) at Scavenger.cpp:1902:19
    frame #11: 0x000000010102114c libj9gc29.dylib`MM_Scavenger::incrementalScanCacheBySlot(MM_EnvironmentStandard*, MM_CopyScanCacheStandard*) [inlined] MM_Scavenger::incrementalScavengeObjectSlots(this=0x000000014c00e220, env=0x000000014d37e268, objectPtr=0x00000004ffee7cc8, scanCache=0x0000000150129cc0) at Scavenger.cpp:2136:20
    frame #12: 0x00000001010210c0 libj9gc29.dylib`MM_Scavenger::incrementalScanCacheBySlot(this=0x000000014c00e220, env=0x000000014d37e268, scanCache=0x0000000150129cc0) at Scavenger.cpp:2491:46
    frame #13: 0x0000000101022df8 libj9gc29.dylib`MM_Scavenger::completeScan(this=0x000000014c00e220, env=0x000000014d37e268) at Scavenger.cpp:2567:4
    frame #14: 0x0000000101023254 libj9gc29.dylib`MM_Scavenger::workThreadGarbageCollect(this=0x000000014c00e220, env=0x000000014d37e268) at Scavenger.cpp:2611:5
    frame #15: 0x0000000101006bfc libj9gc29.dylib`MM_ParallelScavengeTask::run(this=0x000000017053b6c0, envBase=0x000000014d37e268) at ParallelScavengeTask.cpp:38:14
    frame #16: 0x0000000100f68674 libj9gc29.dylib`MM_ParallelDispatcher::run(this=0x00006000012e02c0, env=0x000000014d37e268, task=0x000000017053b6c0, newThreadCount=18446744073709551615) at ParallelDispatcher.cpp:599:8
    frame #17: 0x0000000101014954 libj9gc29.dylib`MM_Scavenger::scavenge(this=0x000000014c00e220, envBase=0x000000014d37e268) at Scavenger.cpp:602:15
    frame #18: 0x0000000101034fac libj9gc29.dylib`MM_Scavenger::mainThreadGarbageCollect(this=0x000000014c00e220, envBase=0x000000014d37e268, allocDescription=0x000000017053ce88, initMarkMap=false, rebuildMarkBits=false) at Scavenger.cpp:4275:3
    frame #19: 0x0000000101038e1c libj9gc29.dylib`MM_Scavenger::internalGarbageCollect(this=0x000000014c00e220, envBase=0x000000014d37e268, subSpace=0x000000014b713460, allocDescription=0x000000017053ce88) at Scavenger.cpp:4795:3
    frame #20: 0x0000000100f16488 libj9gc29.dylib`MM_Collector::garbageCollect(this=0x000000014c00e220, env=0x000000014d37e268, callingSubSpace=0x000000014b713460, allocateDescription=0x000000017053ce88, gcCode=0, objectAllocationInterface=0x000000014c807030, baseSubSpace=0x000000014b713460, context=0x0000000000000000) at Collector.cpp:505:17
    frame #21: 0x000000010100006c libj9gc29.dylib`MM_MemorySubSpaceSemiSpace::allocationRequestFailed(this=0x000000014b713460, env=0x000000014d37e268, allocateDescription=0x000000017053ce88, allocationType=ALLOCATION_TYPE_TLH, objectAllocationInterface=0x000000014c807030, baseSubSpace=0x000000014b7131e0, previousSubSpace=0x000000014b7131e0) at MemorySubSpaceSemiSpace.cpp:137:21
    frame #22: 0x0000000100f5c01c libj9gc29.dylib`MM_MemorySubSpaceGeneric::allocateTLH(this=0x000000014b7131e0, env=0x000000014d37e268, allocDescription=0x000000017053ce88, objectAllocationInterface=0x000000014c807030, baseSubSpace=0x0000000000000000, previousSubSpace=0x0000000000000000, shouldCollectOnFailure=true) at MemorySubSpaceGeneric.cpp:377:24
    frame #23: 0x0000000100f7c608 libj9gc29.dylib`MM_TLHAllocationSupport::refresh(this=0x000000014c8070e8, env=0x000000014d37e268, allocDescription=0x000000017053ce88, shouldCollectOnFailure=true) at TLHAllocationSupport.cpp:210:36
    frame #24: 0x0000000100f7d664 libj9gc29.dylib`MM_TLHAllocationSupport::allocateFromTLH(this=0x000000014c8070e8, env=0x000000014d37e268, allocDescription=0x000000017053ce88, shouldCollectOnFailure=true) at TLHAllocationSupport.cpp:279:3
    frame #25: 0x0000000100f7a4d8 libj9gc29.dylib`MM_TLHAllocationInterface::allocateFromTLH(this=0x000000014c807030, env=0x000000014d37e268, allocDescription=0x000000017053ce88, shouldCollectOnFailure=true) at TLHAllocationInterface.cpp:148:34
    frame #26: 0x0000000100f7a8c8 libj9gc29.dylib`MM_TLHAllocationInterface::allocateObject(this=0x000000014c807030, env=0x000000014d37e268, allocDescription=0x000000017053ce88, memorySpace=0x0000600001ee5220, shouldCollectOnFailure=true) at TLHAllocationInterface.cpp:183:12
    frame #27: 0x0000000100f85f88 libj9gc29.dylib`OMR_GC_AllocateObject(OMR_VMThread*, MM_AllocateInitialization*) at AllocateInitialization.hpp:199:50
    frame #28: 0x0000000100f85d1c libj9gc29.dylib`OMR_GC_AllocateObject(omrVMThread=0x000000014d37ce30, allocator=0x000000017053ce78) at omrgcalloc.cpp:39:20
    frame #29: 0x00000001010e3da8 libj9gc29.dylib`::J9AllocateObject(vmThread=0x000000014d37c300, clazz=0x000000014013ac00, allocateFlags=1) at mgcalloc.cpp:427:15
    frame #30: 0x00000001006e6068 libj9vm29.dylib`VM_BytecodeInterpreterFull::newLogic(this=0x000000017053e798, _sp=0x000000017053e750, _pc=<no value available>, newObject=0x000000017053d5d0) at BytecodeInterpreter.hpp:8657:17
    frame #31: 0x00000001006d700c libj9vm29.dylib`VM_BytecodeInterpreterFull::newdup(this=0x000000017053e798, _sp=0x000000017053e750, _pc=<no value available>) at BytecodeInterpreter.hpp:8718:26
    frame #32: 0x00000001006b87d4 libj9vm29.dylib`VM_BytecodeInterpreterFull::run(this=0x000000017053e798, vmThread=0x000000014d37c300) at BytecodeInterpreter.hpp:11962:4
    frame #33: 0x0000000100698bac libj9vm29.dylib`::bytecodeLoopFull(currentThread=0x000000014d37c300) at BytecodeInterpreter.inc:112:21
    frame #34: 0x000000010074a9ec libj9vm29.dylib`cInterpreter + 16
    frame #35: 0x0000000100680510 libj9vm29.dylib`javaProtectedThreadProc(portLibrary=0x0000000100229f70, entryarg=0x000000014d37c300) at vmthread.cpp:2153:3
    frame #36: 0x000000010033edc4 libj9prt29.dylib`omrsig_protect(portLibrary=0x0000000100229f70, fn=(libj9vm29.dylib`javaProtectedThreadProc(J9PortLibrary*, void*) at vmthread.cpp:2133), fn_arg=0x000000014d37c300, handler=(libj9vm29.dylib`structuredSignalHandler at gphandle.c:702), handler_arg=0x000000014d37c300, flags=506, result=0x000000017053ef68) at omrsignal.c:425:12
    frame #37: 0x0000000100680410 libj9vm29.dylib`::javaThreadProc(entryarg=0x000000014c014820) at vmthread.cpp:414:2
    frame #38: 0x00000001001abcdc libj9thr29.dylib`thread_wrapper(arg=0x000000014d379650) at omrthread.c:1733:2
    frame #39: 0x00000001862c42e4 libsystem_pthread.dylib`_pthread_start + 136

(lldb) p stackTop
(UDATA *) $1 = 0x00000001704fbff8 --> EXC_BAD_ACCESS at *(--stackTop)

@JasonFengJ9
Copy link
Member

Tried latest #21564

  • -Xint -Xgcpolicy:nogc -XX:+YieldPinnedVirtualThread works
  • -Xint -XX:+YieldPinnedVirtualThread works
  • -Xgcpolicy:nogc -XX:+YieldPinnedVirtualThread or just -XX:+YieldPinnedVirtualThread hits a segmentation error with vmState=0x00000000
2025-04-04T00:30:41.672053Z waiting for 200 threads to terminate
Unhandled exception
Type=Segmentation error vmState=0x00000000
J9Generic_Signal_Number=00000018 Signal_Number=0000000b Error_Value=00000000 Signal_Code=00000002
Handler1=000000010156E568 Handler2=000000010129CB94 InaccessibleAddress=0000000000000004
x0=0000000300BCDC10 x1=0000000000000008 x2=0000000300BCDC18 x3=0000000146090902
x4=0000000000000000 x5=0000000000000000 x6=0000000000000000 x7=0000000000000000
x8=0000000000000004 x9=000000014681D300 x10=000000014681D300 x11=0000000000000003
x12=0000000000000100 x13=000000000000AD00 x14=000000000000AC00 x15=0000AC000000AD00
x16=000000016FF2A9D0 x17=0000AD010000AD00 x18=0000000000000000 x19=000000014681D300
x20=00000001458ED680 x21=0000000300BCDC10 x22=00000000DAF90017 x23=000000002E360015
x24=00000000DAFA0017 x25=0000000300371CF0 x26=00000003003E7E00 x27=00000000DAF90017
x28=00000195FE35772D x29(FP)=0000000101291588 x30(LR)=000000011761E61C x31(SP)=000000016FF2A830
PC=0000000000000004 SP=000000016FF2A830
v0=000000016002f488 (f: 1610806400.000000, d: 2.917840e-314)
v1=0000000000000008 (f: 8.000000, d: 3.952525e-323)
v2=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v3=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v4=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v5=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v6=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v7=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v8=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v9=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v10=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v11=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v12=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v13=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v14=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v15=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v16=bfd0000000000000 (f: 0.000000, d: -2.500000e-01)
v17=3fd54f0d3c635555 (f: 1013142848.000000, d: 3.329499e-01)
v18=3f591b7662ef572e (f: 1659852544.000000, d: 1.532426e-03)
v19=3fe62e42fefa39ef (f: 4277811712.000000, d: 6.931472e-01)
v20=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v21=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v22=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v23=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v24=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v25=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v26=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v27=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v28=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v29=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v30=0000000000000000 (f: 0.000000, d: 0.000000e+00)
v31=0000000000000000 (f: 0.000000, d: 0.000000e+00)
Target=2_90_20250403_000000 (Mac OS X 15.3.2)
CPU=aarch64 (10 logical CPUs) (0x800000000 RAM)
----------- Stack Backtrace -----------
---------------------------------------
JVMDUMP039I Processing dump event "gpf", detail "" at 2025/04/03 20:30:41 - please wait.
JVMDUMP032I JVM requested System dump using '/Users/jasonfeng/ivm/jars/virtualthread/vttimeout-src/core.20250403.203041.52220.0001.dmp' in response to an event
JVMDUMP010I System dump written to /Users/jasonfeng/ivm/jars/virtualthread/vttimeout-src/core.20250403.203041.52220.0001.dmp
JVMDUMP032I JVM requested Java dump using '/Users/jasonfeng/ivm/jars/virtualthread/vttimeout-src/javacore.20250403.203041.52220.0002.txt' in response to an event
JVMDUMP010I Java dump written to /Users/jasonfeng/ivm/jars/virtualthread/vttimeout-src/javacore.20250403.203041.52220.0002.txt
JVMDUMP032I JVM requested Snap dump using '/Users/jasonfeng/ivm/jars/virtualthread/vttimeout-src/Snap.20250403.203041.52220.0003.trc' in response to an event
JVMDUMP010I Snap dump written to /Users/jasonfeng/ivm/jars/virtualthread/vttimeout-src/Snap.20250403.203041.52220.0003.trc
JVMDUMP032I JVM requested JIT dump using '/Users/jasonfeng/ivm/jars/virtualthread/vttimeout-src/jitdump.20250403.203041.52220.0004.dmp' in response to an event
JVMDUMP051I JIT dump occurred in 'ForkJoinPool-1-worker-5' thread 0x00000001461E9100
JVMDUMP053I JIT dump is recompiling RetryMonitorEnterWhenPinned.lambda$run$0(Ljava/util/concurrent/CountDownLatch;Ljava/lang/Object;)V
JVMDUMP010I JIT dump written to /Users/jasonfeng/ivm/jars/virtualthread/vttimeout-src/jitdump.20250403.203041.52220.0004.dmp
JVMDUMP013I Processed dump event "gpf", detail "".

Tagging JIT since -Xint passes.

@hzongaro
Copy link
Member

-Xgcpolicy:nogc -XX:+YieldPinnedVirtualThread or just -XX:+YieldPinnedVirtualThread hits a segmentation error with vmState=0x00000000

@JasonFengJ9, do you have a link to a Jenkins build for this failure?

@JasonFengJ9
Copy link
Member

-Xgcpolicy:nogc -XX:+YieldPinnedVirtualThread or just -XX:+YieldPinnedVirtualThread hits a segmentation error with vmState=0x00000000

@JasonFengJ9, do you have a link to a Jenkins build for this failure?

The #21564 resolved the segmentation error, currently there is an intermittent hang, it was said Jack is working a fix.

tajila added a commit to tajila/openj9 that referenced this issue Apr 16, 2025
- Correctly unwind the thread stack frame when re-mounting from
J9VM_CONTINUATION_RETURN_FROM_SYNC_METHOD
- Ensure that all access to blockedVirtualThreadsMutex is done
consistently
- Address infinite loop in takeVirtualThreadListToUnblock if
vm->blockedContinuations is NULL
- Also skip SO check when returning from
J9VM_CONTINUATION_RETURN_FROM_SYNC_METHOD to remain consistent with how
it would behave in the pinning case.

eclipse-openj9#20955
eclipse-openj9#21560
eclipse-openj9#21649
eclipse-openj9#21648
are now passing

eclipse-openj9#21446
eclipse-openj9#21422
no longer crashing

Signed-off-by: tajila <[email protected]>
tajila added a commit to tajila/openj9 that referenced this issue Apr 16, 2025
- Correctly unwind the thread stack frame when re-mounting from
J9VM_CONTINUATION_RETURN_FROM_SYNC_METHOD
- Ensure that all access to blockedVirtualThreadsMutex is done
consistently
- Address infinite loop in takeVirtualThreadListToUnblock if
vm->blockedContinuations is NULL
- Also skip SO check when returning from
J9VM_CONTINUATION_RETURN_FROM_SYNC_METHOD to remain consistent with how
it would behave in the pinning case.

eclipse-openj9#20955
eclipse-openj9#21560
eclipse-openj9#21649
eclipse-openj9#21648
are now passing

eclipse-openj9#21446
eclipse-openj9#21422
no longer crashing

Signed-off-by: tajila <[email protected]>
tajila added a commit to tajila/openj9 that referenced this issue Apr 16, 2025
- Correctly unwind the thread stack frame when re-mounting from
J9VM_CONTINUATION_RETURN_FROM_SYNC_METHOD
- Ensure that all access to blockedVirtualThreadsMutex is done
consistently
- Address infinite loop in takeVirtualThreadListToUnblock if
vm->blockedContinuations is NULL
- Also skip SO check when returning from
J9VM_CONTINUATION_RETURN_FROM_SYNC_METHOD to remain consistent with how
it would behave in the pinning case.

eclipse-openj9#20955
eclipse-openj9#21560
eclipse-openj9#21649
eclipse-openj9#21648
are now passing

eclipse-openj9#21446
eclipse-openj9#21422
no longer crashing

Signed-off-by: tajila <[email protected]>
tajila added a commit to tajila/openj9 that referenced this issue Apr 16, 2025
- Correctly unwind the thread stack frame when re-mounting from
J9VM_CONTINUATION_RETURN_FROM_SYNC_METHOD
- Ensure that all access to blockedVirtualThreadsMutex is done
consistently
- Address infinite loop in takeVirtualThreadListToUnblock if
vm->blockedContinuations is NULL
- Also skip SO check when returning from
J9VM_CONTINUATION_RETURN_FROM_SYNC_METHOD to remain consistent with how
it would behave in the pinning case.

eclipse-openj9#20955
eclipse-openj9#21560
eclipse-openj9#21649
eclipse-openj9#21648
are now passing

eclipse-openj9#21446
eclipse-openj9#21422
no longer crashing

Signed-off-by: tajila <[email protected]>
tajila added a commit to tajila/openj9 that referenced this issue Apr 16, 2025
- Correctly unwind the thread stack frame when re-mounting from
J9VM_CONTINUATION_RETURN_FROM_SYNC_METHOD
- Ensure that all access to blockedVirtualThreadsMutex is done
consistently
- Address infinite loop in takeVirtualThreadListToUnblock if
vm->blockedContinuations is NULL
- Also skip SO check when returning from
J9VM_CONTINUATION_RETURN_FROM_SYNC_METHOD to remain consistent with how
it would behave in the pinning case.

eclipse-openj9#20955
eclipse-openj9#21560
eclipse-openj9#21649
eclipse-openj9#21648
are now passing

eclipse-openj9#21446
eclipse-openj9#21422
no longer crashing

Signed-off-by: tajila <[email protected]>
tajila added a commit to tajila/openj9 that referenced this issue Apr 16, 2025
- Correctly unwind the thread stack frame when re-mounting from
J9VM_CONTINUATION_RETURN_FROM_SYNC_METHOD
- Ensure that all access to blockedVirtualThreadsMutex is done
consistently
- Address infinite loop in takeVirtualThreadListToUnblock if
vm->blockedContinuations is NULL
- Also skip SO check when returning from
J9VM_CONTINUATION_RETURN_FROM_SYNC_METHOD to remain consistent with how
it would behave in the pinning case.

eclipse-openj9#20955
eclipse-openj9#21560
eclipse-openj9#21649
eclipse-openj9#21648
are now passing

eclipse-openj9#21446
eclipse-openj9#21422
no longer crashing

Signed-off-by: tajila <[email protected]>
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

5 participants