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

Fix JNI Local Reference reporting issue #18379

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

LinHu2016
Copy link
Contributor

JNI Local References could be found on the stack(first 8 of them) or from GC_VMThreadJNISlotIterator (vmThread->jniLocalReferences). need to update MM_ReferenceChainWalker::doVMThreadSlot() to report J9GC_ROOT_TYPE_JNI_LOCAL type for the case walkState->slotType = J9_STACKWALK_SLOT_TYPE_JNI_LOCAL.

relate: #18378 and #17712
Signed-off-by: hulin linhu@ca.ibm.com

if (isHeapObject(slotValue) && !_heap->objectIsInGap(slotValue)) {
doSlot(slotPtr, J9GC_ROOT_TYPE_STACK_SLOT, -1, (J9Object *)walkState);
if (J9_STACKWALK_SLOT_TYPE_JNI_LOCAL == ((J9StackWalkState *)walkState)->slotType) {
doSlot(slotPtr, J9GC_ROOT_TYPE_JNI_LOCAL, -1, (J9Object *)walkState);;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double ;;

@amicic
Copy link
Contributor

amicic commented Oct 31, 2023

jenkins test sanity win,aix jdk21

JNI Local References could be found on the stack(first 8 of them) or
from GC_VMThreadJNISlotIterator (vmThread->jniLocalReferences).
need to update MM_ReferenceChainWalker::doVMThreadSlot() to report
J9GC_ROOT_TYPE_JNI_LOCAL type for the case  walkState->slotType =
J9_STACKWALK_SLOT_TYPE_JNI_LOCAL.

Signed-off-by: hulin <linhu@ca.ibm.com>
@amicic
Copy link
Contributor

amicic commented Nov 1, 2023

changes rebased, so here is the link to jenkins builds

https://openj9-jenkins.osuosl.org/view/Pull%20Requests/job/PullRequest-OpenJ9/4655/

@amicic
Copy link
Contributor

amicic commented Nov 1, 2023

one AIX subtest failed, but seems unrelated:

Testing: -XX:-HandleSIGABRT -XX:+HandleSIGABRT
Test start time: 2023/10/31 19:21:22 Coordinated Universal Time
Running command: "/home/jenkins/workspace/Test_openjdk21_j9_sanity.functional_ppc64_aix_Personal_testList_1/openjdkbinary/j2sdk-image/bin/java"   -Xmx20m -Xdump:system+heap+snap+jit:none -XX:-HandleSIGABRT -XX:+HandleSIGABRT -cp "/home/jenkins/workspace/Test_openjdk21_j9_sanity.functional_ppc64_aix_Personal_testList_1/aqa-tests/TKG/../../jvmtest/functional/cmdline_options_testresources/cmdlinetestresources.jar" VMBench.GPTests.GPTest abort
Time spent starting: 6 milliseconds
Time spent executing: 239 milliseconds
Test result: FAILED
Output from test:
 [OUT] Invoking abort!
 [ERR] JVMDUMP039I Processing dump event "abort", detail "" at 2023/10/31 19:21:22 - please wait.
 [ERR] JVMDUMP032I JVM requested Java dump using '/home/jenkins/workspace/Test_openjdk21_j9_sanity.functional_ppc64_aix_Personal_testList_1/aqa-tests/TKG/output_1698774789184/cmdLineTest_sigabrtHandlingTest_0/javacore.20231031.192122.51708104.0001.txt' in response to an event
 [ERR] 
 [ERR] 
 [ERR] *** Invalid JIT return address 0A00010009608E27 in 0000010010094630
 [ERR] 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants