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

Fix #747 #748

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix #747 #748

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 10, 2017

No description provided.

… of the external process

Since GitServiceExecutor.ExecuteServiceByName() writes data synchronously to the externel proccess's standard input, the external process may block on writing output if its output buffer fills. This causes a deadlock when a client uses 'git fetch' to fetch a large number of refs. This issue also leads to git-upload-pack.exe processes running on the server indefinitely. This patch mitigates this issue with two changes:

1) Set RedirectStandardError to false. Since we never read the standard error, redirecting it can cause a deadlock either when writing to the input or when waiting for the process.
2) Start reading the external process's standard output with CopyToAsnyc before we start writing. This ensures that the underlying operating system buffer never fills.

Fixes #747
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.

None yet

0 participants