[New-bugs-announce] [issue28663] Higher virtual memory usage on recent Linux versions

ProgVal report at bugs.python.org
Fri Nov 11 03:33:53 EST 2016


New submission from ProgVal:

Hi,

I use `resource.setrlimit(resource.RLIMIT_DATA, ...)` to limit the memory usage of a child process.
I noticed that on recent Linux versions, my processes are much more likely to raise MemoryError or behave inconsistently (which I believe is caused by a MemoryError being silently ignored somewhere).

With Linux 4.7 under Python 3.4 (tested on a Debian 8.0 chroot) and 3.5 (tested on Debian Testing and Unstable), the attached script crashes on the `assert False`, which it should not encounter since all execution paths go through a `q.put`.

With Linux 3.16 under Python 3.4 (tested on a Debian 8.0 virtual machine), the attached script terminates without an error.
Even when restricting the memory to 1MB instead of 10MB, it still works.


It may look like I just have to increase the limit to a larger value, eg. 20MB. However, when there is more imported modules in the parent process, the required value gets incredibly high (eg. 1GB).

----------
components: Interpreter Core
files: rlimit_difference_linux_versions.py
messages: 280566
nosy: Valentin.Lorentz
priority: normal
severity: normal
status: open
title: Higher virtual memory usage on recent Linux versions
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file45438/rlimit_difference_linux_versions.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28663>
_______________________________________


More information about the New-bugs-announce mailing list