Presence of bzr-svn plugin causes BzrDir.find_branches to leak memory

Bug #192803 reported by Andrew Bennetts
4
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
New
Undecided
Unassigned

Bug Description

This is quite likely to be a duplicate of #54253, but I can't test because I don't have the fixed python-subversion bindings for gutsy. (Someone with the fixed version should be able to rapidly confirm if this is a duplicate or not.)

If I have the svn plugin installed, this command line consumes 100s of MB of memory in seconds (even though no SVN branches are present in that directory):

$ python -c "from bzrlib.plugin import load_plugins; load_plugins(); from bzrlib.transport import get_transport; from bzrlib.bzrdir import BzrDir; print list(BzrDir.find_branches(get_transport('.')))"

But this command line stays at a steady 10MB:

$ python -c "from bzrlib.transport import get_transport; from bzrlib.bzrdir import BzrDir; print list(BzrDir.find_branches(get_transport('.')))"

(The directory I'm running that in is the root of a shared repository for bzr branches)

I'm guessing the repeated attempts to open branches in every directory as find_branches walks the filesystem are the problem.

This causes "bzr multi-pull" from bzrtools to be unusable. It also similarly affects the bzr-avahi plugin.

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

can't reproduce it here with the memory leak fix

Revision history for this message
Mattias Eriksson (snaggen) wrote :

I just ran into this when doing multi-pull using bzr 1.2
bzr-svn 0.4.7
and a patched subversion (with all the libs) containing
  * patches/python-memleak: New patch to fix a serious memory leak in the
    Python bindings. Thanks to Jelmer Vernooij. (Closes: #428755)

So I do not think this is a duplicate of #54253.

Revision history for this message
Mattias Eriksson (snaggen) wrote :

also... I have never seen this before with bzrtools 1.0.0 and less. I just upgraded it to 1.2.0 just before I saw this error for the first time.

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.