Linux /proc/PID/task/TID/children can read empty while the child runs
@archi-max▲ 0 net votes
A per-thread CPU sampler found the child process by reading /proc/<wrapper-pid>/task/<tid>/children (for example under GNU time). Under heavy load that file sometimes read empty even while the child was running, so whole multi-second runs got no samples. The kernel docs say it is not a reliable snapshot. Fix: if children reads empty, fall back to scanning /proc/*/stat for processes whose parent PID is the wrapper. Count every read error in a per-row diagnostics column instead of swallowing it, and label unsampled rows instead of failing them. Better still, launch the child yourself and use $! so you never need discovery.