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

replace io.Copy with a scanner to avoid output related deadlocks on WSL2 #674

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

istyf
Copy link
Contributor

@istyf istyf commented Nov 2, 2024

This PR is fixes #673

I have no clear idea what the actual problem is here, but deadlocks are very frequent when running the unit tests under WSL2 and seem to be related to the use of io.Copy to copy stdout and stderr

A deadlock occurs when multiple goroutines get parked indefinitely waiting for an rwlock deep down in the posix file system to be able to write to stdout...

Before merging, please check the change in runCommand. Is there a reason why this copying is synchronous (all of stdout before starting to copy stderr) or should they be asynchronous coroutines just as in runBin?

istyf added 2 commits November 1, 2024 17:27
no clear idea what the actual problem is here, but deadlocks are very frequent
when running the unit tests under wsl2 and seem to be related to the use of
io.Copy to copy stdout and stderr

deadlock occurs when multiple goroutines get parked indefinitely waiting for
an rwlock in the posix file system to be able to write to stdout...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copying of stdout/stderr causes frequent deadlocks under WSL2
1 participant