diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -28,3 +28,5 @@ a47ccfb020cda78c8680e3844aaf0b82b1390f3b 347ae9ae544bba8deb417995285287a3b6be1611 v4.10.4 9b257ac49841f850434be0d518baca0827e6c8cc v4.10.5 e8bf26eea118694edc4ffe50c6c5aa91022bc434 v4.10.6 +71fa9274ba59fb982104f0b9b3d0d024c78675f7 v4.11.0 +92471577ef25636e5babe8001d47fc8e51521522 v4.11.1 diff --git a/pkgs/python-packages.nix b/pkgs/python-packages.nix --- a/pkgs/python-packages.nix +++ b/pkgs/python-packages.nix @@ -653,7 +653,7 @@ }; }; rhodecode-vcsserver = super.buildPythonPackage { - name = "rhodecode-vcsserver-4.11.0"; + name = "rhodecode-vcsserver-4.11.1"; buildInputs = with self; [pytest py pytest-cov pytest-sugar pytest-runner pytest-catchlog pytest-profiling gprof2dot pytest-timeout mock WebTest cov-core coverage configobj]; doCheck = true; propagatedBuildInputs = with self; [Beaker configobj decorator dulwich hgsubversion hg-evolve infrae.cache mercurial msgpack-python pyramid pyramid-jinja2 pyramid-mako repoze.lru simplejson subprocess32 subvertpy six translationstring WebOb wheel zope.deprecation zope.interface ipdb ipython gevent greenlet gunicorn waitress pytest py pytest-cov pytest-sugar pytest-runner pytest-catchlog pytest-profiling gprof2dot pytest-timeout mock WebTest cov-core coverage]; diff --git a/vcsserver/subprocessio.py b/vcsserver/subprocessio.py --- a/vcsserver/subprocessio.py +++ b/vcsserver/subprocessio.py @@ -23,10 +23,13 @@ along with git_http_backend.py Project. If not, see . """ import os +import logging import subprocess32 as subprocess from collections import deque from threading import Event, Thread +log = logging.getLogger(__name__) + class StreamFeeder(Thread): """ @@ -117,7 +120,7 @@ class InputStreamChunker(Thread): s = self.source t = self.target cs = self.chunk_size - ccm = self.chunk_count_max + chunk_count_max = self.chunk_count_max keep_reading = self.keep_reading da = self.data_added go = self.go @@ -127,14 +130,14 @@ class InputStreamChunker(Thread): except ValueError: b = '' + timeout_input = 20 while b and go.is_set(): - if len(t) > ccm: + if len(t) > chunk_count_max: keep_reading.clear() - keep_reading.wait(2) - - if not keep_reading.wait(10): - raise Exception( - "Timed out while waiting for input to be read.") + keep_reading.wait(timeout_input) + if len(t) > chunk_count_max + timeout_input: + log.error("Timed out while waiting for input from subprocess.") + os._exit(-1) # this will cause the worker to recycle itself t.append(b) da.set()