[New-bugs-announce] [issue45308] multiprocessing default fork child process will not free object, which is inherited from parent process

eleven xiang report at bugs.python.org
Tue Sep 28 03:57:03 EDT 2021


New submission from eleven xiang <eleven.xiang at gmail.com>:

Hi, 

Here I did an experiment, and detail as below
1. There is library, which has global object and has its class method
2. Use multiprocessing module to fork the child process, parent process call the global object's method first, and then child process called the global object method again to modify it
3. After that when script exit, parent will free the object, but child process will not free it.
4. if we change the start method to 'spawn', the child process will free it

----------
components: Library (Lib)
files: test.py
messages: 402758
nosy: eleven.xiang
priority: normal
severity: normal
status: open
title: multiprocessing default fork child process will not free object, which is inherited from parent process
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file50307/test.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45308>
_______________________________________


More information about the New-bugs-announce mailing list