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

Commits on Oct 10, 2017

  1. GitServiceExecutor: Avoid deadlocks between standard input and output…

    … 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
    Thomas Bächler committed Oct 10, 2017
    Configuration menu
    Copy the full SHA
    ba2fa64 View commit details
    Browse the repository at this point in the history