<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>></span>Ah, I missed the fact that you replied to us privately.</div><div><br></div><div>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.</div><div><br></div><div><br></div><div>>on my machine, compressing works fine, but decompressing consumes (slowly) more and more memory.</div><div><br></div><div>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.<br></div><div><br></div><div><br></div><div>>The point is that I'm running out of RAM (2GB total) before<br>seeing any crash. I guess that the crash depends very finely on how<br>much free memory+swap you have.</div><div><br></div><div>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.<br></div><div><br></div><div><br></div><div>>it is in theory possible to get it<br>if the programs just fits in the memory, and tries to quit, calling<br>the shut-down functions.
These shut-down functions might need to<br>allocate a little bit more.</div><div><br></div><div>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.</div><div><br></div><div><br></div><div>-Roger<br> </div><div><br></div> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Armin Rigo <arigo@tunes.org><br> <b><span style="font-weight: bold;">To:</span></b> Roger Flores <aidembb@yahoo.com>; PyPy Developer Mailing List <pypy-dev@python.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, April 19, 2012 7:51 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [pypy-dev]
pypy MemoryError crash<br> </font> </div> <br>
Hi Roger,<br><br>On Tue, Apr 17, 2012 at 18:58, Roger Flores <<a ymailto="mailto:aidembb@yahoo.com" href="mailto:aidembb@yahoo.com">aidembb@yahoo.com</a>> wrote:<br>> Were either of you able to confirm that it's easy to make PyPy crash with a<br>> MemoryError?<br><br>Ah, I missed the fact that you replied to us privately. That's<br>generally a very bad idea, because if we are busy or forget about your<br>bug, others would normally jump in.<br><br>I'm not able to reproduce the bug you have: on my machine, compressing<br>works fine, but decompressing consumes (slowly) more and more memory.<br>I guess that this behavior is unexpected, unless you really have a<br>reason. The point is that I'm running out of RAM (2GB total) before<br>seeing any crash. I guess that the crash depends very finely on how<br>much free memory+swap you have.<br><br>Can you tell us these numbers? I could try to reproduce the crash<br>using
"ulimit", if necessary on machines with more RAM. However,<br>looking carefully at the traceback, it is in theory possible to get it<br>if the programs just fits in the memory, and tries to quit, calling<br>the shut-down functions. These shut-down functions might need to<br>allocate a little bit more. If this triggers collection, and if<br>collection raises MemoryError, then we could get such a traceback.<br><br><br>A bientôt,<br><br>Armin.<br><br><br> </div> </div> </div></body></html>