Error during "bzr commit" ERROR: exceptions.MemoryError

Bug #217290 reported by Brent Douglas
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

Plenty of RAM and HDD space...

Ubuntu Gutsy Gibbin
root@pdxlnxcode:/code# uname -a
Linux pdxlnxcode 2.6.22-14-server #1 SMP Tue Dec 18 08:31:40 UTC 2007 i686 GNU/Linux
=====
root@pdxlnxcode:/code# bzr --version
Bazaar (bzr) 1.3.1rc1
  Python interpreter: /usr/bin/python 2.5.1.final.0
  Python standard library: /usr/lib/python2.5
  bzrlib: /usr/lib/python2.5/site-packages/bzrlib
  Bazaar configuration: /root/.bazaar
  Bazaar log file: /root/.bzr.log
=====
root@pdxlnxcode:/code# bzr update
Tree is up to date at revision 137.
root@pdxlnxcode:/code# bzr commit -m "Daily sync"
Committing to: /code/
modified sql/amaa_inventory.sql
modified sql/amprojects.sql
modified sql/amvs.sql
modified sql/directory.sql
modified sql/ipscheme.sql
modified sql/password.sql
modified sql/routermon.sql
modified sql/rtrack.sql
bzr: ERROR: exceptions.MemoryError:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 834, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 790, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 2355, in run
    author=author)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 246, in commit
    result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 187, in commit
    revprops=revprops, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 355, in commit
    self._update_builder_with_changes()
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 656, in _update_builder_with_changes
    self._populate_from_inventory(specific_files)
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 784, in _populate_from_inventory
    content_summary)
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 826, in _record_entry
    self.parent_invs, path, self.work_tree, content_summary)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 362, in record_entry_contents
    ie.file_id, lines, heads, nostore_sha)
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 91, in _add_text_to_weave
    self.random_revid)
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1171, in _add_text_to_weave
    random_id=random_revid, check_content=False)[0:2]
  File "/usr/lib/python2.5/site-packages/bzrlib/versionedfile.py", line 138, in add_lines_with_ghosts
    parent_texts, nostore_sha, random_id, check_content)
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 984, in _add_lines_with_ghosts
    parent_texts, None, nostore_sha, random_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 1020, in _add
    line_bytes = ''.join(lines)
MemoryError

bzr 1.3.1rc1 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'commit']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.3.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Tags: commit lfs memory
Revision history for this message
Heuvelink (aheuvelink) wrote :

I got this same bug.

-----------------------------------------------------------------------------------------------------------------
C:\Program Files\Bazaar>bzr commit D:/Folder -m "comments"
FTP <email address hidden> password:
bzr: ERROR: exceptions.MemoryError:

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 857, in run_bzr_catch_errors
  File "bzrlib\commands.pyo", line 797, in run_bzr
  File "bzrlib\commands.pyo", line 499, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 2290, in run
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\workingtree_4.pyo", line 242, in commit
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\mutabletree.pyo", line 197, in commit
  File "bzrlib\commit.pyo", line 341, in commit
  File "bzrlib\workingtree_4.pyo", line 1663, in _get_inventory
  File "bzrlib\workingtree_4.pyo", line 1526, in _generate_inventory
  File "bzrlib\dirstate.pyo", line 1981, in _read_dirblocks_if_needed
  File "_dirstate_helpers_c.pyx", line 694, in bzrlib._dirstate_helpers_c._read_
dirblocks_c
  File "_dirstate_helpers_c.pyx", line 661, in bzrlib._dirstate_helpers_c.Reader
._parse_dirblocks
  File "_dirstate_helpers_c.pyx", line 583, in bzrlib._dirstate_helpers_c.Reader
._get_entry
  File "_dirstate_helpers_c.pyx", line 502, in bzrlib._dirstate_helpers_c.Reader
.get_next_str
MemoryError

bzr 1.6.1 on python 2.5.2 (win32)
arguments: ['bzr', 'commit', 'D:/Proefschrift', '-m', 'nieuwe versie intro en re
lated en veel refs']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [1.6.0]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [unknown]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.9.3]
  svn C:\Program Files\Bazaar\plugins\svn [0.4.11]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

-----------------------------------------------------------------------------------------------------------------
I got this bug after I restarted my system because I could not commit new files.

When I attempted to commit the files before the restart I got the error "bzr: ERROR: Could not acquire lock File" with File being something in /.bzr/File When I attempted to break-lock that file I got an error that it was used and unable to be broken. So I restarted the system and encountered the bug copied above...

Revision history for this message
Directrix1 (directrix1) wrote :
Download full text (3.3 KiB)

I have a large (>100MB) zip file that I have just recently added. This happened to me when trying to commit:

Committing to: /home/dtx/projects/kidzpicz/
added dist
added dist/kidzpicz
aborting commit write group: MemoryError()
bzr: ERROR: exceptions.MemoryError:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 896, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 842, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 542, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 2698, in run
    exclude=safe_relpath_files(tree, exclude))
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 224, in commit
    result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 208, in commit
    *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 367, in commit
    self._update_builder_with_changes()
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 672, in _update_builder_with_changes
    self._populate_from_inventory()
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 819, in _populate_from_inventory
    content_summary)
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 863, in _record_entry
    ie, self.parent_invs, path, self.work_tree, content_summary)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 450, in record_entry_contents
    ie.file_id, lines, heads, nostore_sha)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 512, in _add_text_to_weave
    check_content=False)[0:2]
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 764, in add_lines
    parent_texts, left_matching_blocks, nostore_sha, random_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 774, in _add
    line_bytes = ''.join(lines)
MemoryError

bzr 1.12 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'commit', '-m', 'Added basic dist']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  email /usr/lib/python2.5/site-packages/bzrlib/plugins/email [unknown]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.95.0.final.1]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  netrc_credential_store /usr/lib/python2.5/site-packages/bzrlib/plugins/netrc_credential_store [unknown]
  pqm /usr/lib/python2.5/site-packages/bzrlib/plugins/pqm [1.0dev]
  rebase /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.3]
*** ...

Read more...

Revision history for this message
Directrix1 (directrix1) wrote :

Removing the zip file does fix my problem, btw.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This is a dupe, but I can't find the original atm

Changed in bzr:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Jaco Vosloo (g-launchpad-jacovosloo-info) wrote :

Same problem here on Ubuntu Jaunty trying to commit a 400MB file. My computer has 500MB Ram and 800MB swap. I will try to increase the swap to see if that helps.

It seems to be a similar situation as I reported in bug https://bugs.launchpad.net/bzr-svn/+bug/191731.
We need some form of streaming method of working with these files as was said here: https://lists.ubuntu.com/archives/bazaar/2009q1/053469.html

Martin Pool (mbp)
Changed in bzr:
status: Triaged → Confirmed
Jelmer Vernooij (jelmer)
tags: added: commit memory
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: added: lfs
removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 3.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.