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

test_signal failure #57293

Closed
skrah mannequin opened this issue Oct 1, 2011 · 5 comments
Closed

test_signal failure #57293

skrah mannequin opened this issue Oct 1, 2011 · 5 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@skrah
Copy link
Mannequin

skrah mannequin commented Oct 1, 2011

BPO 13084
Nosy @vstinner, @skrah
Files
  • check_signum_order.diff
  • 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 2011-10-02.17:00:59.618>
    created_at = <Date 2011-10-01.09:48:23.037>
    labels = ['type-bug', 'tests']
    title = 'test_signal failure'
    updated_at = <Date 2011-10-02.17:00:59.617>
    user = 'https://github.com/skrah'

    bugs.python.org fields:

    activity = <Date 2011-10-02.17:00:59.617>
    actor = 'neologix'
    assignee = 'none'
    closed = True
    closed_date = <Date 2011-10-02.17:00:59.618>
    closer = 'neologix'
    components = ['Tests']
    creation = <Date 2011-10-01.09:48:23.037>
    creator = 'skrah'
    dependencies = []
    files = ['23284']
    hgrepos = []
    issue_num = 13084
    keywords = ['patch']
    message_count = 5.0
    messages = ['144718', '144720', '144729', '144769', '144775']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'skrah', 'neologix', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue13084'
    versions = ['Python 3.3']

    @skrah
    Copy link
    Mannequin Author

    skrah mannequin commented Oct 1, 2011

    Got this failure on Debian lenny amd64:

    [1/1] test_signal
    test test_signal failed -- Traceback (most recent call last):
      File "/home/stefan/cpython/Lib/test/test_signal.py", line 339, in test_pending
        """,  *signals)
      File "/home/stefan/cpython/Lib/test/test_signal.py", line 263, in check_wakeup
        assert_python_ok('-c', code)
      File "/home/stefan/cpython/Lib/test/script_helper.py", line 50, in assert_python_ok
        return _assert_python(True, *args, **env_vars)
      File "/home/stefan/cpython/Lib/test/script_helper.py", line 42, in _assert_python
        "stderr follows:\n%s" % (rc, err.decode('ascii', 'ignore')))
    AssertionError: Process return code is 1, stderr follows:
    Traceback (most recent call last):
      File "<string>", line 41, in <module>
      File "<string>", line 16, in check_signum
    Exception: (10, 12) != (12, 10)

    1 test failed:
    test_signal
    [103837 refs]

    @skrah skrah mannequin added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Oct 1, 2011
    @neologix
    Copy link
    Mannequin

    neologix mannequin commented Oct 1, 2011

    See http://bugs.python.org/issue12469, specifically http://bugs.python.org/issue12469#msg139831

    """

    > When signals are unblocked, pending signal ared delivered in the reverse order
    > of their number (also on Linux, not only on FreeBSD 6).

    I don't like this.
    POSIX doesn't make any guarantee about signal delivery order, except
    for real-time signals.
    It might work on FreeBSD and Linux, but that's definitely not
    documented, and might break with new kernel releases, or other
    kernels.

    It looks like it works like this on most OSes (Linux, Mac OS X, Solaris,
    FreeBSD): I don't see any test_signal failure on 3.x buildbots. If we
    have a failure, we can use set() again, but only for test_pending:
    signal order should be reliable if signals are not blocked.
    """

    Looks like we now have a failure :-)

    @vstinner
    Copy link
    Member

    vstinner commented Oct 1, 2011

    WakeupSignalTests.test_pending() doesn't really check our signal handler but more the operating system, especially pthread_sigmask(SIG_UNBLOCK). I don't think that Python should test the signal order delivered by the operating systems when SIG_UNBLOCK.

    Anyone motivated to write a patch to use again a set()?

    @skrah
    Copy link
    Mannequin Author

    skrah mannequin commented Oct 2, 2011

    Patch looks good to me (and it fixes the problem).

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 2, 2011

    New changeset e4f4272479d0 by Charles-François Natali in branch 'default':
    Issue bpo-13084: Fix a test_signal failure: the delivery order is only defined for
    http://hg.python.org/cpython/rev/e4f4272479d0

    @neologix neologix mannequin closed this as completed Oct 2, 2011
    @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
    tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant