Difference between revisions of "CLI/opt/--allow-uprobes"
m |
m |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
{{Note|If a checkpoint has been created with <code>--allow-uprobes</code>, this option '''must''' be specified during restore and any relevant uprobes '''must''' remain active. This option does not create or manage uprobes; it only instructs CRIU to accept the presence of the corresponding VMAs.}} | {{Note|If a checkpoint has been created with <code>--allow-uprobes</code>, this option '''must''' be specified during restore and any relevant uprobes '''must''' remain active. This option does not create or manage uprobes; it only instructs CRIU to accept the presence of the corresponding VMAs.}} | ||
| + | |||
| + | == Description == | ||
| + | |||
| + | User-space probes (uprobes) allow instrumentation of functions in user processes. When a uprobe is triggered for the first time, the kernel automatically creates a dedicated VMA mapping. This mapping is not removed even if the uprobe itself is later deleted. As a result, a process may retain uprobes VMAs long after the probes have been removed. | ||
| + | |||
| + | By default, CRIU exits with an error when checkpointing a process that has a uprobes VMA, because restoring that process without the corresponding probes can change execution semantics. The <code>--allow-uprobes</code> option tells CRIU to proceed anyway. | ||
| + | |||
| + | On restore, users must ensure that any uprobes that were active for the checkpointed processes are still installed on the restore host before resuming execution. If a restored process executes code at a location that previously had a uprobe installed but the probe is no longer active, the kernel delivers <code>SIGTRAP</code>. Without a handler for <code>SIGTRAP</code>, the process will terminate and may produce a core dump. | ||
Latest revision as of 13:01, 7 October 2025
The --allow-uprobes command-line option allows CRIU to checkpoint and restore processes that have (or once had) a kernel-created uprobes VMA (virtual memory area). Since this VMA persists even after the probe is removed, CRIU cannot safely infer the probe state at checkpoint time without this option.
DescriptionEdit
User-space probes (uprobes) allow instrumentation of functions in user processes. When a uprobe is triggered for the first time, the kernel automatically creates a dedicated VMA mapping. This mapping is not removed even if the uprobe itself is later deleted. As a result, a process may retain uprobes VMAs long after the probes have been removed.
By default, CRIU exits with an error when checkpointing a process that has a uprobes VMA, because restoring that process without the corresponding probes can change execution semantics. The --allow-uprobes option tells CRIU to proceed anyway.
On restore, users must ensure that any uprobes that were active for the checkpointed processes are still installed on the restore host before resuming execution. If a restored process executes code at a location that previously had a uprobe installed but the probe is no longer active, the kernel delivers SIGTRAP. Without a handler for SIGTRAP, the process will terminate and may produce a core dump.