Skip to content

git clone hangs sometimes #547

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
zikphil opened this issue Oct 27, 2016 · 3 comments
Closed

git clone hangs sometimes #547

zikphil opened this issue Oct 27, 2016 · 3 comments

Comments

@zikphil
Copy link

zikphil commented Oct 27, 2016

Hello,

Random issue i am having with the latest version of this repo along side latest Python 3. So i am doing a repository clone from 2-3 repo sequentially. Most of time it works fine but sometimes it hangs for no reason, and then when i CTRL+C to exit out of it, i get the following:

    containers_repo = git.Repo.clone_from(containers_repo_url, os.path.join('/tmp/project/' + project_config['name'] + '/' + timestamp, 'containers'), branch=branch)
  File "/usr/local/lib/python3.5/site-packages/git/repo/base.py", line 925, in clone_from
    return cls._clone(git, url, to_path, GitCmdObjectDB, progress, **kwargs)

  File "/usr/local/lib/python3.5/site-packages/git/repo/base.py", line 878, in _clone
    (stdout, stderr) = proc.communicate()  # FIXME: Will block if outputs are big!

  File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1072, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)

  File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1715, in _communicate
    ready = selector.select(timeout)
  File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/selectors.py", line 376, in select
    fd_event_list = self._poll.poll(timeout)
KeyboardInterrupt

I saw the #FIXME i am wondering if this has been resolved or if there are any workarounds out there.

Thanks,

Phil

@ankostis
Copy link
Contributor

@philippelabat thanks for reporting it.

Normally communicate() should not hang, it just may consume much memory for big files; the comment you see was mine, and it does not hold, I have to remove it.

  • Can you specify the exact commit you tested?
  • Does this happens with earlier versions?

Byron added a commit that referenced this issue Dec 8, 2016
As it does not appear to be the case.
See #547 (comment)

[skip ci]
@Byron
Copy link
Member

Byron commented Mar 8, 2017

I am closing this issue as it had no interaction for more than 3 months. Please feel free to comment in case you need it to be reopened.

@Byron Byron closed this as completed Mar 8, 2017
@Abbyyan
Copy link

Abbyyan commented Dec 19, 2019

I've meet the same problem now and it really bother me for a long time. Here are the details. #969

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

No branches or pull requests

4 participants