Skip to content

fix(cmd): fixed deadlock when stderr buffer overflow #357

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

Merged
merged 1 commit into from
Oct 15, 2015
Merged

fix(cmd): fixed deadlock when stderr buffer overflow #357

merged 1 commit into from
Oct 15, 2015

Conversation

rikdev
Copy link
Contributor

@rikdev rikdev commented Oct 15, 2015

Fixed deadlock when using stderr=PIPE in Popen and Git generates enough
output to a pipe such that it blocks waiting for the OS pipe buffer to
accept more data (see https://docs.python.org/2/library/subprocess.html#subprocess.Popen.wait)

Fixed deadlock when using stderr=PIPE in Popen and Git generates enough
output to a pipe such that it blocks waiting for the OS pipe buffer to
accept more data (see
https://docs.python.org/2/library/subprocess.html#subprocess.Popen.wait)
@Byron Byron added this to the v1.0.2 - Fixes milestone Oct 15, 2015
@Byron
Copy link
Member

Byron commented Oct 15, 2015

Thank you very much ! It's quite amazing how long code like this could survive in a library (as old) as GitPython. (It's probably because AutoInterrupt is already an error-path which shouldn't be called by default, and indeed is called rarely).

Byron added a commit that referenced this pull request Oct 15, 2015
fix(cmd): fixed deadlock when stderr buffer overflow
@Byron Byron merged commit 7e58e6a into gitpython-developers:master Oct 15, 2015
Byron added a commit that referenced this pull request Oct 15, 2015
@Byron
Copy link
Member

Byron commented Oct 15, 2015

Currently I believe GitPython does handle process channels correctly. Maybe you have an example of where this is not the case ?

Those who control the process directly, may as well call communicate() themselves.

@rikdev
Copy link
Contributor Author

rikdev commented Oct 15, 2015

I use Git with Git LFS plugin. When clone a repository with the function git.Repo.clone_from, Git LFS outputs to stderr a list of downloaded files and overflow OS pipe buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants