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

NetBSD: do not use POSIX semaphores #90203

Closed
0-wiz-0 mannequin opened this issue Dec 11, 2021 · 5 comments
Closed

NetBSD: do not use POSIX semaphores #90203

0-wiz-0 mannequin opened this issue Dec 11, 2021 · 5 comments
Labels
3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-multiprocessing type-bug An unexpected behavior, bug, or error

Comments

@0-wiz-0
Copy link
Mannequin

0-wiz-0 mannequin commented Dec 11, 2021

BPO 46045
Nosy @0-wiz-0, @serhiy-storchaka
PRs
  • bpo-46045: Do not use POSIX semaphores on NetBSD #30047
  • 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 = None
    created_at = <Date 2021-12-11.10:31:04.604>
    labels = ['interpreter-core', 'type-bug', '3.11']
    title = 'NetBSD: do not use POSIX semaphores'
    updated_at = <Date 2022-01-18.22:48:10.053>
    user = 'https://github.com/0-wiz-0'

    bugs.python.org fields:

    activity = <Date 2022-01-18.22:48:10.053>
    actor = 'wiz'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2021-12-11.10:31:04.604>
    creator = 'wiz'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46045
    keywords = ['patch']
    message_count = 4.0
    messages = ['408291', '410581', '410888', '410910']
    nosy_count = 2.0
    nosy_names = ['wiz', 'serhiy.storchaka']
    pr_nums = ['30047']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue46045'
    versions = ['Python 3.11']

    @0-wiz-0
    Copy link
    Mannequin Author

    0-wiz-0 mannequin commented Dec 11, 2021

    On NetBSD by default, the following tests do not finish in > 1h:

    1:07:13 load avg: 0.00 running: test_compileall (1 hour 7 min), test_multiprocessing_fork (1 hour 7 min), test_concurrent_futures (1 hour 6 min)

    Defining HAVE_BROKEN_POSIX_SEMAPHORES fixes this, and they finish:

    0:00:32 load avg: 10.63 [408/427/17] test_compileall passed ...
    ...
    0:02:37 load avg: 3.04 [427/427/22] test_concurrent_futures passed (2 min 33 sec)

    The last one fails:
    test_multiprocessing_fork

    with most of the subtests failing like this:

    ERROR: test_shared_memory_SharedMemoryServer_ignores_sigint (test.test_multiprocessing_fork.WithProcessesTestSharedMemory)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/scratch/lang/python310/work/Python-3.10.1/Lib/test/_test_multiprocessing.py", line 4006, in test_shared_memory_SharedMemoryServer_ignores_sigint
        sl = smm.ShareableList(range(10))
      File "/scratch/lang/python310/work/Python-3.10.1/Lib/multiprocessing/managers.py", line 1372, in ShareableList
        sl = shared_memory.ShareableList(sequence)
      File "/scratch/lang/python310/work/Python-3.10.1/Lib/multiprocessing/shared_memory.py", line 327, in __init__
        self.shm = SharedMemory(name, create=True, size=requested_size)
      File "/scratch/lang/python310/work/Python-3.10.1/Lib/multiprocessing/shared_memory.py", line 92, in __init__
        self._fd = _posixshmem.shm_open(
    OSError: [Errno 86] Not supported: '/psm_b1ec903a'

    I think this is a separate issue, so I'd like to define HAVE_BROKEN_POSIX_SEMAPHORES for now.

    This has been done in pkgsrc since at least python 2.7 (in 2011), I haven't dug deeper.

    @0-wiz-0 0-wiz-0 mannequin added 3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Dec 11, 2021
    @0-wiz-0
    Copy link
    Mannequin Author

    0-wiz-0 mannequin commented Jan 14, 2022

    ping - this patch needs a review

    @serhiy-storchaka
    Copy link
    Member

    New changeset 60ceedb by Thomas Klausner in branch 'main':
    bpo-46045: Do not use POSIX semaphores on NetBSD (GH-30047)
    60ceedb

    @0-wiz-0
    Copy link
    Mannequin Author

    0-wiz-0 mannequin commented Jan 18, 2022

    Thanks for merging this, @serhiy.storchaka!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @kumaraditya303
    Copy link
    Contributor

    Fixed by #30047

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-multiprocessing type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants