abort: stream ended unexpectedly when cloning repo

Gregory Szorc gregory.szorc at gmail.com
Tue Sep 6 16:40:16 UTC 2016


FWIW, Mozilla has been seeing this "stream ended unexpectedly" failure in
Firefox automation: https://bugzilla.mozilla.org/show_bug.cgi?id=1291926

All but 1 report (which may be a one-off) originated on Windows machines.
I'm starting to question whether there is a client-side TCP/socket issue on
that platform.

It is also possible the underlying failure is getting masked by bundle2's
behavior of attempting to consume the underlying stream after failure. I
touched this code a little in Mercurial 3.9.1 (
https://www.mercurial-scm.org/repo/hg-all/rev/9a9629b9416c). Specifically,
I wonder if we're hitting a scenario like the following:

1) Attempting to process a changegroup part results in failure, say
SocketError
2) bundle2 attempts to consume remaining part data
3) changegroup.readexactly() fails to read data and raises Abort("stream
ended unexpectedly")

My reading of the code indicates we can mask the inner exception in this
scenario. i.e. we replace potentially useful error messages indicating the
root cause with "stream ended unexpectedly." I feel like there is more work
to be done around bundle2's error handling...

On Wed, Aug 10, 2016 at 12:05 PM, Matt Mackall <mpm at selenic.com> wrote:

> On Wed, 2016-08-10 at 09:49 +0100, Simon King wrote:
> > I don't know what all the fields in those logs represent, but if the
> > 10th field is the size of the response, then 4294967457 is 161 bytes
> > bigger than 4GB, which sounds very suspicious - perhaps you are
> > hitting a size limit somewhere?
>
> That seems very likely. In particular, the IIS SSL implementation is known
> to
> have trouble with large streams.
>
> Seriously, you will save yourself a lot of pain if you use any web server
> other
> than IIS. I'd rate hgweb deployment choices something like this:
>
> Linux + Apache: most documented, most reliable, scales well
> Linux + Nginx: works ok, minor config gotchas, no real advantages
> Windows + Apache: works, reliable, but slower and doesn't scale as well
> Windows + hg serve: basically a toy, but at least it's reliable
> Windows + IIS: still doesn't scale well, mystery bugs, useless diagnostics
>
> --
> Mathematics is the supreme nostalgia of our time.
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial/attachments/20160906/2b094db6/attachment.html>


More information about the Mercurial mailing list