Eclipse Git plugin breaks RodeCode/uwsgi

Issue #774 resolved
Paweł Widera
created an issue

Some of the Git repositories in our RhodeCode 1.5.3 installation are accessed with Eclipse Git plugin which is based on JGit (Java implementation of Git). For some reason JGit causes the following mysterious exception after a list of branches is read:

GET /subtext/info/refs?service=git-upload-pack => generated 436 bytes in 122 msecs (HTTP/1.1 401) 2 headers in 112 bytes
GET /subtext/info/refs?service=git-upload-pack => generated 523 bytes in 377 msecs (HTTP/1.1 200) 1 headers in 78 bytes
Exception in thread Thread-1564:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/opt/rhodecode-virtenv/local/lib/python2.7/site-packages/rhodecode/lib/subprocessio.py", line 68, in run
    b = s.read(4096)
  File "/usr/lib/python2.7/gzip.py", line 256, in read
    self._read(readsize)
  File "/usr/lib/python2.7/gzip.py", line 283, in _read
    pos = self.fileobj.tell()   # Save current position
AttributeError: 'uwsgi._Input' object has no attribute 'tell'

After the exception happens, the following git processes are left hanging:

18316 ? S 0:00 /bin/sh -c git upload-pack --stateless-rpc "/home/repos/subtext"
18318 ? S 0:00 git upload-pack --stateless-rpc /home/repos/subtext
18320 ? S 0:00 git-upload-pack --stateless-rpc /home/repos/subtext

Few moments later the entire RhodeCode application becomes unresponsive and the service have to be restarted. I expect this is an uwsgi related problem. I was wondering if anyone have experienced this or perhaps have an idea how to debug it further (something like a git verbose mode maybe?).

Comments (4)

  1. Marcin Kuzminski repo owner

    few comments from my side, there have been cases of JGit breaking stuff before in RhodeCode because it just is not behaving like git official client, second thing is that i think it's probably related to chunked encoding support (which git sometimes uses for large repos, same goes for gzip, it sometimes is used), could you test on waitress wsgi server. It's proven to work well with gzip+chunked encoding

  2. Paweł Widera reporter

    Thanks, I'm going to test that. I started from adding chunked transfer encoding to my nginx config. There is also uwsgi buffering that could be switched off and a separate chunkin module.

  3. Log in to comment