-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
preserve-fds: file descriptor 4 is not available #15943
Comments
@containers/podman-maintainers please help. This one is starting to trigger often. ISTM that something somewhere is now doing an The first instance of the flake was seen in PR #15833 (903f551). That doesn't mean this PR is at fault (I see nothing in it that leaks fds), it just means this is the upper bound of commits to search. Given how frequent this flake is, I'm guessing the lower bound is at most two weeks before that, so, let's say 54873c1 (Aug 31). That's impossible for me to review, even if I limit it to What I need is for someone to think back to early September and say "oh, yeah, I added this-or-that code and might have forgotten to If we don't get this resolved, I'm just going to remove the |
@edsantiago What's leading you towards that conclusion? It seems like we have too few FDs open from the error message, not too many? |
My belief came from the test failure message:
...but I may be reading it completely wrong. |
Ack, that sounds accurate. An extra FD is getting in occasionally that it altering the error message. No chance it's leaking in from CI itself passing an extra FD in? |
This suggests that my hypothesis is correct, though: $ bin/podman run --preserve-fds 2 quay.io/libpod/testimage:20220615 date
Error: file descriptor 3 is not available - the preserve-fds option requires that file descriptors must be passed
$ bin/podman run --preserve-fds 2 quay.io/libpod/testimage:20220615 date 3>/dev/null
Error: file descriptor 4 is not available - the preserve-fds option requires that file descriptors must be passed I have no idea what CI might be doing. I did mean to add that this happens only on Ubuntu, and (best I can tell) Ubuntu VMs were not touched in the 2 weeks before the flake appeared. |
Sorry if I wasn't clear, but I concur with your assessment. It's an extra FD, not a missing FD as I originally assumed. |
I am, however, a bit doubtful that we missed a |
I found one through tedious skimming: podman/libpod/container_internal_common.go Line 1086 in 23a3066
(two, actually, there are two instances in that same file). But that's podman, not the e2e tests, so I can't imagine why that would affect fds in the e2e test process. |
I don't think there is a linter for that. We use os/exec to start podman in the tests, it should not matter how many fds we leak in the test since os/exec will always unset all fds. ALso the golang garbage collector will automatically close files once the variable is out of scope, since the timing changes with every run it would explain why it flakes only sometimes. |
Hmmmm. Here's a new flake I haven't seen before (it isn't even in my flake logs):
Triple-failure, consistent with what we're seeing in this issue. Maybe red herring, but I'll let y'all decide. |
For posterity, because it looks like I'm abandoning this again: thinking that perhaps the root cause was some test that ran before the flaking one, I wrote a script to analyze my logs, looking for tests that precede the invalid fd` one in all cases. No luck: there are 73 such matches. Too many to really evaluate. Among those, in 11 of the 16 log files, Moving on. |
I've noticed that some of these flake logs -- not all, but an unexpected number -- are correlated with this one-time flake:
Example. It's only a one-time flake, always (AFAICT) passing on the first ginkgo retry. I don't think that's the cause, because in all cases I see the Here's the latest list of Cirrus flakes. Podman run [It] podman run --preserve-fds invalid fd
|
A friendly reminder that this issue had no activity for 30 days. |
A friendly reminder that this issue had no activity for 30 days. |
We no longer test Ubuntu. If we ever do so again, and this resurfaces, then I'll reopen. |
Been seeing this flake for the last week:
Podman run [It] podman run --preserve-fds invalid fd
Seems interesting that it's only Ubuntu rootless.
The text was updated successfully, but these errors were encountered: