[BUG] bzr branch dies with MemoryError

John Whitley whitley at acm.org
Tue May 9 00:25:03 BST 2006


[Submitted as 43702 in Malone.  Cleverly disguised with the erroneous  
title of "bzr pull dies with MemoryError", but Malone won't let me  
correct that mistake..  :-P -- jw]

Platform: Cygwin
bzr: 0.8 release

Repro steps:
1) bzr init-repo trunk
2) cd trunk
3) bzr init head
4) cd head
5) drop in nearly 1GB of files into head
6) bzr add .
7) bzr commit -m "first commit"
8) cd ..
9) bzr branch head a_new_branch

Produces:
bzr: ERROR: exceptions.MemoryError:
   at /usr/local/lib/bzr-0.8/bzrlib/tuned_gzip.py line 62
   in _add_read_data

Log details:
readv coalesced 1 reads.
[>>OMITTED: The above line occurs 8892 times in the log! -- JW]
[  148] Mon 15:00:14.837 ERROR: exceptions.MemoryError:
   at /usr/local/lib/bzr-0.8/bzrlib/tuned_gzip.py line 62
   in _add_read_data
Traceback (most recent call last):
   File "/usr/local/lib/bzr-0.8/bzrlib/commands.py", line 650, in  
run_bzr_catch_errors
     return run_bzr(argv)
   File "/usr/local/lib/bzr-0.8/bzrlib/commands.py", line 612, in  
run_bzr
     ret = run(*run_argv)
   File "/usr/local/lib/bzr-0.8/bzrlib/commands.py", line 246, in  
run_argv_aliases
     return self.run(**all_cmd_args)
   File "/usr/local/lib/bzr-0.8/bzrlib/builtins.py", line 612, in run
     dir = br_from.bzrdir.sprout(to_location, revision_id, basis_dir)
   File "/usr/local/lib/bzr-0.8/bzrlib/bzrdir.py", line 586, in sprout
     result.create_workingtree()
   File "/usr/local/lib/bzr-0.8/bzrlib/bzrdir.py", line 794, in  
create_workingtree
     return WorkingTreeFormat.get_default_format().initialize(self,  
revision_id)
   File "/usr/local/lib/bzr-0.8/bzrlib/workingtree.py", line 1639, in  
initialize
     build_tree(wt.basis_tree(), wt)
   File "/usr/local/lib/bzr-0.8/bzrlib/transform.py", line 926, in  
build_tree
     tree)
   File "/usr/local/lib/bzr-0.8/bzrlib/transform.py", line 940, in  
new_by_entry
     contents = tree.get_file(entry.file_id).readlines()
   File "/usr/local/lib/bzr-0.8/bzrlib/tree.py", line 155, in get_file
     return StringIO(self.get_file_text(file_id))
   File "/usr/local/lib/bzr-0.8/bzrlib/tree.py", line 152, in  
get_file_text
     return ''.join(self.get_file_lines(file_id))
   File "/usr/local/lib/bzr-0.8/bzrlib/tree.py", line 149, in  
get_file_lines
     return weave.get_lines(ie.revision)
   File "/usr/local/lib/bzr-0.8/bzrlib/knit.py", line 721, in get_lines
     return self._get_content(version_id).text()
   File "/usr/local/lib/bzr-0.8/bzrlib/knit.py", line 586, in  
_get_content
     components = self._get_components(version_id)
   File "/usr/local/lib/bzr-0.8/bzrlib/knit.py", line 561, in  
_get_components
     components.update(self._data.read_records(records))
   File "/usr/local/lib/bzr-0.8/bzrlib/knit.py", line 1387, in  
read_records
     for record_id, content, digest in self.read_records_iter(records):
   File "/usr/local/lib/bzr-0.8/bzrlib/knit.py", line 1378, in  
read_records_iter
     content, digest = self._parse_record(record_id, data)
   File "/usr/local/lib/bzr-0.8/bzrlib/knit.py", line 1309, in  
_parse_record
     record_contents = df.readlines()
   File "/usr/local/lib/bzr-0.8/bzrlib/tuned_gzip.py", line 260, in  
readlines
     content = self.read(sizehint)
   File "/tmp/python.572/usr/lib/python2.4/gzip.py", line 217, in read
     self._read(readsize)
   File "/usr/local/lib/bzr-0.8/bzrlib/tuned_gzip.py", line 103, in  
_read
     self._add_read_data(self.decompress.decompress(buf))
   File "/usr/local/lib/bzr-0.8/bzrlib/tuned_gzip.py", line 62, in  
_add_read_data
     self.extrabuf += data
MemoryError

return code 3





More information about the bazaar mailing list