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

[asyncio] test failure when the platform lacks a functional sem_open() #76307

Closed
xdegaye mannequin opened this issue Nov 24, 2017 · 3 comments
Closed

[asyncio] test failure when the platform lacks a functional sem_open() #76307

xdegaye mannequin opened this issue Nov 24, 2017 · 3 comments
Labels
3.7 (EOL) end of life tests Tests in the Lib/test dir topic-asyncio type-bug An unexpected behavior, bug, or error

Comments

@xdegaye
Copy link
Mannequin

xdegaye mannequin commented Nov 24, 2017

BPO 32126
Nosy @xdegaye, @1st1
PRs
  • bpo-32126: Skip asyncio test when sem_open() is not functional #4559
  • 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 2017-11-26.09:32:18.239>
    created_at = <Date 2017-11-24.17:02:05.258>
    labels = ['3.7', 'type-bug', 'tests', 'expert-asyncio']
    title = '[asyncio] test failure when the platform lacks a functional  sem_open()'
    updated_at = <Date 2017-11-26.09:32:18.238>
    user = 'https://github.com/xdegaye'

    bugs.python.org fields:

    activity = <Date 2017-11-26.09:32:18.238>
    actor = 'xdegaye'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-11-26.09:32:18.239>
    closer = 'xdegaye'
    components = ['Tests', 'asyncio']
    creation = <Date 2017-11-24.17:02:05.258>
    creator = 'xdegaye'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32126
    keywords = ['patch']
    message_count = 3.0
    messages = ['306906', '306907', '306998']
    nosy_count = 2.0
    nosy_names = ['xdegaye', 'yselivanov']
    pr_nums = ['4559']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue32126'
    versions = ['Python 3.7']

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Nov 24, 2017

    test_get_event_loop_new_process fails on Android API 24 with the error:

    ======================================================================
    ERROR: test_get_event_loop_new_process (test.test_asyncio.test_events.EPollEventLoopTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/sdcard/org.python/lib/python3.7/multiprocessing/synchronize.py", line 29, in <module>
        from _multiprocessing import SemLock, sem_unlink
    ImportError: cannot import name 'sem_unlink' from '_multiprocessing' (/data/local/tmp/python/lib/pyt
    hon3.7/lib-dynload/_multiprocessing.cpython-37dm.so)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/sdcard/org.python/lib/python3.7/test/test_asyncio/test_events.py", line 2239, in test_get_e
    vent_loop_new_process
        self.loop.run_until_complete(main()),
      File "/sdcard/org.python/lib/python3.7/asyncio/base_events.py", line 466, in run_until_complete
        return future.result()
      File "/sdcard/org.python/lib/python3.7/test/test_asyncio/test_events.py", line 2230, in main
        pool = concurrent.futures.ProcessPoolExecutor()
      File "/sdcard/org.python/lib/python3.7/concurrent/futures/process.py", line 410, in __init__
        self._call_queue = mp_context.Queue(queue_size)
      File "/sdcard/org.python/lib/python3.7/multiprocessing/context.py", line 102, in Queue
        return Queue(maxsize, ctx=self.get_context())
      File "/sdcard/org.python/lib/python3.7/multiprocessing/queues.py", line 42, in __init__
        self._rlock = ctx.Lock()
      File "/sdcard/org.python/lib/python3.7/multiprocessing/context.py", line 66, in Lock
        from .synchronize import Lock
      File "/sdcard/org.python/lib/python3.7/multiprocessing/synchronize.py", line 34, in <module>
        " function, see issue 3770.")
    ImportError: This platform lacks a functioning sem_open implementation, therefore, the required sync
    hronization primitives needed will not function, see issue 3770.

    @xdegaye xdegaye mannequin added 3.7 (EOL) end of life tests Tests in the Lib/test dir topic-asyncio type-bug An unexpected behavior, bug, or error labels Nov 24, 2017
    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Nov 24, 2017

    See also the related issues:
    bpo-3770: test_multiprocessing fails on systems with HAVE_SEM_OPEN=0
    bpo-28668: instanciation of multiprocessing.Queue raises ImportError in test_logging
    bpo-26924: android: test_concurrent_futures fails

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Nov 26, 2017

    New changeset a6fba9b by xdegaye in branch 'master':
    bpo-32126: Skip asyncio test when sem_open() is not functional (GH-4559)
    a6fba9b

    @xdegaye xdegaye mannequin closed this as completed Nov 26, 2017
    @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.7 (EOL) end of life tests Tests in the Lib/test dir topic-asyncio type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants