Skip to content

Clone and pull hangs on stderr #1498

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

Closed
noisythoughts opened this issue Sep 30, 2022 · 1 comment
Closed

Clone and pull hangs on stderr #1498

noisythoughts opened this issue Sep 30, 2022 · 1 comment

Comments

@noisythoughts
Copy link

noisythoughts commented Sep 30, 2022

GitPython 3.1.27 hangs on pull and clone (e.g. Repo.clone_from(URL, repo_path) or with git_repo.git.pull('origin', 'master')).

The strace for the output for pull is as follows:

clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f449bc55a10) = 1501
close(10)                               = 0
close(4)                                = 0
close(8)                                = 0
close(6)                                = 0
read(9, "", 50000)                      = 0
close(9)                                = 0
poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 2, -1) = 1 ([{fd=7, revents=POLLIN}])
read(7, "From ssh://stash.git.company.com"..., 32768) = 110
poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 2, -1) = 1 ([{fd=5, revents=POLLIN}])
read(5, "Already up to date.\n", 32768) = 20
poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN}], 2, -1) = 1 ([{fd=5, revents=POLLHUP}])
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1501, si_uid=1000, si_status=0, si_utime=9, si_stime=24} ---
read(5, "", 32768)                      = 0
close(5)                                = 0
poll([{fd=7, events=POLLIN}], 1, -1^C)    = 1 ([{fd=7, revents=POLLHUP}])

Everything works as expected on GitPython 3.1.18

@Byron
Copy link
Member

Byron commented Oct 1, 2022

Since it hangs with git_repo.git.pull(…) as well, that would mean it hangs despite just calling communicate() which is expected to work 'properly', as it won't hang forever because it consumes stdout and stderr at the same time. If it hangs nonetheless, maybe ssh hangs or something changed in the python standard library.

I am closing this as there is not enough to go on for a fix, but assuming my assumption is wrong it might be worth to bisect between 3.1.18 and 3.1.27 to find the commit that breaks it. With that knowledge, please reopen this issue or open a new one, or even better, submit a PR with a fix.
Thank you and thanks for your understanding.

@Byron Byron closed this as not planned Won't fix, can't repro, duplicate, stale Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants