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 tests are failing due to double slashes
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: kulikjak, miss-islington
Priority: normal Keywords: patch

Created on 2019-07-11 08:33 by kulikjak, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 14703 merged kulikjak, 2019-07-11 08:38
PR 14715 merged miss-islington, 2019-07-11 18:04
Messages (3)
msg347662 - (view) Author: Jakub Kulik (kulikjak) * Date: 2019-07-11 08:33
Hi,

with the addition of shared memory into Python 3.8, we now have three tests failing on Solaris, namely `test_multiprocessing_fork`, `test_multiprocessing_forkserver` and `test_multiprocessing_spawn`. All of them fail in the same way:

======================================================================
ERROR: test_shared_memory_cleaned_after_process_termination (test.test_multiprocessing_fork.WithProcessesTestSharedMemory)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../Python-3.8.0b2/Lib/test/_test_multiprocessing.py", line 4013, in test_shared_memory_cleaned_after_process_termination
    smm = shared_memory.SharedMemory(name, create=False)
  File ".../Python-3.8.0b2/Lib/multiprocessing/shared_memory.py", line 100, in __init__
    self._fd = _posixshmem.shm_open(
OSError: [Errno 22] Invalid argument: '//psm_5c1b5800'

The reason for this, in my opinion, is that the test suite is accessing private `sm._name` instead of the normalized `sm.name`. Returned value already has one slash prepended, and another one is prepended SharedMemory init is called, resulting in double slashes, which is incorrect.

Change to `sm.name` fixes this problem.
msg347699 - (view) Author: miss-islington (miss-islington) Date: 2019-07-11 18:04
New changeset 4737265622251756a9480ab84af2442b6b986850 by Miss Islington (bot) (Jakub Kulík) in branch 'master':
bpo-37558: Shared memory tests are failing due to double slashes (GH-14703)
https://github.com/python/cpython/commit/4737265622251756a9480ab84af2442b6b986850
msg347700 - (view) Author: miss-islington (miss-islington) Date: 2019-07-11 18:38
New changeset 3d58b78481e0238593f85cc182b798fe3b77648c by Miss Islington (bot) in branch '3.8':
bpo-37558: Shared memory tests are failing due to double slashes (GH-14703)
https://github.com/python/cpython/commit/3d58b78481e0238593f85cc182b798fe3b77648c
History
Date User Action Args
2022-04-11 14:59:17adminsetgithub: 81739
2019-07-11 21:54:16pitrousetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-07-11 18:38:59miss-islingtonsetmessages: + msg347700
2019-07-11 18:04:23miss-islingtonsetpull_requests: + pull_request14515
2019-07-11 18:04:18miss-islingtonsetnosy: + miss-islington
messages: + msg347699
2019-07-11 08:38:42kulikjaksetkeywords: + patch
stage: patch review
pull_requests: + pull_request14502
2019-07-11 08:33:10kulikjakcreate