-
Notifications
You must be signed in to change notification settings - Fork 710
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
jdk17 Jep389Tests_testClinkerFfi_UpCall Object neither in heap nor stack-allocated in thread main #16410
Comments
I didn't see this before in upcall tests on JDK17 & 19. It doesn't seem likely related to FFI based on the results of dumps.
|
|
|
@ChengJin01 You are looking to wrong thread stack. This is GC Worker thread scans java stack of thread
|
We do have a callin frame built at openj9/runtime/vm/UpcallVMHelpers.cpp Line 246 in d1e10d8
against the callin frame in the stacktrace above:
When setting arguments (including primitive types, struct and pointer) on the java stack, we need to push the allocated struct/pointer objects to the special frame before allocating another struct/pointer object for the next argument if exists in the argument list to avoid updating by GC. According to the test case in native at openj9/runtime/tests/clinkerffi/upcall.c Line 970 in d1e10d8
there are two arguments: arg1( Now the question what should be or was stored in |
There was a crash on jdk19 as well in PR testing, although it may be a different issue. |
As talked to Dmitri, GAC & Jack offline as to how The problem can be easily captured before call-in in the the dispatcher on Linux platform by triggering dumps in the debugger:
The fundamental reason is that
|
The idea is to store the argument objects in native to the java array rather to avoid misusing PUSH_OBJECT_IN_SPECIAL_FRAME so as to stop GC from updating the references before calling into the interpreter in upcall. Fixes: eclipse-openj9#16410, eclipse-openj9#16422 Signed-off-by: ChengJin01 <jincheng@ca.ibm.com>
https://openj9-jenkins.osuosl.org/job/Test_openjdk17_j9_sanity.functional_x86-64_windows_OMR_testList_0/245
Jep389Tests_testClinkerFfi_UpCall_0
https://openj9-artifactory.osuosl.org/artifactory/ci-openj9/Test/Test_openjdk17_j9_sanity.functional_x86-64_windows_OMR_testList_0/245/functional_test_output.tar.gz
This is like #15251 but for jdk17.
@dmitripivkine @ChengJin01 fyi
The text was updated successfully, but these errors were encountered: