traceback from hg serve
Mads Kiilerich
mads at kiilerich.com
Thu Apr 24 10:36:56 UTC 2014
On 04/24/2014 11:21 AM, James Gregory wrote:
> Hg is serving repositories from the built-in mercurial server. Nginx
> is acting as a proxy for handling authorization etc.
>
> A continuous integration server is polling frepositories (via the
> nginx proxy) for changes, but it keeps resulting in tracebacks, which
> look like this:
>
> 127.0.0.1 - - [23/Apr/2014 16:56:20] Exception happened during
> processing request '/hg/traintracs/workbench/?cmd=capabilities':
> Traceback (most recent call last):
> File "/usr/local/lib/python2.7/dist-packages/mercurial/hgweb/server.py",
> line 80, in do_POST
> self.do_write()
> File "/usr/local/lib/python2.7/dist-packages/mercurial/hgweb/server.py",
> line 73, in do_write
> self.do_hgweb()
> File "/usr/local/lib/python2.7/dist-packages/mercurial/hgweb/server.py",
> line 140, in do_hgweb
> for chunk in self.server.application(env, self._start_response):
> File "/usr/local/lib/python2.7/dist-packages/mercurial/hgweb/hgwebdir_mod.py",
> line 153, in __call__
> return self.run_wsgi(req)
> File "/usr/local/lib/python2.7/dist-packages/mercurial/hgweb/hgwebdir_mod.py",
> line 217, in run_wsgi
> repo = hg.repository(self.ui, real)
> File "/usr/local/lib/python2.7/dist-packages/mercurial/hg.py", line
> 113, in repository
> peer = _peerorrepo(ui, path, create)
> File "/usr/local/lib/python2.7/dist-packages/mercurial/hg.py", line
> 103, in _peerorrepo
> File "/usr/local/lib/python2.7/dist-packages/mercurial/localrepo.py",
> line 2449, in instance
> obj = _peerlookup(path).instance(ui, path, create)
> return localrepository(ui, util.urllocalpath(path), create)
> File "/usr/local/lib/python2.7/dist-packages/mercurial/localrepo.py",
> line 174, in __init__
> self.ui = baseui.copy()
> File "/usr/local/lib/python2.7/dist-packages/mercurial/ui.py", line
> 49, in copy
> return self.__class__(self)
> File "/usr/local/lib/python2.7/dist-packages/mercurial/ui.py", line
> 29, in __init__
> self._tcfg = src._tcfg.copy()
> File "/usr/local/lib/python2.7/dist-packages/mercurial/config.py",
> line 53, in copy
> return config(self)
> File "/usr/local/lib/python2.7/dist-packages/mercurial/config.py",
> line 49, in __init__
> for k in data._data:
> RuntimeError: dictionary changed size during iteration
>
> Anyone know why this might be?
I guess that is because your setup uses threading in a way that assumes
thread safety where Mercurial doesn't provide it.
A description of your setup and Mercurial version can perhaps give more
insight.
Note also that many users have problems configuring ngingx correctly for
use with Mercurial, apparently because ngingx enthusiasts haven't
provided any good documentation. My personal opinion is that ngingx
probably is awesome for some uses cases but its advantages are
irrelevant for hgweb setups and it is not worth the trouble. If you are
an ngingx expert then it might be the right choice for you.
/Mads
More information about the Mercurial
mailing list