Skip to main content

HERMIT_GUEST_DEADLOCK_EXIT

Constant HERMIT_GUEST_DEADLOCK_EXIT 

Source
pub const HERMIT_GUEST_DEADLOCK_EXIT: i32 = 121;
Expand description

Exit status for a run that DEADLOCKED UNDER HERMIT’S MODEL: Detcore’s scheduler found every remaining guest thread blocked on something no later turn can supply (its “Deadlock detected” report) and ended the run.

⚠️ A VERDICT OF HERMIT’S MODEL, NOT THE GUEST’S RESULT. “No possible wake” means no wake that Detcore models: under Hermit’s sequentialized virtual time “no thread can be woken now” is also “no thread can ever be woken” BY ANYTHING HERMIT MODELS. When the model is complete for the program, Linux would leave it hung forever and the hang is reported instead of reproduced. When it is not, the deadlock is Hermit’s bug: the tests record robust-futex owner death, dash’s sigsuspend, raw exit, KVM’s kill and happens-before re-admission each once reported this way. So the status is neither a guest status nor HERMIT_INTERNAL_FAILURE_EXIT (125), and --verify, chaos-stress and analyze do not take it as a guest result by default. A caller that needs to know which it was compares a native run (docs/ERROR_CATALOG.md). Before this, the scheduler exited the container child 1 and the parent’s classifier turned the deadlock into class=container-child-exit and 125.

⚠️ ONLY A GUEST DEADLOCK EXITS THIS. The scheduler’s HERMIT_DEADLOCK: verdicts (an invariant of Hermit’s own bookkeeping broke, or a backend never reported a death the kernel owed) still exit 1 and stay internal failures, and a happens-before refusal still exits HERMIT_POLICY_REFUSAL_EXIT.

⚠️ WHY 121. It extends the reserved band downwards by one (121 guest deadlock, 122 refusal, 123 log cap, 124 deadline, 125 hermit broke, 126/127 exec-level), so the reserved codes stay contiguous and the guest range loses only its top value. It is not a signal status (signal_from_exit_status is None), so the classifier arms cannot both match. As with every other code, a guest may still exit 121 of its own accord: the stderr line HERMIT_MODEL_DEADLOCK_LINE is the discriminator, present only when the scheduler declared the deadlock. See the allocation table above the constants in hermit-cli/src/lib.rs.

It lives here for the reason HERMIT_POLICY_REFUSAL_EXIT does: detcore emits it and hermit-cli recognises it.