This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Valentin.Lorentz
Recipients Valentin.Lorentz
Date 2016-11-11.08:33:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

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).
Date User Action Args
2016-11-11 08:33:53Valentin.Lorentzsetrecipients: + Valentin.Lorentz
2016-11-11 08:33:53Valentin.Lorentzsetmessageid: <>
2016-11-11 08:33:53Valentin.Lorentzlinkissue28663 messages
2016-11-11 08:33:52Valentin.Lorentzcreate