Issue #213 resolved

Mercurial/Python process ends with return code 1

Andreas Kaempf
created an issue

Hi! I got a 'Mercurial/Python process ends with return code 1' when pushing to the remote repo both using http as also https. Both pull and outgoing worked fine. After restarting the scm server it is working again. Just to let you know and that the 5 hours I spent on this yesterdays may do some good I add the trace.

I am using a reverse proxy.

Just let me know if you need something else.

Comments (10)

  1. Andreas Kaempf reporter

    Server is debian squeeze with Mercurial (version 2.2.2) from backports.

    Apache2 reverse proxy:

    # For SCM-Manager {
             ProxyRequests Off
             ProxyPreserveHost On
            <Proxy *>
                     Order deny,allow
                     Allow from all
            </Proxy>
             ProxyPass /scm http://localhost:8080/scm
             ProxyPassReverse /scm http://localhost:8080/scm
             ProxyPassReverseCookiePath /scm http://localhost:8080/scm
            <Location /scm>
                     Order allow,deny
                     Allow from all
            </Location>
    # For SCM-Manager }
    

    I am using a self-signed certificate. This issue appeared for accessing the repo both with http and https.

  2. Sebastian Sdorra repo owner

    Do you use force base url (Config->General->Force Base Url)? Could you search your log for a line like the following:

    14:41:19.555 [qtp23994289-33] INFO  sonia.scm.repository.HgHookManager - use http://localhost:8080/scm/hook/hg/ for mercurial hooks
    

    Point the url in this log message to your proxy server or directly to the scm-manager instance?

  3. Andreas Kaempf reporter

    I do not use force base url, because in the reverse proxy example it was told not to use it.

    The hook message preceeding the error case was the following:

    17:42:05.300 [qtp1459992991-19] INFO  sonia.scm.repository.HgHookManager - use http://localhost:8080/scm/hook/hg/ for mercurial hooks
    

    The last one, now that it is working, was this one:

    07:16:42.475 [qtp1459992991-17] INFO  sonia.scm.repository.HgHookManager - use http://shilappv127:8080/scm/hook/hg/ for mercurial hooks
    

    Btw, adding the date to the trace messages would be of some use IMHO.

  4. x y

    it happened again and has a valid cause, but I had to go to the server and look into the logs to see that there was not enough storage space:

    14:21:11.375 [Thread-3305] WARN  sonia.scm.web.cgi.DefaultCGIExecutor - Traceback (most recent call last):
      File "/home/user/.scm/lib/python/hgweb.py", line 42, in <module>
        wsgicgi.launch(application)
      File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/wsgicgi.py", line 76, in launch
        content = application(environ, start_response)
      File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/hgweb_mod.py", line 91, in __call__
        return self.run_wsgi(req)
      File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/hgweb_mod.py", line 127, in run_wsgi
        return protocol.call(self.repo, req, cmd)
      File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/protocol.py", line 76, in call
        rsp = wireproto.dispatch(repo, p, cmd)
      File "/usr/lib/python2.7/dist-packages/mercurial/wireproto.py", line 344, in dispatch
        return func(repo, proto, *args)
      File "/usr/lib/python2.7/dist-packages/mercurial/wireproto.py", line 578, in unbundle
        lock=lock)
      File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line 1901, in addchangegroup
        if fl.addgroup(source, revmap, trp) is None:
      File "/usr/lib/python2.7/dist-packages/mercurial/revlog.py", line 1184, in addgroup
        p1, p2, (baserev, delta), ifh, dfh)
      File "/usr/lib/python2.7/dist-packages/mercurial/revlog.py", line 1082, in _addrevision
        self.checkinlinesize(transaction, ifh)
      File "/usr/lib/python2.7/dist-packages/mercurial/revlog.py", line 939, in checkinlinesize
        df.write(self._chunkraw(r, r))
    IOError: [Errno 28] No space left on device
    Error in sys.excepthook:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, in apport_excepthook
        from apport.fileutils import likely_packaged, get_recent_crashes
      File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 95, in _demandimport
        return _import(name, globals, locals, fromlist, level)
      File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
        from apport.report import Report
      File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 114, in _demandimport
        mod = _origimport(name, globals, locals)
      File "/usr/lib/python2.7/dist-packages/apport/report.py", line 155, in <module>
        class Report(problem_report.ProblemReport):
      File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 86, in __getattribute__
        self._load()
      File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 58, in _load
        mod = _origimport(head, globals, locals)
      File "/usr/lib/python2.7/dist-packages/problem_report.py", line 93, in <module>
        class ProblemReport(UserDict):
    TypeError: Error when calling the metaclass bases
        module.__init__() takes at most 2 arguments (3 given)
    
    Original exception was:
    Traceback (most recent call last):
      File "/home/user/.scm/lib/python/hgweb.py", line 42, in <module>
        wsgicgi.launch(application)
      File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/wsgicgi.py", line 76, in launch
        content = application(environ, start_response)
      File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/hgweb_mod.py", line 91, in __call__
        return self.run_wsgi(req)
      File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/hgweb_mod.py", line 127, in run_wsgi
        return protocol.call(self.repo, req, cmd)
      File "/usr/lib/python2.7/dist-packages/mercurial/hgweb/protocol.py", line 76, in call
        rsp = wireproto.dispatch(repo, p, cmd)
      File "/usr/lib/python2.7/dist-packages/mercurial/wireproto.py", line 344, in dispatch
        return func(repo, proto, *args)
      File "/usr/lib/python2.7/dist-packages/mercurial/wireproto.py", line 578, in unbundle
        lock=lock)
      File "/usr/lib/python2.7/dist-packages/mercurial/localrepo.py", line 1901, in addchangegroup
        if fl.addgroup(source, revmap, trp) is None:
      File "/usr/lib/python2.7/dist-packages/mercurial/revlog.py", line 1184, in addgroup
        p1, p2, (baserev, delta), ifh, dfh)
      File "/usr/lib/python2.7/dist-packages/mercurial/revlog.py", line 1082, in _addrevision
        self.checkinlinesize(transaction, ifh)
      File "/usr/lib/python2.7/dist-packages/mercurial/revlog.py", line 939, in checkinlinesize
        df.write(self._chunkraw(r, r))
    IOError: [Errno 28] No space left on device
    
    14:21:11.377 [qtp1449186002-4146] WARN  sonia.scm.web.HgCGIExceptionHandler - Mercurial/Python process ends with return code 1
    
  5. Log in to comment