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.

classification
Title: shared memory problems with multiprocessing.Pool
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: davin, pitrou, trapezoid677, vinay0410
Priority: normal Keywords:

Created on 2020-05-30 17:57 by trapezoid677, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
shared_memory.py trapezoid677, 2020-05-30 17:57
Messages (2)
msg370396 - (view) Author: (trapezoid677) Date: 2020-05-30 17:57
Under Linux, the resource_tracker throws warnings about not released memory blocks after the programs has finished and when used together with multiprocessing.Pool. This depends on the sequence of initialization of the shared memory block and the multiprocessing pool. In addition, .close() on the shared memory block generates a segmentation fault in the example code. 

Under MS Windows, the shared memory block holds arbitrary values when being read in the worker routines, but no warnings are thrown and no segmentation fault occurs when closing the memory block.
msg373938 - (view) Author: Vinay Sharma (vinay0410) * Date: 2020-07-19 07:15
Hi, Can you please confirm the python version in which you replicated this issue. I tried replicating (segmentation fault) this issue in python 3.8.0b3 but didn't succeed. And shared_memory isn't present in 3.7. Also, shared_memory is known to throw some warnings, and there is already a PR and issue open for that https://bugs.python.org/issue38119.
History
Date User Action Args
2022-04-11 14:59:31adminsetgithub: 85005
2020-07-19 07:15:02vinay0410setnosy: + vinay0410
messages: + msg373938
2020-05-31 07:32:03SilentGhostsetnosy: + pitrou, davin
2020-05-30 17:57:21trapezoid677create