MemoryError in decompress for large file

Issue #2426 duplicate
Richard Cohen
created an issue

I was trying to update to a revision that contains a file ~86MB. The revision was created on a Windows 7 64-bit system. I am trying to restore on a Windows XP 32-bit system, and update fails on that file.

I attempted to save the file at that revision from the TortoiseHG workbench, and got the backtrace shown below.

    ** Mercurial version (2.4.2+20130203).  TortoiseHg version (2.7)
    ** Command: --nofork workbench
    ** CWD: H:\DMS
    ** Encoding: cp1252
    ** Extensions loaded: convert
    ** Python version: 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]
    ** Windows version: sys.getwindowsversion(major=5, minor=1, build=2600, platform=2, service_pack='Service Pack 3')
    ** Processor architecture: x86
    ** Qt-4.8.4 PyQt-4.9.6 QScintilla-2.7
    Traceback (most recent call last):
      File "tortoisehg\hgqt\filectxactions.pyo", line 228, in savefile
      File "tortoisehg\hgqt\qtlib.pyo", line 186, in savefiles
      File "mercurial\commands.pyo", line 1103, in cat
      File "mercurial\context.pyo", line 491, in data
      File "mercurial\filelog.pyo", line 38, in read
      File "mercurial\revlog.pyo", line 913, in revision
      File "mercurial\revlog.pyo", line 831, in _chunk
      File "mercurial\revlog.pyo", line 87, in decompress

Comments (4)

  1. Steve Borho

    MemoryErrors are only seen on x86 Windows, and the problem in order of frequency is:

    1) Fragmentation (THG being a long-lived GUI process makes this worse) 2) address space 3) virtual memory

    Upgrading to an x64 O/S resolves the issue; and since the root causes are deep within Windows, Python, and HG, there isn't anything we can do about it.

  2. Log in to comment