1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #1661 closed

"abort: Interrupted system" call during push with subrepos

Anonymous created an issue

During a push via ssh of a repository with four subrepos (which also have no changes), I often get something like the following:

{{{ % hg --repository /home/user/repo_root push ssh://user@example.com/repo_root pushing to ssh://user@example.com/repo_root pushing subrepo clientlibs to ssh://user@example.com/tbmxclient_root/subrepo1 searching for changes no changes found pushing subrepo clienttoolkit to ssh://user@example.com/tbmxclient_root/subrepo2 searching for changes no changes found pushing subrepo tbmxclient to ssh://user@example.com/tbmxclient_root/subrepo3 abort: Interrupted system call [command returned code 255 Wed Feb 22 18:52:35 2012] }}}

This happens inconsistently but often (about 70% of the time), with or without any changes to be pushed. Executing the same command without TortoiseHg is always successful.

version 2.3+2-5c3390659440 with Mercurial-2.1, Python-2.7.2, PyQt-4.8.5, Qt-4.7.3

(Running on Linux Mint 12 Lisa)

Comments (5)

  1. KingGuppy

    (I wrote the original report)

    Here's the output of a new run, this time properly anonymised:

    % hg --repository /home/user/repo_root push ssh://user@example.com/repo_root
    pushing to ssh://user@example.com/repo_root
    pushing subrepo subrepo1 to ssh://user@example.com/repo_root/subrepo1
    searching for changes
    no changes found
    pushing subrepo subrepo2 to ssh://user@example.com/repo_root/subrepo2
    abort: Interrupted system call
    [command returned code 255 Thu Feb 23 13:34:35 2012]
    

    I'm also sometimes seeing the "abort: Interrupted system call" during pulls in a clone of the same repository.

    I've also found that, unsurprisingly, these problems occur on Ubuntu 11.10 with the same versions of thg, Mercurial, Python, etc.

  2. Yuya Nishihara

    thg process received some signal during read system call:

    Traceback (most recent call last):
      File "/home/yuya/work/hghacks/thg/tortoisehg/hgqt/thread.py", line 274, in run
        self.ret = hglib.dispatch(ui, self.cmdline) or 0
      File "/home/yuya/work/hghacks/thg/tortoisehg/util/hglib.py", line 724, in dispatch
        return hgdispatch._dispatch(req)
      File "/home/yuya/work/hghacks/mercurial/mercurial/dispatch.py", line 685, in _dispatch
        cmdpats, cmdoptions)
      File "/home/yuya/work/hghacks/mercurial/mercurial/extensions.py", line 184, in wrap
        return wrapper(origfn, *args, **kwargs)
      File "/home/yuya/.hgext/textful/__init__.py", line 119, in textfulcmd
        cmdoptions)
      File "/home/yuya/work/hghacks/mercurial/mercurial/dispatch.py", line 467, in runcommand
        ret = _runcommand(ui, options, cmd, d)
      File "/home/yuya/work/hghacks/mercurial/mercurial/dispatch.py", line 775, in _runcommand
        return checkargs()
      File "/home/yuya/work/hghacks/mercurial/mercurial/dispatch.py", line 746, in checkargs
        return cmdfunc()
      File "/home/yuya/work/hghacks/mercurial/mercurial/dispatch.py", line 682, in <lambda>
        d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
      File "/home/yuya/work/hghacks/mercurial/mercurial/util.py", line 463, in check
        return func(*args, **kwargs)
      File "/home/yuya/work/hghacks/mercurial/mercurial/extensions.py", line 139, in wrap
        util.checksignature(origfn), *args, **kwargs)
      File "/home/yuya/work/hghacks/mercurial/mercurial/util.py", line 463, in check
        return func(*args, **kwargs)
      File "/home/yuya/work/hghacks/mercurial/hgext/mq.py", line 3350, in mqcommand
        return orig(ui, repo, *args, **kwargs)
      File "/home/yuya/work/hghacks/mercurial/mercurial/util.py", line 463, in check
        return func(*args, **kwargs)
      File "/home/yuya/work/hghacks/mercurial/mercurial/commands.py", line 4536, in push
        if c.sub(s).push(opts) == 0:
      File "/home/yuya/work/hghacks/mercurial/mercurial/subrepo.py", line 550, in push
        other = hg.peer(self._repo.ui, {'ssh': ssh}, dsturl)
      File "/home/yuya/work/hghacks/mercurial/mercurial/hg.py", line 104, in peer
        return repository(rui, path, create)
      File "/home/yuya/work/hghacks/mercurial/mercurial/hg.py", line 93, in repository
        repo = _peerlookup(path).instance(ui, path, create)
      File "/home/yuya/work/hghacks/mercurial/hgext/schemes.py", line 72, in instance
        return hg._peerlookup(url).instance(ui, url, create)
      File "/home/yuya/work/hghacks/mercurial/mercurial/sshrepo.py", line 58, in __init__
        self.validate_repo(ui, sshcmd, args, remotecmd)
      File "/home/yuya/work/hghacks/mercurial/mercurial/sshrepo.py", line 80, in validate_repo
        l = r.readline()
    IOError: [Errno 4] Interrupted system call
    

    Maybe it won't happen on pure hg. But TortoiseHg executes Mercurial command in thread, there's a risk of EINTR.

  3. Yuya Nishihara

    cmdcore: add worker to run command in separate command-server process

    Currently it can run repository commands with no user interaction.

    Known issues:

    • ui.interactive is off for now (will be implemented soon)
    • progress won't be cleared on abort due to lack of final pos=None messages
    • command-server process isn't shut down cleanly when repository closed
    • command-server won't reload settings (need to restart on configChanged)
    • "hg clone" will fail if cwd has no repository
    • "ui.error" label isn't available
    • MQ status may corrupt if changed by another process because command-server does not invalidate repo.mq (fixed by hg e3d1df48fcc6)

    CmdThread will eventually be superseded by CmdServer:

    • TortoiseHg 3.0 will provide the experimental command-server client, which can be enabled by thg --config tortoisehg.cmdworker=server
    • 3.1 will use "server" by default
    • 3.2 will remove CmdThread completely

    refs #1507, #1661, #2071, #2614, #3343, #3370, #3637

    → <<cset d02cfaed8676>>

  4. Yuya Nishihara

    cmdcore: enable command-server client by default in 3.1

    As I said in d02cfaed8676, CmdThread will be removed in 3.2.

    refs #1507 - "Stop button for pull hangs" should be fixed on Unix, but not on Windows due to the limitation of winsock.

    refs #3381 - "Locked folders/files on Windows" is partially solved since Mercurial commands are run in separate chdir-ed process.

    closes #484, #1661, #2071, #2614, #3343, #3370, #3637, #3670

    → <<cset 38985e4f9bd0>>

  5. Log in to comment