[Bug 4923] New: "stream ended unexpectedly" on very large streams

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Thu Oct 29 01:06:26 UTC 2015


https://bz.mercurial-scm.org/show_bug.cgi?id=4923

            Bug ID: 4923
           Summary: "stream ended unexpectedly" on very large streams
           Product: Mercurial
           Version: 3.5.1
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at selenic.com
          Reporter: ivan_pozdeev at mail.ru
                CC: mercurial-devel at selenic.com

I'm consistently getting this error on trying to clone
http://hg.python.org/cpython, first reported in
https://github.com/python/pythondotorg/issues/811

See the attachment for details. This happens at different moments and different
stages.

It's definitely not a network issue, as in Wireshark, I see only minor
perturbations in the packet flow and the connection being closed normally from
my side. Nor is it #4616 since this happens with newer versions, too.

The best tell I found so far is

mercurial\changegroup.py:20:

def readexactly(stream, n):
    '''read n bytes from stream.read and abort if less was available'''
->  s = stream.read(n)
    if len(s) < n:
        raise util.Abort(_("stream ended unexpectedly"
                           " (got %d bytes, expected %d)")
                          % (len(s), n))

It tries to read the entire stream into a string - which is gonna be impossible
if it's _almost a gigabyte in size_ (in this case; I've seen larger) - unless
this is an x64 with tons of address space and available memory.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list