Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podman-remote wait: fails with read /proc/N/cgroup: no such process #16383

Closed
edsantiago opened this issue Nov 2, 2022 · 4 comments · Fixed by #16504
Closed

podman-remote wait: fails with read /proc/N/cgroup: no such process #16383

edsantiago opened this issue Nov 2, 2022 · 4 comments · Fixed by #16504
Labels
flakes Flakes from Continuous Integration locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@edsantiago
Copy link
Member

Seen just now in remote f36-aarch64 root. Almost certainly a flake:

[+0098s] not ok 53 podman --noout run should print output
...
# podman-remote --noout run -d --name test quay.io/libpod/testimage:20221018 echo hi
# podman-remote wait test
Error: read /proc/14628/cgroup: no such process
[ rc=125 (** EXPECTED 0 **) ]

My flake logs find one other instance, September 14 in f36 rootless, but that one is preceded by other errors. This one, no prior indications of failure.

@edsantiago edsantiago added flakes Flakes from Continuous Integration remote Problem is in podman-remote labels Nov 2, 2022
@github-actions github-actions bot removed the remote Problem is in podman-remote label Nov 2, 2022
@edsantiago
Copy link
Member Author

Another one, also remote, but f37 this time instead of f36

@vrothberg
Copy link
Member

@giuseppe, any idea what could cause it?

@giuseppe
Copy link
Member

it is a race when reading the process cgroup using os.ReadFile().

What happens is that the process terminates between the open("/proc/$PID/cgroup") succeded and the following read.

It can be easily reproduced with:

$ sleep 1 & (sleep 2; cat -) < /proc/$!/cgroup 
[1] 1083377
cat: -: No such process

giuseppe added a commit to giuseppe/libpod that referenced this issue Nov 14, 2022
when reading from the /proc/$PID/cgroup file, treat ESRCH in the same
way as ENOENT since the kernel returns ESRCH if the file was opened
correctly but the target process exited before the open could be
performed.

Closes: containers#16383

[NO NEW TESTS NEEDED] it is a race condition that is difficult to
reproduce.

Signed-off-by: Giuseppe Scrivano <[email protected]>
@giuseppe
Copy link
Member

PR here: #16504

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 10, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
flakes Flakes from Continuous Integration locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants