earwig/git-repo-updater

Error encountered when iterating a large number of repos

dominicbarnes opened this issue · 7 comments

I've got a pretty regular practice of updating my entire $GOPATH of repos, of which there are quite a few. Whenever I run gitup across this large of a list, it invariably ends in this error:

  File "/usr/local/bin/gitup", line 9, in <module>
    load_entry_point('gitup==0.3.1.dev0', 'console_scripts', 'gitup')()
  File "build/bdist.macosx-10.10-x86_64/egg/gitup/script.py", line 111, in run
  File "build/bdist.macosx-10.10-x86_64/egg/gitup/script.py", line 103, in main
  File "build/bdist.macosx-10.10-x86_64/egg/gitup/update.py", line 227, in update_directories
  File "build/bdist.macosx-10.10-x86_64/egg/gitup/update.py", line 208, in _update_directory
  File "build/bdist.macosx-10.10-x86_64/egg/gitup/update.py", line 192, in _update_subdirectories
  File "build/bdist.macosx-10.10-x86_64/egg/gitup/update.py", line 177, in _update_repository
  File "build/bdist.macosx-10.10-x86_64/egg/gitup/update.py", line 116, in _update_branch
  File "/usr/local/lib/python2.7/site-packages/git/cmd.py", line 440, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/git/cmd.py", line 834, in _call_process
    return self.execute(make_call(), **_kwargs)
  File "/usr/local/lib/python2.7/site-packages/git/cmd.py", line 587, in execute
    stdout_value, stderr_value = proc.communicate()
  File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 799, in communicate
    return self._communicate(input)
  File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1411, in _communicate
    stdout, stderr = self._communicate_with_select(input)
  File "/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1512, in _communicate_with_select
    rlist, wlist, xlist = select.select(read_set, write_set, [])
ValueError: filedescriptor out of range in select()

I'm not able to finish updating this directory, so I'm forced to break apart into smaller chunks.

For what it's worth, if I try the exact same command again it halts in the exact same spot, so thankfully there doesn't appear to be any randomness inherent in this problem.

In the case outlined above, it dies on the 274th repo, but I'll see if I can establish a similar/consistent result with a different input.

What do you get for gitup -v and python -c "import git; print(git.__version__)"?

$ gitup -v
gitup 0.3.1.dev0

$ python -c "import git; print(git.__version__)"
1.0.1

Looks like I might need to update gitup :P

Give it a shot. May not fix the problem, but at least we'll know.

Previously, I was running against the latest master when I got the error. I switched to the latest develop, and still got the same result.

What about updating GitPython?

Upgrading seems to have fixed this problem, thanks for the tip!