[issue43145] Leak of locks from multiprocessing.Process

hai shi report at bugs.python.org
Sat Jul 24 03:52:25 EDT 2021


hai shi <shihai1991 at 126.com> added the comment:

> The following locks are leaked:
> 1. https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L78
> 2. https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L84
> 3. https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L90
> 4. https://github.com/python/cpython/blob/master/Python/ceval.c#L810
> 5. https://github.com/python/cpython/blob/master/Python/import.c#L126
> 6. and 7. https://github.com/python/cpython/blob/master/Modules/_threadmodule.c#L597

Hi, Boris. Thanks for your report. We may receive the wrong alarm sometimes when we use valgrind.
 
1. https://github.com/python/cpython/blob/4512848ab92c8ed6aafb54d6e1908b1074558c43/Python/pystate.c#L78
   free in here: https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L127
2. https://github.com/python/cpython/blob/main/Python/ceval.c#L741
   free in here: https://github.com/python/cpython/blob/4512848ab92c8ed6aafb54d6e1908b1074558c43/Python/pystate.c#L375
3. https://github.com/python/cpython/blob/4512848ab92c8ed6aafb54d6e1908b1074558c43/Python/import.c#L124
4. free in here: https://github.com/python/cpython/blob/4512848ab92c8ed6aafb54d6e1908b1074558c43/Python/import.c#L156
5. https://github.com/python/cpython/blob/4512848ab92c8ed6aafb54d6e1908b1074558c43/Modules/_threadmodule.c#L613
   free in here: https://github.com/python/cpython/blob/4512848ab92c8ed6aafb54d6e1908b1074558c43/Modules/_threadmodule.c#L74
   To tihs refleak, I can't get the entire traceback of newobject. But I haven't get refleak when I run `./python -m test _test_multiprocessing -R 3:3 -vv`.

----------
nosy: +shihai1991
versions: +Python 3.11 -Python 3.10, Python 3.9
Added file: https://bugs.python.org/file50177/valgrind output.txt

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


More information about the Python-bugs-list mailing list