#3758·youki

[Bug]: youki does not invoke poststop after a createRuntime hook fails or times out

Author: RaShiShoCreated Sep 27, 2026Updated Oct 1, 2026
Labelskind/bug

Bug Description

When a createRuntime hook exits with code 7 or exceeds its configured one-second timeout, youki correctly fails create, but no poststop hook record is produced. A paired configuration whose createRuntime hook succeeds does execute the same poststop hook during a normal stop/delete lifecycle.

The tested source commit is 993a50ffb788be1a1a879f3446c10dd0c0b6a5a1. Current upstream HEAD and other host kernels have not been tested for this report.

Steps to Reproduce

Requirements: root on Linux, Python 3.10+, unshare, cc, static libc development files, and the indicated runtime. No external rootfs image is needed. Save every file in the Standalone reproducer files section into one directory named youki-missing-poststop-on-create-failure, then run:

bash
cd youki-missing-poststop-on-create-failure
sudo unshare --mount --propagation private \
  python3 reproduce.py \
    --runtime /absolute/path/to/youki \
    --output "$PWD/replay-1"

Use a fresh output directory. The script preserves configs and logs and cleans up only its randomly named containers in isolated runtime state roots. Its exit code reports evidence collection/control/cleanup success, not OCI conformance.

The nonzero-exit hook records its invocation and exits 7. The timeout hook records its invocation, then sleeps four seconds with an OCI timeout of one second. Both configure a poststop hook that appends a cleanup token to the same host-side log. Controls change the failing hook to successful mode, start the probe, stop it, and perform an ordinary delete to demonstrate that the poststop recorder works. Logs are captured before force cleanup so cleanup cannot masquerade as runtime failure handling.

Expectation

No response

System and Setup Info

Actual youki --version output:

youki version: 0.7.0
commit: 0.7.0-993a50ffb788be1a1a879f3446c10dd0c0b6a5a1
spec: 1.1.0
rustc: 1.96.0

Source commit: 993a50ffb788be1a1a879f3446c10dd0c0b6a5a1.

Host OS information

Ubuntu 24.04.1 LTS, x86_64, WSL2.

Host kernel information

6.6.114.1-microsoft-standard-WSL2

Additional Context

youki-missing-poststop-on-create-failure-reproducer.tar.gz