-
Notifications
You must be signed in to change notification settings - Fork 752
Fix VM snapshotting failures relating to OpenJDK MethodHandles #20872
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
Comments
@lzhou2025 The following code shows how Lines 8358 to 8376 in 3354452
Could you try freeing openj9/runtime/vm/VMSnapshotImpl.cpp Lines 683 to 726 in 3354452
|
OK, I will change it and test it in openjdk11 |
According to the issue description, this problem only occurs in JDK17 and above. You can test it in your JDK21 environment. |
I see |
Remove references to a list of objects of class memberNames Fixes: eclipse-openj9#20872 Co-authored-by: Babneet Singh [email protected] Co-authored-by: Tobi Ajila [email protected] Co-authored-by: Lige Zhou [email protected]
Remove references to a list of objects of class memberNames Fixes: eclipse-openj9#20872 Co-authored-by: Babneet Singh [email protected] Co-authored-by: Tobi Ajila [email protected] Co-authored-by: Lige Zhou [email protected]
VM snapshotting is tested and functional (however limited) on JDK 8 and JDK 11 (both of which currently use OpenJ9 Method Handles (MH) by default). From JDK 17 and on, OpenJDK Method Handles are used by default.
I have seen an issue when testing on JDK 17+ where OpenJDK MH specific code is functioning incorrectly when snapshotting is enabled. Namely,
addMemberNameToClass
walks overJ9Class::memberNames
that consists ofJ9MemberNameListNodes
. However, theJ9MemberNameListNode::memberName
is in an invalid state s.t. this line fails with a seg fault.I think the
MemberName
s need to be added to the VM snapshot and/or fixed up when writingJ9Class
es to the snapshot, and handled appropriately on restore.The text was updated successfully, but these errors were encountered: