[Zope-dev] disabling gc does not necessarily hide memory corruption

Anthony Baxter Anthony Baxter <anthony@interlink.com.au>
Tue, 18 Dec 2001 14:58:56 +1100


>>> Chris McDonough wrote
> This behavior is with the patches to the compiler package that were the 
> genesis of this thread?

No, prior to that. I posted something about it to zope-dev an age or six
ago - it seemed like the RestrictedPython compiler had mungo mungo numbers
of cycles, and we found we couldn't run a zeo client on a nogc python for
more than about an hour. 

ah - here's the message I sent:

Date:    Wed, 17 Oct 2001 18:10:27 +1000
To:      zope-dev@zope.org
From:    Anthony Baxter <anthony@interlink.com.au>
Subject: RestrictedPython under no-GC 2.1 seems to leak a hell of a lot.

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

[....]