Issue #14098 invalid

Cannot clone repository - error fetching bundle

Jan Krivanek
created an issue

I'm unable to clone some of our repositories (seems to be specific to repositories with subrepos - but it might be just coincidence).

Example verbose output:

[command returned code 255 Thu Apr 06 12:57:44 2017]
% hg clone --verbose https://bitbucket.org/kgtinv/kgt_machinelearning_all_jirivahala "C:\TeamCity\buildAgent\work\656b5209ee1d129\MLSources"
http authorization required for https://bitbucket.org/kgtinv/kgt_machinelearning_all_jirivahala
realm: Bitbucket.org HTTP
 applying clone bundle from https://media-api.atlassian.io/file/87e89f95-2872-49f3-a940-02d2bac5baba/binary?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIxYmZmZmU5OS0zMzJjLTRkNTgtYTkxOC0yNjhkMjRiNDdmZDIiLCJhY2Nlc3MiOnsidXJuOmZpbGVzdG9yZTpmaWxlOjg3ZTg5Zjk1LTI4NzItNDlmMy1hOTQwLTAyZDJiYWM1YmFiYSI6WyJyZWFkIl19LCJuYmYiOjE0OTE0ODM0MTUsImV4cCI6MTQ5MTQ4MzgzNX0.95RTN5Zkoqc8JfQRbkVnRy540nPNKtywMqMV_TNtEwk&client=1bfffe99-332c-4d58-a918-268d24b47fd2
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 4.0)
** Extensions loaded: tortoisehg.util.hgcommands, tortoisehg.util.partialcommit, tortoisehg.util.pipeui, tortoisehg.util.win32ill, tortoisehg.util.hgdispatch
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 4.0)
** Extensions loaded: tortoisehg.util.hgcommands, tortoisehg.util.partialcommit, tortoisehg.util.pipeui, tortoisehg.util.win32ill, tortoisehg.util.hgdispatch
Traceback (most recent call last):
  File "hg", line 49, in <module>
  File "mercurial\dispatch.pyo", line 60, in run
  File "mercurial\dispatch.pyo", line 126, in dispatch
  File "mercurial\dispatch.pyo", line 216, in _runcatch
  File "mercurial\dispatch.pyo", line 225, in callcatch
  File "mercurial\dispatch.pyo", line 205, in _runcatchfunc
  File "mercurial\dispatch.pyo", line 901, in _dispatch
  File "mercurial\dispatch.pyo", line 650, in runcommand
  File "mercurial\dispatch.pyo", line 909, in _runcommand
  File "mercurial\dispatch.pyo", line 898, in <lambda>
  File "mercurial\util.pyo", line 1037, in check
  File "mercurial\commands.pyo", line 6581, in serve
  File "mercurial\cmdutil.pyo", line 907, in service
  File "mercurial\commandserver.pyo", line 340, in run
  File "mercurial\commandserver.pyo", line 293, in serve
  File "mercurial\commandserver.pyo", line 268, in serveone
  File "mercurial\commandserver.pyo", line 251, in runcommand
  File "mercurial\dispatch.pyo", line 126, in dispatch
  File "mercurial\dispatch.pyo", line 216, in _runcatch
  File "mercurial\dispatch.pyo", line 225, in callcatch
  File "mercurial\dispatch.pyo", line 205, in _runcatchfunc
  File "mercurial\extensions.pyo", line 220, in closure
  File "tortoisehg\util\hgdispatch.pyo", line 23, in _dispatch
  File "mercurial\dispatch.pyo", line 901, in _dispatch
  File "mercurial\dispatch.pyo", line 650, in runcommand
  File "mercurial\dispatch.pyo", line 909, in _runcommand
  File "mercurial\dispatch.pyo", line 898, in <lambda>
  File "mercurial\util.pyo", line 1037, in check
  File "mercurial\commands.pyo", line 1559, in clone
  File "mercurial\hg.pyo", line 610, in clone
  File "mercurial\exchange.pyo", line 1212, in pull
  File "mercurial\exchange.pyo", line 1800, in _maybeapplyclonebundle
  File "mercurial\exchange.pyo", line 1950, in trypullbundlefromurl
IndexError: tuple index out of range
cmdserver: process exited unexpectedly with code 255

from time to time I get even alert window:

---------------------------
Command Error
---------------------------
<b>abort: error applying bundle
hint: if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false"</b>
---------------------------
<nobr>error fetching bundle: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond</nobr><br /><nobr></nobr><br /><nobr>[Code: 255]</nobr><br />
---------------------------
OK   
---------------------------

or

---------------------------
Command Error
---------------------------
<b>abort: error applying bundle
hint: if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false"</b>
---------------------------
<nobr>error fetching bundle: EOF occurred in violation of protocol (_ssl.c:581)</nobr><br /><nobr></nobr><br /><nobr>[Code: 255]</nobr><br />
---------------------------
OK   
---------------------------

Specifying the '--config ui.clonebundles=false' manually seems to workaround the issue - but this is affecting also our build servers where solution is not so straightforward

Is this known with any known fix or ETA for fix? Thanks Jan

Comments (6)

  1. Sean Farley staff

    That's a strange clonebundle error. I just checked and your subrepo paths are misconfigured. I'm guessing that EOF is because Mercurial can't find the subrepo and fails down in the trybundle stack.

    I was able to clone the parent repo (not the sub repos) just fine so I'm guessing that's it. Can you also check to make sure you have Mercurial 4.1?

  2. Jan Krivanek reporter

    My appology for the late response (I have email rule for bitbucket issues as there is quite heavy traffic on some I'm interrested in and just watching and unfortunately there doesn't seem to be a way how to distinguish my issue and watched issue from the email Bitbucket is sending).

    This was a transient issue that resolved itself after couple of hours (still unpleasant though - as those few hours it blocked me). Sean Farley - can you please elaborate more in what is misconfigured in subrepo paths? We intentionaly have regexes in order to support forking/branching of entire subrepo structure withou the need to change the .hgsub file. The subrepo structure worked just fine (without changes) before and after.

    Thanks and regards Jan

  3. Log in to comment