Re: [collectd] Possible memory leak in python plugin?

2012-05-07 Thread Richard Marshall
Hi,

In this thread it looks like you may have found a memory leak problem in 
collectd python, but I'm not sure. I am seeing a memory leak to in a very 
similar situation (though using the following plugin: 
https://github.com/mleinart/collectd-haproxy . I'm using the Ubuntu package 
collectd-core 4.10.1-2. Are you able to confirm if this is an issue you have 
detected and resolved, and how I may apply that to my systems?

Many Thanks

Rich



[cid:image001.png@01CD18A6.575F6600]
Richard Marshall, Operations Director
Address: 170-172 Tower Bridge Road, London SE1 3LS
Phone:+44 203 465 9259
Email: richard.marsh...@tagman.com
Skype: richtagman

We're currently hiring in London and New York - 
http://www.tagman.com/index.php/careers.html



inline: image001.png___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


Re: [collectd] Possible memory leak in python plugin?

2012-05-07 Thread James김민석
hello,

it's been couple of weeks since I patched, and there is no memory leak
anymore.^^

I've used several tools to detect problems,
example, valgrind http://valgrind.org/, memwatch(
http://www.linkdata.se/sourcecode/memwatch/)
for python test, i used guppy and it told me there was no leak.
but couldn't find ways to to detect. because valgrind couldn't track child
thread, memwatch doesn't understand free statements sometimes.

It was my best way that just checking the candidate source codes line by
line.
specially embeded python and  python c-extension, there might be some
missing in reference counting of object in c code.
please checkout following nice articles that explains the problem.

http://edcjones.tripod.com/refcount.html

hope you have lucky. ;)



2012/4/12 Richard Marshall richard.marsh...@tagman.com

 Hi,

 ** **

 In this thread it looks like you may have found a memory leak problem in
 collectd python, but I’m not sure. I am seeing a memory leak to in a very
 similar situation (though using the following plugin:
 https://github.com/mleinart/collectd-haproxy . I’m using the Ubuntu
 package collectd-core 4.10.1-2. Are you able to confirm if this is an issue
 you have detected and resolved, and how I may apply that to my systems?***
 *

 ** **

 Many Thanks

 ** **

 Rich

 ** **

 ** **

 ** **

 [image: Description: cid:EBCCB7C5-BE97-454F-95DB-B5CD5BB470CA]

 Richard Marshall, Operations Director

 Address: 170-172 Tower Bridge Road, London SE1 3LS

 Phone:+44 203 465 9259

 Email: *richard.marsh...@tagman.com*

 Skype: richtagman

 ** **

 We're currently hiring in London and New York - *
 http://www.tagman.com/index.php/careers.html*

 ** **

 ** **

 ___
 collectd mailing list
 collectd@verplant.org
 http://mailman.verplant.org/listinfo/collectd




-- 
James.kim(김민석)
010 3266 8040
image001.png___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


Re: [collectd] Possible memory leak in python plugin?

2012-01-18 Thread Florian Forster
Hey,

On Wed, Jan 18, 2012 at 02:22:37AM +0100, Sven Trenkel wrote:
 Oh well, I uploaded a patch to github, it should appear in the
 official collectd repository soonish.

thanks for fixing this, Sven! I've cherry-picked the commit to the
collectd-4.10 branch which is available from git.verplant.org and
GitHub.

Best regards,
—octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x0C705A15
http://octo.it/


signature.asc
Description: Digital signature
___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


Re: [collectd] Possible memory leak in python plugin?

2012-01-17 Thread Michael Spiegle
I am using version 5.0.1 compiled with the spec file included in the
sources.  I have a single patch applied for summarizing CPU stats, but
that's about it.  I'm eager to check out your patch.  Thanks for
looking into this!

___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


Re: [collectd] Possible memory leak in python plugin?

2012-01-17 Thread Sven Trenkel
As always in life the solution was not as simple as it appeared to be. 
Oh well, I uploaded a patch to github, it should appear in the official 
collectd repository soonish.
If you want to compile a it yourself from source, this patch should work 
on the collectd-5.0 branch:

http://www.semidefinite.de/collectd-python.patch

___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


Re: [collectd] Possible memory leak in python plugin?

2012-01-16 Thread Michael Spiegle
I am using version 5.0.1 compiled with the spec file included in the
sources.  I have a single patch applied for summarizing CPU stats, but
that's about it.  I'm eager to check out your patch.  Thanks for
looking into this!

___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


Re: [collectd] Possible memory leak in python plugin?

2012-01-15 Thread Sven Trenkel

What version of collectd are you using?
And until we find the cause of this behavior you might try to pull the 
constant parts of the submitted value out of the for loop. So,


v = collectd.Values()
v.plugin = 'mongostats'
v.type = 'counter'

could be put before the loop as it's just creating and destroying the 
same objects over and over again. This might or might not make the 
memory leak slower.


___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


Re: [collectd] Possible memory leak in python plugin?

2012-01-15 Thread Sven Trenkel
Never mind, I think I found the bug. I'll test it tomorrow. If you 
compiled collectd yourself I'll send you a patch if you tell me the 
exact version number you're using.


___
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd