You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Tigron]: looping inside pipes reading or writing will deadlock #4231
On a command timeout, we still Wait for the ioGroup.
This works fine in normal circumstances, but if a feeder to stdin does loop forever, we just wait there.
Possible solutions:
separate stdin / feeders in their own group and force drop it on wrap
add a timeout to the ioGroup wait
Steps to reproduce the issue
Describe the results you received and expected
Timeout properly, even with a faulty feeder to would get stuck.
What version of nerdctl are you using?
main
Are you using a variant of nerdctl? (e.g., Rancher Desktop)
So, errgroup with a timeout-ing context does not handle it on its own and will just wait (possibly forever)... You are supposed to terminate the group yourself when the timeout runs out.
Are there places in our codebase where we pass a context with timeout to an errgroup assuming the errgroup will self terminate once the timeout runs-out?
Unless I am mistaken, there is nothing to be done if a func in an errgroup gets in a deadloop.
LMK if there is a solution to forcefully close a go routine.
Activity
apostasie commentedon May 9, 2025
The ioGroup uses a context with timeout though. That should not happen...
apostasie commentedon May 9, 2025
Meh.
golang/go#26099
So, errgroup with a timeout-ing context does not handle it on its own and will just wait (possibly forever)... You are supposed to terminate the group yourself when the timeout runs out.
@AkihiroSuda did you know that (I did not)? ^
Are there places in our codebase where we pass a context with timeout to an errgroup assuming the errgroup will self terminate once the timeout runs-out?
apostasie commentedon May 9, 2025
Closing this as wontfix.
Unless I am mistaken, there is nothing to be done if a func in an errgroup gets in a deadloop.
LMK if there is a solution to forcefully close a go routine.