[pypy-dev] Memory leaks in Pypy

Maciej Fijalkowski fijall at gmail.com
Thu Jan 23 17:26:34 CET 2014


On Wed, Jan 22, 2014 at 2:08 PM, Ron Reiter <ron.reiter at gmail.com> wrote:

> Something really strange is happening to me. I've stumbled upon a memory
> leak that happens only when answering a POST request using Twisted and Pypy.
>
> The problem is described here:
>
>
> http://stackoverflow.com/questions/21063842/using-twisted-cyclone-pypy-to-handle-post-requests-cause-a-memory-leak
>
> It could either be a bug in the Python code that handles the request and
> leaks, a but in Twisted, or in Pypy.
>
> I've been investing the problem for weeks now, with the following
> conclusion:
>
> * CPython does not leak with this code
> * Tornado with Pypy does not leak with this code
> * Answering GET requests instead of POST requests does not leak with this
> code
> * I tried switching GCs, collecting using gc.collect and setting
> PYPY_GC_MAX, those attempts did not help
> * This happens both on Linux and Mac
>
> Insights as to how to debug this are very welcome.
>
> Thanks,
>

Hi.

I could not quite get it to leak at all (the memory was not growing), but I
can try again. Can we start with updating the example so it's runnable (in
the comments JP calderone mentions something that's not obvious to me what
it should do).

Can you also explain for how long you need to run it? What parameters are
there etc? All those things makes it really hard for me to debug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20140123/3377b48e/attachment.html>


More information about the pypy-dev mailing list