PCF leaks memory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyMQI |
Fix Released
|
High
|
Dariusz Suchojad |
Bug Description
Hi,
I'm having a problem using pymqi (1.0) to write some scripts that retrieve some information from MQ servers. Not sure 100% if related to a memory leak or a mistake of mine, but when I execute the following code it seems that some memory is not released:
This is an extract of the code, to retrieve the information from channels.
...
while True:
op=mq.cd()
ref = qm.connectTCPCl
pcf = mq.PCFExecute(qm)
# Next one is the line wich gets memory: if commented, memory doesn't grow
channels = pcf.MQCMD_
# Process information, name, status, ...
del channels
del pcf
del ref
del op
....
Of course this is not exactly the code I'm using on the scripts, probably I don't even need the deletes, but my code also involves an infinite loop for monitoring some stuff (queues depth and more). When executing the previous code I get the python.exe process memory growing until reaches aprox 2GB and then crashes.
Am I missing something ?
Other information is: reproduced with both pymqi 0.5d and 1.0, in a Windows 2003 system as MQ client. Targets systems are MQ 6 and 7 in different platforms (Win, Linux, iSeries). pymqi compiled with MQ client version 6.0.27 and MinGW
Any ideas ? Thank you for your time.
regards,
Joan
Related branches
Changed in pymqi: | |
importance: | Undecided → High |
status: | New → Confirmed |
assignee: | nobody → Dariusz Suchojad (dsuch) |
Changed in pymqi: | |
milestone: | none → 1.0.1 |
Hi Joan,
as you can see, I have converted the https:/ /answers. launchpad. net/pymqi/ +question/ 97293 question into a bug report. I've run the code under a debug build of Python 2.6.2 and sys.gettotalref count() was showing the reference count increasing after each invocation of PCF so it seems like a bug.
I have also created a bzr branch for working on the issue, you can get it by issuing the following command:
$ bzr branch lp:~dsuch/pymqi/lp-507617
Although right now it's only a clean copy of trunk, that's where I'll be pushing any code changes to.
I'm not the PCF/MQAI bits author and it's actually the part I'm the least familiar with, however I'll try to resolve it as soon as I can. Will post new comments here as I'll be progressing.
Cheers!