LockableFiles.__del__ creates uncollectable garbage including connected sockets

Bug #335180 reported by Michael Hudson-Doyle
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Unassigned

Bug Description

Running this code:

>>> while 1:
... b = bzrlib.branch.Branch.open("http://localhost:8080/trunk")
... del b
... gc.collect()

will eventually run you out of file descriptors. Looking in gc.garbage reveals lots of socket._fileobject objects. I'm not _completely_ sure why, but commenting out LockableFiles.__del__ makes this problem go away, so we should try to find a way of retaining its functionality without an actual __del__ method on the class itself.

Related branches

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

This got into 1.14, I think. It's landed, anyway.

Changed in bzr:
status: New → Fix Released
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.