pysnmp icon indicating copy to clipboard operation
pysnmp copied to clipboard

Memory leak on snmp timeout with twisted High Level API

Open mcfletch opened this issue 7 years ago • 1 comments

So we're seeing a memory leak in a polling operation where if the pysnmp getCmd (twisted hlapi) times out we leak RAM. I've attached a (rather poorly behaved, kill -9 to stop) reproduction script that leaks RAM at about 1MB/6s or so by issuing 3000 timing-out requests in a loop.

It's entirely possible that there's a problem in my usage, but it looks pretty close to documented usage. My guess is that there's some state in the engine or the udptransport that isn't getting cleared.

To be clear, the real application doesn't issue 3000 requests at once, but it shows the same leak pattern where any timed-out operation seems to leak memory.

testleak.py.txt

mcfletch avatar Feb 20 '18 16:02 mcfletch

Recent releases no longer support twisted, so this can be closed.

lextm avatar Aug 26 '24 08:08 lextm