-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Prevent dangling cat-files … #17154
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
Prevent dangling cat-files … #17154
Conversation
In go-gitea#17138 it appears that on Windows a git cat-file can fail to be killed. This PR attempts to prevent this by: 1. Using os.Pipes for the input - this should mean that the stdin is definitely closed. 2. If the cat-file is doesn't close properly it will attempt to kill it repeatedly logging this. Fix go-gitea#17138 Signed-off-by: Andrew Thornton <[email protected]>
This is WIP because the current mechanism for killing processes is racy! |
Backport go-gitea#17154 In go-gitea#17138 it appears that on Windows a git cat-file can fail to be killed. This PR attempts to prevent this by: 1. Using os.Pipes for the input - this should mean that the stdin is definitely closed. 2. If the cat-file is doesn't close properly it will attempt to kill it repeatedly logging this. Fix go-gitea#17138 Signed-off-by: Andrew Thornton <[email protected]>
Have I said how much I hate our linter? |
data race detected |
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
Signed-off-by: Andrew Thornton <[email protected]>
@zeripath is this RP considered ready? |
@tomaswarynyca unfortunately this doesn't seem to solve the issue and I'm kinda stuck with what other ideas to try. |
I think #17125 may help us to detect what is really going on a bit better. |
This doesn't work and the original issue appears to have solved itself. |
In #17138 it appears that on Windows a git cat-file can fail to be killed.
This PR attempts to prevent this by:
Fix #17138
Signed-off-by: Andrew Thornton [email protected]