Re:Diagnosing Memory “Leaks” in Python
by IgorPartola on Monday September 07, 2015 @10:19PM
(#10183907)
Once I had to fix a severe memory leak in piece of Python code. None of the available tools revealed anything useful. I ended up just adding debug statements to the hot loop to see which step caused the memory usage to jump. Should have known the answer: a bad C extension was leaking memory. Lesson learned.
[ Parent
| on HN ]
Re:Diagnosing Memory “Leaks” in Python
by danudey on Tuesday September 08, 2015 @12:42AM
(#10184148)
libzmq apparently has a bug where it creates structures to handle connections every time you connect, and it cleans them up after processing data. This means that if you connect then disconnect without sending data, you leak memory.
It's trivial to run a "for i in …" and cause a zmq app to leak gigabytes of memory in a matter of seconds. Highly problematic.
Are you referring to https://news.ycombinator.com/item?id=10175751 ?