Bazaar should check if it will have enough memory before pushing a branch

Bug #230472 reported by TimeHorse
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned
Breezy
Won't Fix
Undecided
Unassigned

Bug Description

This isn't so much a bug but would help with stuff like https://bugs.launchpad.net/bzr-svn/+bug/54253 and the issue I am seeing:

bzr: ERROR: exceptions.MemoryError:

Traceback (most recent call last):
  File "/home/crew/user/bin/lib/python2.5/site-packages/bzrlib/commands.py", line 846, in run_bzr_catch_errors
  File "/home/crew/user/bin/lib/python2.5/site-packages/bzrlib/commands.py", line 802, in run_bzr
  File "/home/crew/user/bin/lib/python2.5/site-packages/bzrlib/commands.py", line 504, in run_argv_aliases
  File "/home/crew/user/bin/lib/python2.5/site-packages/bzrlib/builtins.py", line 844, in run
  File "/home/crew/user/bin/lib/python2.5/site-packages/bzrlib/repository.py", line 947, in fetch
  File "/home/crew/user/bin/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
  File "/home/crew/user/bin/lib/python2.5/site-packages/bzrlib/repository.py", line 2764, in fetch
  File "/home/crew/user/bin/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 589, in pack
  File "/home/crew/used/bin/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 743, in _create_pack_from_packs
  File "/home/crew/user/bin/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 361, in finish
  File "/home/crew/user/bin/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 420, in _write_index
  File "/home/crew/user/lib/python2.5/site-packages/bzrlib/index.py", line 238, in finish
    return StringIO(''.join(lines))
MemoryError

bzr 1.4 on python 2.5.2 (linux2)
arguments: ['/home/crew/user/bin/bzr', 'push', 'sftp://bazaar.launchpad.net/~user/project/new_branch']
encoding: 'ANSI_X3.4-1968', fsenc: 'ANSI_X3.4-1968', lang: None
plugins:
  launchpad /home/crew/user/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.

--------

This issue does not SEEM to be related specifically or actually in any way, save that the parent's parent's parent is based on an svn repository, but the biggest problem is not the inability to branch my code, it is that the failure occurs at the VERY END of the branching upload, so I spend all this bandwidth uploading my branch to launchpad and then as it tries to complete the process with some kind of 3-pass indexing routine, it dies with an egregious memory error and thus I spend all that money on bandwidth for nothing and have to start the entire process again from scratch.

I have tried to apply my own little help to the memory glut that bazaar seems to incur with the included patch to delete some rather large variable once they are no longer needed. The fix is for bzrlib/index.py. This does not totally help, however.

Isn't there SOME WAY of doing all that memory intensive stuff up front and dying early instead of at the very end??? PLEASE??? Save my bandwidth!

Thanks.

Tags: memory
Revision history for this message
TimeHorse (timehorse) wrote :
Revision history for this message
James Westby (james-w) wrote :

Hi,

It's odd that the join is done twice in the original code, we
probably want to fix that regardless.

Could you please send your patch to the mailing list:
<email address hidden> for more discussion.

Thanks,

James

James Westby (james-w)
Changed in bzr:
importance: Undecided → Wishlist
status: New → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Won't Fix
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.