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

CRIU DebugOnRestore mode is disabled when debug events are hooked #20891

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JasonFengJ9
Copy link
Member

@JasonFengJ9 JasonFengJ9 commented Jan 7, 2025

CRIU DebugOnRestore mode is disabled when debug events are hooked

isDebugOnRestoreEnabled() returns false if some debug-specific flags/events are enabled/hooked, this matches J9::Options::isFSDNeeded() in compiler/control/J9Options.cpp;
DebugOnRestore mode is enabled when CRIU is enabled, -XX:+DebugOnRestore is specified, JDWP is not enabled, and no debug-specific flags/events are enabled/hooked;
When DebugOnRestore mode is enabled, debug-related events and hooks can't be enabled or hooked pre-checkpoint,
isDebugAgentDisabled() returns TRUE in this case, otherwise FALSE.

Signed-off-by: Jason Feng [email protected]

@JasonFengJ9 JasonFengJ9 added comp:vm criu Used to track CRIU snapshot related work labels Jan 7, 2025
@JasonFengJ9 JasonFengJ9 requested review from tajila and dsouzai January 7, 2025 22:45
runtime/vm/CRIUHelpers.cpp Outdated Show resolved Hide resolved
@JasonFengJ9 JasonFengJ9 marked this pull request as draft January 13, 2025 18:46
@JasonFengJ9
Copy link
Member Author

Marking this as WIP until a proper way determining the debug on restore mode is found.

@JasonFengJ9 JasonFengJ9 marked this pull request as ready for review January 21, 2025 21:43
isDebugOnRestoreEnabled() returns false if some debug-specific
flags/events are enabled/hooked, this matches J9::Options::isFSDNeeded()
in compiler/control/J9Options.cpp;
DebugOnRestore mode is enabled when CRIU is enabled, -XX:+DebugOnRestore
is specified, JDWP is not enabled, and no debug-specific flags/events
are enabled/hooked;
When DebugOnRestore mode is enabled, debug related events
and hooks can't be enabled or hooked pre-checkpoint,
isDebugAgentDisabled() returns TRUE in this case, otherwise FALSE.

Signed-off-by: Jason Feng <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:vm criu Used to track CRIU snapshot related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants