[issue27560] zlib.compress() crash and keyboard interrupt stops working

2016-07-18 Thread Antti Haapala

Antti Haapala added the comment:

I am pretty sure **it never calls zlib.compress**. I get memory error from that 
argument alone, on Linux with overcommit memory enabled, 16G ram, swap.

--
nosy: +ztane

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27560] zlib.compress() crash and keyboard interrupt stops working

2016-07-18 Thread Xiang Zhang

Xiang Zhang added the comment:

Compressing large data is born to be slow and it's highly possible to cause the 
kernel halt then due to resource limit. 

> This may be used to crash python remotely if a server takes user input and 
> runs it through zlib.compress(b'variable' * 2**32) which is not very likely. 
> You probably should set a limit for what you compress and how much it is.

This is the responsibility of application code not library code.

--
nosy: +xiang.zhang

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27560] zlib.compress() crash and keyboard interrupt stops working

2016-07-18 Thread pablo sacristan

pablo sacristan added the comment:

I'd like to but I don't have enough memory either, sorry.

--
versions: +Python 3.5, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27560] zlib.compress() crash and keyboard interrupt stops working

2016-07-18 Thread Martin Panter

Martin Panter added the comment:

There is a good chance crashes and related 2 GiB and 4 GiB limits in zlib will 
be solved by Issue 27130. Do you want to see if the patch improves the 
situation? (I cannot test it directly because I don’t have enough memory.)

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27560] zlib.compress() crash and keyboard interrupt stops working

2016-07-18 Thread pablo sacristan

New submission from pablo sacristan:

zlib.compress crashes when you put a lot of stuff into it and even when you try 
keyboard interrupts it doesn't work for some reason, and Python gets killed 
because trying to compress so much data gets the Python process get killed by 
the kernel. If you put a large amount of data in it will get killed quicker. A 
problem is that keyboard interrupts stop working while the program is running, 
which is usually around 5 - 15 seconds during which python stops working 
(including interrupts) until it gets killed by the kernel. This may be used to 
crash python remotely if a server takes user input and runs it through 
zlib.compress(b'variable' * 2**32) which is not very likely. You probably 
should set a limit for what you compress and how much it is.
The output is:
Killed: 9
Even though you try doing keyboard interrupt it doesn't work.

--
files: crash.py
messages: 270732
nosy: pabstersac
priority: normal
severity: normal
status: open
title: zlib.compress() crash and keyboard interrupt stops working
Added file: http://bugs.python.org/file43774/crash.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com