-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 events --since="nonsense" is nondeterministic #23165
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
A few more failures:
Still no idea what triggers this. |
Very weird. I thought the problem might be Lines 1112 to 1141 in c279ce0
filters.go:generateEventFilters() is not handling the error. And with that I'm outta here for the night.
|
The issue is with how channels and select work I would assume, i.e. see c46884a I guess that didn't really fix the main cause as the |
Luap99
added a commit
to Luap99/libpod
that referenced
this issue
Jul 3, 2024
The events code makes use of two channels, one for the events and one for the resulting error. Then in the main file we have a loop reading from both channels that should exit on first error it gets. However in case the event channel is closed before the error channel cotains the error it could caused an early exit as it looked like all events were done. Commit c46884a fixed that somewhat by checking for an error in the error channel before exiting. This however was still racy as it added a default case in the select which means the channel check is non blocking. Thus the error was not yet send into the channel. To fix this we should make it a blocking read to wait for the error in the channel. Also the err != nil check can be removed as we either return err or nil anyway. And as last step make sure the error channel is closed, that prevents us from blocking forever in case the main select already processed the nil error. Fixes containers#23165 Signed-off-by: Paul Holzinger <[email protected]>
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.
It will sometimes succeed!
And sometimes that will continue looping forever (or five minutes, which is ~equivalent). I have no idea what makes it "succeed". And, given a loop exit, no idea what to do to investigate.
The text was updated successfully, but these errors were encountered: