Closed edsantiago closed 7 months ago
I don't get why it would fail with EACCES even as root. These are the only two lines that could fail https://github.com/containers/netavark/blob/cc3f35d2e87defa2e12d0ffeb59a57035e8a5902/src/dns/aardvark.rs#L131-L132
And I really do not see why this would fail with anything other the ENOENT which is already ignored by the code. I can see the EACCES might happen as rootless in case where the aardvark pid was already reused by another process where we do not have privs on, but as root that can never be the case.
ok I guess we need to ignore more errors, I am using something this to reproduce the logic easily:
while :; do sleep 10 & kill -HUP $! && ls -l /proc/$!/ns/net 2>&1 | tee /dev/stderr | grep -E "No such file or directory|net:" || break ; done
I wrongly assumed the only error can be ENOENT, however during testing this several times I also saw ESRCH and importantly the here reported EACCES.
So at this point I wonder if it makes sense to not simply ignore all errors. This check is only a nice to have to make us aware of a inconsistent aardvark-dns vs rootless-netns state: https://github.com/containers/podman/issues/20396.
ping
x | x | x | x | x | x |
---|---|---|---|---|---|
int(3) | podman(3) | rawhide(2) | rootless(2) | host(3) | sqlite(3) |
fedora-39(1) | root(1) |
Looks like the same bug, except ENOENT instead of EACCESS:
# podman [options] stop --all -t 0
[cid1]
Error: removing container [cid2] network: netavark: remove aardvark entries: failed to get aardvark pid: IO error: No such file or directory (os error 2)
In f40 root. File a new bug, or reopen this one?
I saw that earlier, we can reopen this but on stop it is working differently and I very much fear that there is no way around these races until https://github.com/containers/aardvark-dns/issues/338 is addressed
This is one of those nasty ones that hides in logs, making it impossible for me to get full data.
Best I can tell, the first instance was Feb 9, in rawhide rootless. Seen also in f39 root.
Incomplete list below. There are maybe 3-4 others, it is way too hard to get a complete list.