-
Notifications
You must be signed in to change notification settings - Fork 720
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
CRIU supports Java debugger via the restore option file #19754
Conversation
FYI @tajila |
e05b61d
to
3e888f0
Compare
3e888f0
to
f6b5a0a
Compare
The CRIU JDWP debugger via the restore option file requires both extension repo PR ibmruntimes/openj9-openjdk-jdk#591 and its backports (in progress) and this PR. |
FYI @dsouzai
which is expected to be resolved via a JIT change like the patch you provided. Note: this |
I opened #20047, which is essentially the patch I had given you. |
I was reading over #18866, specifically the VM Coordination section, and wanted to check if Points 1 and 2 are addressed, namely:
Regarding 1, although currently (i.e. with this PR and #20047) we will invalidate all compiled code if debug is enabled post-restore, it is still possible for JIT'd code to execute, namely:
For a failed proactive compilation, we will fall back to using the FSD body which means that a thread will continue to execute that body. Therefore, the VM needs to decompile immediately on restore if debug is enabled. Once we have the ability to reuse the FSD code we generate pre-checkpoint this won't be necessary, but for now I believe we need this to make debug fully functional. In the case of JNI Thunks, I'm working on a PR for that. I think once we address all of this, debug on restore should be completely functional (if not optimal). FYI @TobiAjila @vijaysun-omr |
Hm actually... I guess it's not actually a problem if it's running FSD code because that is already set up to deal with debug events. So I guess I just need to address the JNI Thunk issue; the rest is covered by the method body invalidation that already occurs. I'll think about this some more, but now I don't believe we need to decompile immediately anymore heh. |
Opened #20108. |
f6b5a0a
to
638cf50
Compare
Rebased to resovle the merge conflict. |
638cf50
to
eebf643
Compare
eebf643
to
20fc1bc
Compare
@JasonFengJ9 How exatly did you enable debug on restore? whe I tried
|
@tajila I was using |
same issue
|
@JasonFengJ9 We will need to add a docs issue for this as well |
20fc1bc
to
a852204
Compare
Added support of @tajila this is ready for another look. |
jenkins test sanity xlinux jdk17 |
jenkins test sanity alinux64 jdk21 |
jenkins test sanity win jdk8 |
Looking at this PR test failure. |
4fa7585
to
55712a0
Compare
Debugger support related code are guarded with isDebugOnRestoreEnabled(); For -Xint mode, do not disable JVMTI capabilities required for JDWP debugger before checkpoint, add a capability can_access_local_variables; For JIT mode, add JVMTI capabilities required for JDWP debugger before checkpoint; Hooked J9HOOK_VM_PREPARING_FOR_RESTORE event to determine if a JDWP agent is specified in the restore option file, also hooked J9HOOK_VM_CRIU_RESTORE to load the agent libraries; Support -agentlib/-agentpath and -Xrunjdwp; Refactored the agent library creation from J9VMInitArgs; Added some trace points; Disable criu_jitPostRestore.xml failure conditions until the JIT PR is merged. Signed-off-by: Jason Feng <fengj@ca.ibm.com>
55712a0
to
f812cad
Compare
Fixed the PR test failure due to an earlier In addition, disabled following failure conditions within
Verified manually that these failure conditions can re-enabled with Also moved @tajila this is ready for another look. |
jenkins test sanity win jdk8 |
jenkins test sanity alinux64 jdk21 |
jenkins test sanity xlinux64 jdk17 |
jenkins test sanity xlinux jdk17 |
Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
CRIU supports Java debugger via the restore option file
Debugger support related code are guarded with
isDebugOnRestoreEnabled()
;For
-Xint
mode, do not disableJVMTI
capabilities required forJDWP
debugger before checkpoint, add a capabilitycan_access_local_variables
;For
JIT
mode, addJVMTI
capabilities required forJDWP
debugger before checkpoint;Hooked
J9HOOK_VM_PREPARING_FOR_RESTORE
event to determine if aJDWP
agent is specified in the restore option file, also hookedJ9HOOK_VM_CRIU_RESTORE
to load the agent libraries;Refactored the agent library creation from
J9VMInitArgs
;Added some trace points.
Signed-off-by: Jason Feng fengj@ca.ibm.com
Closes #16959