krata icon indicating copy to clipboard operation
krata copied to clipboard

bug: tokio process spawning giving no such process errors inside guest

Open azenla opened this issue 1 year ago • 1 comments

% ./hack/debug/kratactl.sh exec debian-test sh -c 'apt-get update; apt-get install -y git'
    Finished dev [unoptimized + debuginfo] target(s) in 0.19s
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
git is already the newest version (1:2.39.2-1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Error: exec failed: No child process (os error 10)

The tty support PR at #108 experiences this as well, but it appears tokio Command is causing issues with wait() returning No child process errors.

When investigating this, I would checkout PR #108 as the worktree.

azenla avatar Apr 22 '24 23:04 azenla

Update, I've confirmed that this is due to a race between our own reaper and Tokio's. Tokio does a per-spawn reaper task. Once the Supervisor work is done (almost there!), there will only be our own reapers, just one global one to start and possibly a per-spawn reaper later.

khionu avatar Jul 19 '24 19:07 khionu