Skip to content

Fix issues with vanishing PIDs when calling "enroot list -f" - #220

Merged
flx42 merged 1 commit into
NVIDIA:masterfrom
flx42:flx42/2025-01-07/fix-enroot-list-pids
Aug 6, 2025
Merged

Fix issues with vanishing PIDs when calling "enroot list -f"#220
flx42 merged 1 commit into
NVIDIA:masterfrom
flx42:flx42/2025-01-07/fix-enroot-list-pids

Conversation

@flx42

@flx42 flx42 commented Jan 7, 2025

Copy link
Copy Markdown
Member

Fixes: #126

@flx42
flx42 force-pushed the flx42/2025-01-07/fix-enroot-list-pids branch from 7de1ecd to 41c62d4 Compare January 8, 2025 00:21
Comment thread src/runtime.sh
Fixes: NVIDIA#126

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
@flx42
flx42 force-pushed the flx42/2025-01-07/fix-enroot-list-pids branch from 41c62d4 to 1d0f9ca Compare August 6, 2025 18:34
@flx42
flx42 merged commit c4fd5e7 into NVIDIA:master Aug 6, 2025
liayan added a commit to liayan/enroot that referenced this pull request Aug 17, 2026
runtime::list() calls "ps -p" separately for each rootfs entry, in
alphabetical order, after the initial lsns scan that found the pids.
Entries later in that order get checked further away in time from
when lsns saw them running, so the staleness window NVIDIA#126/NVIDIA#220 already
deal with is not fixed size, it grows with the number of running
containers.

Measured on an idle VM with N containers running: the gap between the
lsns scan and each entry per-entry ps call went from ~46ms (1st entry)
to ~286ms (40th entry), growing roughly linearly with N. Batching a
single "ps -p" call right after the lsns scan and having the rest of
the function work off that one snapshot keeps this at a flat ~40ms
regardless of N.

Ran the NVIDIA#126 repro (owner exits mid-list) 8x against this, still
degrades gracefully to a name-only row like NVIDIA#220 intended, no
regression there.

Signed-off-by: Liang Yan <lyan@coreweave.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"enroot list -f" can fail if a container PID disappears

2 participants