STINNER Victor <vstin...@python.org> added the comment:

>From what I understood, the problem is that creating a SemLock has an impact 
>on the resource tracker.

The failing unit tests checks something about the resource tracker.

The test runs a function in a child process. The function is defined in 
_test_multiprocessing.py. _test_multiprocessing.py calls 
skip_if_broken_multiprocessing_synchronize() which creates a SemLock(). At the 
end, the child process modifies the resource tracker because it creates a 
SemLock().

There are different options to fix the issue:

* Modify skip_if_broken_multiprocessing_synchronize() only only attempt to 
create a SemLock on Linux.
* Modify skip_if_broken_multiprocessing_synchronize() to only check if the 
current user is allowed to write into /dev/shm/ directory: that would allow 
touching the resource tracker.
* Modify the test to avoid improting _test_multiprocessing in the child process.

I don't know why the test only fails on macOS.

Note: I ignored macOS failure when I merged my PR because the macOS job of 
GitHub Action is failing randomly for at least 3 months and nobody attempted to 
fix it. So I learnt to ignore this job.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38377>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to