#2913: Memory Leak on SVN Repo Access using tracd or WSGI
---------------------------------------+------------------------------------
 Reporter:  edsuom                     |        Owner:  jonas
     Type:  defect                     |       Status:  new  
 Priority:  high                       |    Milestone:  0.10 
Component:  browser                    |      Version:  devel
 Severity:  major                      |   Resolution:       
 Keywords:  wsgi, tracd, memory, leak  |  
---------------------------------------+------------------------------------
Comment (by cboos):

 I have some big reservations about that patch.
 As I said before, the reality of the leak itself is still
 questionable for me: I simply don't have it.
 If you follow the instructions in TracSubversion,
 in particular if you pay attention to the compatible SWIG versions,
 I don't think a leak of pool objects will happen.
 Do someone else also have the leak? mgood?

 What happens when you insert the following debug statements?
 {{{
 #!diff
 Index: svn_fs.py
 ===================================================================
 --- trac/versioncontrol/svn_fs.py       (revision 3050)
 +++ trac/versioncontrol/svn_fs.py       (working copy)
 @@ -143,6 +143,11 @@
          # Destroy pool
          self.apr_pool_destroy(self._pool)

 +        import gc
 +        gc.set_debug(gc.DEBUG_UNCOLLECTABLE)
 +        print "GarbageCollect: ", gc.collect()
 +        print "Garbage: ", len(gc.garbage)
 +
          # Clear application pool and terminate APR if necessary
          if not self._parent_pool:
              application_pool = None
 }}}

 You should see this kind of output in your log:
 {{{
 ...
 GarbageCollect:  5
 Garbage:  0
 Trac[svn_fs] DEBUG: Closing subversion file-system at
 C:/Workspace/local/svn/trac-svnrepos
 GarbageCollect:  0
 Garbage:  0
 }}}

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/2913>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets

Reply via email to