Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared memory tests are failing due to double slashes #81739

Closed
kulikjak mannequin opened this issue Jul 11, 2019 · 3 comments
Closed

Shared memory tests are failing due to double slashes #81739

kulikjak mannequin opened this issue Jul 11, 2019 · 3 comments
Labels
3.8 only security fixes 3.9 only security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@kulikjak
Copy link
Mannequin

kulikjak mannequin commented Jul 11, 2019

BPO 37558
Nosy @miss-islington, @kulikjak
PRs
  • bpo-37558: Shared memory tests are failing due to double slashes #14703
  • [3.8] bpo-37558: Shared memory tests are failing due to double slashes (GH-14703) #14715
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-07-11.21:54:16.662>
    created_at = <Date 2019-07-11.08:33:10.079>
    labels = ['3.8', 'type-bug', 'tests', '3.9']
    title = 'Shared memory tests are failing due to double slashes'
    updated_at = <Date 2019-07-11.21:54:16.662>
    user = 'https://github.com/kulikjak'

    bugs.python.org fields:

    activity = <Date 2019-07-11.21:54:16.662>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-07-11.21:54:16.662>
    closer = 'pitrou'
    components = ['Tests']
    creation = <Date 2019-07-11.08:33:10.079>
    creator = 'kulikjak'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37558
    keywords = ['patch']
    message_count = 3.0
    messages = ['347662', '347699', '347700']
    nosy_count = 2.0
    nosy_names = ['miss-islington', 'kulikjak']
    pr_nums = ['14703', '14715']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue37558'
    versions = ['Python 3.8', 'Python 3.9']

    @kulikjak
    Copy link
    Mannequin Author

    kulikjak mannequin commented Jul 11, 2019

    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.

    @kulikjak kulikjak mannequin added 3.8 only security fixes 3.9 only security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Jul 11, 2019
    @miss-islington
    Copy link
    Contributor

    New changeset 4737265 by Miss Islington (bot) (Jakub Kulík) in branch 'master':
    bpo-37558: Shared memory tests are failing due to double slashes (GH-14703)
    4737265

    @miss-islington
    Copy link
    Contributor

    New changeset 3d58b78 by Miss Islington (bot) in branch '3.8':
    bpo-37558: Shared memory tests are failing due to double slashes (GH-14703)
    3d58b78

    @pitrou pitrou closed this as completed Jul 11, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes 3.9 only security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants