-
Notifications
You must be signed in to change notification settings - Fork 678
Add configurable breakpoint control for restore path #2729
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
Add configurable breakpoint control for restore path #2729
Conversation
Co-authored-by: avagin <1049830+avagin@users.noreply.github.com>
criu/cr-restore.c
Outdated
| { | ||
| struct pstree_item *item; | ||
| bool nobp = fault_injected(FI_NO_BREAKPOINTS) || !kdat.has_breakpoints; | ||
| bool nobp = true; /* Always disable breakpoints on the restore path */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls add a command line flag to disable it optionaly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot pls add a command line flag to disable it optionaly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the --enable-restore-breakpoints command line flag as requested. By default, breakpoints remain disabled on restore for reliability (maintaining current behavior). When the flag is provided, the restore operation will use the original logic that respects hardware capabilities and fault injection settings. Commit c4c90e4
Co-authored-by: avagin <1049830+avagin@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
It was just an experiment. |
This change adds configurable control over hardware breakpoints during restore operations to improve reliability and predictability of CRIU restore processes, while providing flexibility for users who need the original behavior.
Previously, the restore path would use hardware breakpoints when available (unless explicitly disabled via fault injection), which could lead to inconsistent behavior depending on the target system's hardware capabilities. This change disables breakpoints by default for restore operations but allows users to re-enable them when needed.
Changes Made
catch_tasks()function incriu/cr-restore.cto disable breakpoints by default on restore--enable-restore-breakpointscommand line flag to allow users to opt back into hardware breakpoint usageenable_restore_breakpointsfield to the options structure incriu/include/cr_options.hTechnical Details
By default (
--enable-restore-breakpointsnot specified),nobpis set totrue, causing thecompel_stop_pie()function to:ptrace_set_breakpoint()PTRACE_SYSCALLtracing insteadWhen
--enable-restore-breakpointsis specified, the restore operation uses the original logic that respects hardware capabilities and fault injection settings.Impact
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.