[XML-SIG] Memory leak in xmlrpclib.py on Windows?

Mark Moales mmoales@fluent.com
Mon, 19 Aug 2002 17:50:13 -0400


This is a multi-part message in MIME format.
--------------C58C3B95A32E7CBF7C4E2DD6
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

If this isn't the correct mailing list to send this type of question to,
please forgive me...

I'm running a very simple XML-RPC client/server on Windows 2000 using
Python 2.2.1.  Using perfmon, I see about a 4K increase in the size of
my client and server processes after about a half dozen or so calls.  It
doesn't seem to matter which parser I use (expat or SlowParser).  I get
similar results.  I also ran my test on a Linux box without expat and
did NOT see the leak.  Any ideas?  I seem to remember seeing something
about a leak in the expat parser, but, like I said, I see similar
results using the SlowParser.  I've attached my scripts if anyone would
like to try it.

Thanks!

Mark Moales
--------------C58C3B95A32E7CBF7C4E2DD6
Content-Type: text/plain; charset=us-ascii;
 name="SimpleServer.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="SimpleServer.py"

from SimpleXMLRPCServer import *

class SimpleServer:
    def processData(self):
        print 'SimpleServer invoked'
        return 1

if __name__ == '__main__':
    server = SimpleXMLRPCServer(('localhost', 80))
    server.register_instance(SimpleServer())
    server.serve_forever()


--------------C58C3B95A32E7CBF7C4E2DD6
Content-Type: text/plain; charset=us-ascii;
 name="SimpleClient.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="SimpleClient.py"

from xmlrpclib import ServerProxy
import gc
import time

def runit():
    sp = ServerProxy('http://localhost')

    for i in range(600):
        result = sp.processData()
        time.sleep(0.5)

if __name__ == '__main__':
    runit()

--------------C58C3B95A32E7CBF7C4E2DD6
Content-Type: text/x-vcard; charset=us-ascii;
 name="mmoales.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Mark Moales
Content-Disposition: attachment;
 filename="mmoales.vcf"

begin:vcard 
n:Moales;Mark
tel;work:603-643-2600 x758
x-mozilla-html:FALSE
url:www.fluent.com
org:Fluent, Inc.;Software Development
version:2.1
email;internet:mmoales@fluent.com
adr;quoted-printable:;;10 Cavendish Ct.=0D=0A;Lebanon;NH;03766;USA
fn:Mark Moales
end:vcard

--------------C58C3B95A32E7CBF7C4E2DD6--