[Zope-dev] RestrictedPython under no-GC 2.1 seems to leak a hell of a lot.

Anthony Baxter anthony@interlink.com.au
Wed, 17 Oct 2001 18:10:27 +1000


Running current Zope 2.4 CVS under python 2.1 built --without-cycle-gc,
I'm seeing an absolutely _enormous_ amount of leaked objects in 
RestrictedPython. This is on one of our ZEO clients, after 45 minutes
of runtime. The deltas are after 5 minutes.

RestrictedPython.compiler.transformer.Transformer 146527 163546 +17019 
RestrictedPython.compiler.visitor.ASTVisitor 55842 62333 +6491 
RestrictedPython.compiler.misc.Set 34827 38843 +4016 
RestrictedPython.compiler.pyassem.FlowGraph 19173 21413 +2240 
RestrictedPython.compiler.ast.Stmt 19174 21390 +2216 
RestrictedPython.compiler.pycodegen.CodeGenerator 18333 20486 +2153 
RestrictedPython.compiler.symbols.SymbolVisitor 15303 17096 +1793 
RestrictedPython.compiler.ast.Name 13917 15542 +1625 
RestrictedPython.compiler.ast.Const 14083 15691 +1608 
RestrictedPython.compiler.ast.CallFunc 13798 15405 +1607 
RestrictedPython.MutatingWalker.MutatingWalker 11968 13360 +1392 
RestrictedPython.compiler.ast.Return 11986 13371 +1385 
RestrictedPython.compiler.ast.Function 11986 13371 +1385 
RestrictedPython.RestrictionMutator.RestrictionMutator 11800 13166 +1366 
RestrictedPython.compiler.pycodegen.LocalNameFinder 11028 12322 +1294 
RestrictedPython.compiler.pyassem.Block 10226 11401 +1175 
RestrictedPython.compiler.pyassem.PyFlowGraph 9587 10707 +1120 
RestrictedPython.compiler.misc.Stack 9587 10703 +1116 
RestrictedPython.compiler.ast.Module 9590 10698 +1108 
RestrictedPython.compiler.ast.Global 5761 6433 +672 
RestrictedPython.compiler.ast.Assign 5761 6433 +672 
RestrictedPython.compiler.ast.AssName 5761 6433 +672

After around an hour of runtime, the various ZEO clients are
chewing about 100M of virtual memory each, and growing at a 
fearsome fearsome rate...

Is this just a "known problem, deal with it"? I can't just turn back
on the garbage collector, as it's causing random segfaults (yes, I'm
working on trying to fix this as I speak^H^H^H^H^Htype).

Anthony