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 vstinner
Recipients vstinner
Date 2021-09-28.12:22:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632831738.98.0.525271172358.issue45310@roundup.psfhosted.org>
In-reply-to
Content
AMD64 Fedora Stable LTO + PGO 3.10 (build 357):
https://buildbot.python.org/all/#/builders/651/builds/357

First test_multiprocessing_forkserver failed, then test_multiprocessing_spawn, then test_multiprocessing_fork.

I confirm that these tests fail if the /test01_tsmb shared memory exists.

The test is supposed to unlink the shared memory once the test completes:

    def test_shared_memory_basics(self):
        sms = shared_memory.SharedMemory('test01_tsmb', create=True, size=512)
        self.addCleanup(sms.unlink)

Maybe the whole process was killed while the test was running.

I removed it manually:

    sudo ./python -c "import _posixshmem; _posixshmem.shm_unlink('/test01_tsmb')"

Logs:

Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64.lto-pgo/build/Lib/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
KeyError: '/psm_49a93592'
(...)
======================================================================
ERROR: test_shared_memory_basics (test.test_multiprocessing_forkserver.WithProcessesTestSharedMemory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64.lto-pgo/build/Lib/test/_test_multiprocessing.py", line 3777, in test_shared_memory_basics
    sms = shared_memory.SharedMemory('test01_tsmb', create=True, size=512)
  File "/home/buildbot/buildarea/3.10.cstratak-fedora-stable-x86_64.lto-pgo/build/Lib/multiprocessing/shared_memory.py", line 103, in __init__
    self._fd = _posixshmem.shm_open(
FileExistsError: [Errno 17] File exists: '/test01_tsmb'
History
Date User Action Args
2021-09-28 12:22:19vstinnersetrecipients: + vstinner
2021-09-28 12:22:18vstinnersetmessageid: <1632831738.98.0.525271172358.issue45310@roundup.psfhosted.org>
2021-09-28 12:22:18vstinnerlinkissue45310 messages
2021-09-28 12:22:18vstinnercreate