Re: [pypy-dev] pypy MemoryError crash
Hi Roger, On Tue, Apr 17, 2012 at 18:58, Roger Flores <aidembb@yahoo.com> wrote:
Were either of you able to confirm that it's easy to make PyPy crash with a MemoryError?
Ah, I missed the fact that you replied to us privately. That's generally a very bad idea, because if we are busy or forget about your bug, others would normally jump in. I'm not able to reproduce the bug you have: on my machine, compressing works fine, but decompressing consumes (slowly) more and more memory. I guess that this behavior is unexpected, unless you really have a reason. The point is that I'm running out of RAM (2GB total) before seeing any crash. I guess that the crash depends very finely on how much free memory+swap you have. Can you tell us these numbers? I could try to reproduce the crash using "ulimit", if necessary on machines with more RAM. However, looking carefully at the traceback, it is in theory possible to get it if the programs just fits in the memory, and tries to quit, calling the shut-down functions. These shut-down functions might need to allocate a little bit more. If this triggers collection, and if collection raises MemoryError, then we could get such a traceback. A bientôt, Armin.
Ah, I missed the fact that you replied to us privately.
Sorry, I didn't want to send an attachment to everyone on the list and I didn't see much other interest. I'm happy to try a reminder email before asking everyone again.
on my machine, compressing works fine, but decompressing consumes (slowly) more and more memory.
Good, it should compress just fine. And normally decompression works fine too. But the special version I sent contains the one character bug that should result in it slowly consuming all memory. This is the goal, so it triggers the MemoryError issue. Python throws a MemoryError and displays a traceback. The Pypy bug is that it dies in Rpython, displaying a Rpython traceback, instead of throwing a MemoryError, and showing a traceback of my code as it runs out of memory. I missed this distinction for a while.
The point is that I'm running out of RAM (2GB total) before seeing any crash. I guess that the crash depends very finely on how much free memory+swap you have.
it is in theory possible to get it if the programs just fits in the memory, and tries to quit, calling
On my Windows laptop I have 8GB but I can see it only using a couple GB before crashing. I also run Ubuntu in VirtualBox, and it's set to 2GB of memory like your computer, plus some amount of swap. The decompression only runs for a minute or so before the MemoryError happens. Basically if you have enough memory to compress, I'd think you'd have enough memory. the shut-down functions. These shut-down functions might need to allocate a little bit more. I've seen the Pypy MemoryError work just fine. I think this is a unique case that hits that code just right to break it, along the lines of your thinking. -Roger ________________________________ From: Armin Rigo <arigo@tunes.org> To: Roger Flores <aidembb@yahoo.com>; PyPy Developer Mailing List <pypy-dev@python.org> Sent: Thursday, April 19, 2012 7:51 AM Subject: Re: [pypy-dev] pypy MemoryError crash Hi Roger, On Tue, Apr 17, 2012 at 18:58, Roger Flores <aidembb@yahoo.com> wrote:
Were either of you able to confirm that it's easy to make PyPy crash with a MemoryError?
Ah, I missed the fact that you replied to us privately. That's generally a very bad idea, because if we are busy or forget about your bug, others would normally jump in. I'm not able to reproduce the bug you have: on my machine, compressing works fine, but decompressing consumes (slowly) more and more memory. I guess that this behavior is unexpected, unless you really have a reason. The point is that I'm running out of RAM (2GB total) before seeing any crash. I guess that the crash depends very finely on how much free memory+swap you have. Can you tell us these numbers? I could try to reproduce the crash using "ulimit", if necessary on machines with more RAM. However, looking carefully at the traceback, it is in theory possible to get it if the programs just fits in the memory, and tries to quit, calling the shut-down functions. These shut-down functions might need to allocate a little bit more. If this triggers collection, and if collection raises MemoryError, then we could get such a traceback. A bientôt, Armin.
participants (2)
-
Armin Rigo -
Roger Flores