Title: Crash On bytearray()
Type: Stage: resolved
Components: Versions: Python 3.6, Python 3.5
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: martin.panter, pabstersac
Priority: normal Keywords:

Created on 2016-07-18 09:08 by pabstersac, last changed 2016-07-18 09:49 by berker.peksag. This issue is now closed.

Messages (3)
msg270731 - (view) Author: pablo sacristan (pabstersac) Date: 2016-07-18 09:08
There is a crash on bytearray(), not really a crash but rather the process gets killed by the kernel, but that is a crash, and the keyboard interrupt stops working while bytearray is working, so you can either restart python or wait for python to get killed by the kernel. The biggest problem is that while bytearray() is trying to do something, you can't interrupt it just doesn't work for some reason.
This should be enough for bytearray to crash :
It crashes after some time with a Killed: 9 error.

Hope it helps ;)
msg270736 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-07-18 09:33
bytearray(n) needs to allocate n bytes. Unless your computer has 1024 GiB of memory, this is not going to be possible. If you are using an OS like Linux, it may pretend to allocate that much memory, and then kill the process when it realizes it has overallocated. If you need more robust behaviour on Linux, I suggest looking into disabling memory overcommit.
msg270737 - (view) Author: pablo sacristan (pabstersac) Date: 2016-07-18 09:37
I know, but then shouldn't you try limiting the amount of data it allocates? Or maybe allow for keyboard interrupts to be used while the it is going on, because keyboard interrupts weren't working while it was working.
Date User Action Args
2016-07-18 10:44:06martin.panterlinkissue27560 superseder
2016-07-18 09:49:26berker.peksagsetresolution: remind -> not a bug
stage: resolved
2016-07-18 09:37:12pabstersacsetresolution: not a bug -> remind
messages: + msg270737
2016-07-18 09:33:38martin.pantersetstatus: open -> closed

nosy: + martin.panter
messages: + msg270736

resolution: not a bug
2016-07-18 09:08:05pabstersaccreate