Skip to content

Skip libpthread related test failures on OpenBSD #52958

Closed

Description

@skrah
mannequin
BPO 8712
Nosy @mdickinson, @pitrou, @skrah
Files
  • openbsd_libpthread_skips.patch
  • 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 2013-01-17.12:31:10.376>
    created_at = <Date 2010-05-14.14:13:56.813>
    labels = ['type-bug', 'tests']
    title = 'Skip libpthread related test failures on OpenBSD'
    updated_at = <Date 2013-01-17.12:31:10.374>
    user = 'https://github.com/skrah'

    bugs.python.org fields:

    activity = <Date 2013-01-17.12:31:10.374>
    actor = 'skrah'
    assignee = 'none'
    closed = True
    closed_date = <Date 2013-01-17.12:31:10.376>
    closer = 'skrah'
    components = ['Tests']
    creation = <Date 2010-05-14.14:13:56.813>
    creator = 'skrah'
    dependencies = []
    files = ['17337']
    hgrepos = []
    issue_num = 8712
    keywords = ['patch', 'needs review']
    message_count = 7.0
    messages = ['105709', '105711', '105727', '105799', '105800', '105837', '180126']
    nosy_count = 6.0
    nosy_names = ['exarkun', 'mark.dickinson', 'pitrou', 'djmdjm', 'henry.precheur', 'skrah']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue8712'
    versions = ['Python 2.7']

    Activity

    1. skrah commented on May 14, 2010

      skrahmannequin
      MannequinAuthor

      [Added OpenBSD Python port maintainers to the nosy list.]

      I've identified a number of tests that all pass when Python is compiled
      without threads, but fail otherwise. The failures are probably caused
      by libpthread issues in OpenBSD, as described in this patch:

      http://www.openbsd.org/cgi-bin/cvsweb/ports/lang/python/2.6/patches/patch-Lib_test_test_signal_py

      Would you agree that it is reasonable to skip all these tests until
      libpthread is fixed?

    2. added
      testsTests in the Lib/test dir
      type-bugAn unexpected behavior, bug, or error
      on May 14, 2010
    3. pitrou commented on May 14, 2010

      @pitrou
      Member

      This looks reasonable. Perhaps you should add a reference to the relevant OpenBSD bug number(s) or URL(s), if any.

    4. exarkun commented on May 14, 2010

      exarkunmannequin
      Mannequin

      In addition to skipping the tests, would it also make sense to document these known limitations of Python threading on OpenBSD somewhere that end users might see it?

    5. skrah commented on May 15, 2010

      skrahmannequin
      MannequinAuthor

      I can't pinpoint the exact causes for each individual test failure. I assumed that they are caused by threading/signal issues, because the tests pass when Python is compiled --without-threads.

      But here's a list of possible culprits for future reference:

      [pthread's execve(2) breaks close(2)]
      http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=6183

      [SIGCHLD handler is called at bad timing when linked to libpthread]
      http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=6273

      [pthread: 100% CPU usage after execv]
      http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=6376

      [pthread: file descriptors are "pseudo-blocking"]
      http://www.mail-archive.com/misc@openbsd.org/msg80643.html

      [test_siginterrupt_off broken by libpthread's internal hooking of signals]
      [test_itimer_prof broken by libpthread's internal use of SIGPROF]
      http://www.openbsd.org/cgi-bin/cvsweb/ports/lang/python/2.6/patches/patch-Lib_test_test_signal_py

    6. skrah commented on May 15, 2010

      skrahmannequin
      MannequinAuthor

      The FreeBSD-6.4-RELEASE-i386 buildbot has similar libpthread issues.

      This is just in:

      ======================================================================
      FAIL: test_send_signal (test.test_subprocess.POSIXProcessTestCase)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_subprocess.py", line 770, in test_send_signal
          self.assertIn(b'KeyboardInterrupt', stderr)
      AssertionError: b'KeyboardInterrupt' not found in b''

      Re documentation:

      Another approach would be to configure builds on systems with known
      threading issues --without-threads by default. Advantages:

      a) Users will be immediately aware of the issues.

      b) Less work with the FreeBSD-6.4 buildbot.

      c) The --without-threads path is actually tested regularly.

    7. skrah commented on May 15, 2010

      skrahmannequin
      MannequinAuthor

      The gentoo-3.x buildbot also shows the threading problems again:

      test test_subprocess failed -- Traceback (most recent call last):
        File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/test_subprocess.py", line 770, in test_send_signal
          self.assertIn(b'KeyboardInterrupt', stderr)
      AssertionError: b'KeyboardInterrupt' not found in b''

      References:

      [gentoo-3.x]
      http://bugs.python.org/issue4970

      [freebsd-6.4]
      http://bugs.python.org/issue3864

    8. skrah commented on Jan 17, 2013

      skrahmannequin
      MannequinAuthor

      All threading issues are fixed in OpenBSD 5.2.

    9. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions