Difference between revisions of "Fault injection"

From CRIU
Jump to: navigation, search
m (= Abort link-remap file opening)
 
Line 15: Line 15:
 
<code>FI_RESTORE_ROOT_ONLY == 2</code>. Makes CRIU stop restoring right after spawning (and pre-restoring) the root task. Checks that early preparations (such as [[invisible files]] pre-creation) doesn't leave garbage in the system.
 
<code>FI_RESTORE_ROOT_ONLY == 2</code>. Makes CRIU stop restoring right after spawning (and pre-restoring) the root task. Checks that early preparations (such as [[invisible files]] pre-creation) doesn't leave garbage in the system.
  
=== Abort link-remap file opening ==
+
=== Abort link-remap file opening ===
  
 
<code>FI_RESTORE_OPEN_LINK_REMAP == 3</code>. Make CRIU fail the very first attempt opening the [[invisible files|link remap]] file. Additional check for invisible files cleanup.
 
<code>FI_RESTORE_OPEN_LINK_REMAP == 3</code>. Make CRIU fail the very first attempt opening the [[invisible files|link remap]] file. Additional check for invisible files cleanup.

Latest revision as of 17:45, 26 September 2016

Fault injection testing is used to validate error paths in CRIU. Faults are artificially generated in peeked places of the code to check for particular roll-backs.

Faults are enforced by setting the CRIU_FAULT env before executing CRIU binary. Values are described in criu/include/fault-injection.h header file.

Fatal faults[edit]

These make CRIU abort the current operation and exit with error.

Abort dump early[edit]

FI_DUMP_EARLY == 1. Makes CRIU abort duming right after infecting the task with parasite code. Checks that parasite unloading on error works OK.

Abort restore early[edit]

FI_RESTORE_ROOT_ONLY == 2. Makes CRIU stop restoring right after spawning (and pre-restoring) the root task. Checks that early preparations (such as invisible files pre-creation) doesn't leave garbage in the system.

Abort link-remap file opening[edit]

FI_RESTORE_OPEN_LINK_REMAP == 3. Make CRIU fail the very first attempt opening the link remap file. Additional check for invisible files cleanup.

Abort connection to parasite code[edit]

FI_PARASITE_CONNECT == 4. Makes CRIU simulate impossibility for parasite code to connect back to CRIU.

Non fatal faults[edit]

These just make CRIU chose different paths on dump/restore, trying harder to get work done.

Abort open-by-handle[edit]

FI_CHECK_OPEN_HANDLE == 128. Simulates failure of the open_by_handle_at system call. Forces the irmap engine to work.

Abort memfd creation[edit]

FI_NO_MEMFD == 129. Forces parasite code use shmem-based blob instead of memfd-based. Used for older kernels (not having the memfd_create() system call) to work.

Abort breakpoints injectioin[edit]

FI_NO_BREAKPOINTS == 130. Disables breakpoints and makes CRIU unload code blobs by step-by-step tracing.