Skip to content

test_eintr fails randomly on macOS #79497

Closed

Description

@vstinner
BPO 35316
Nosy @ronaldoussoren, @vstinner, @ned-deily, @pablogsal, @miss-islington
PRs
  • bpo-35189, bpo-35316: Make test_eintr less strict #10782
  • [3.7] bpo-35189, bpo-35316: Make test_eintr less strict (GH-10782) #10784
  • [3.6] bpo-35189, bpo-35316: Make test_eintr less strict (GH-10782) #10785
  • 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 = 'https://github.com/pablogsal'
    closed_at = <Date 2018-12-05.23:00:17.570>
    created_at = <Date 2018-11-26.14:11:47.755>
    labels = ['OS-mac', '3.8', 'tests']
    title = 'test_eintr fails randomly on macOS'
    updated_at = <Date 2018-12-05.23:00:43.982>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2018-12-05.23:00:43.982>
    actor = 'vstinner'
    assignee = 'pablogsal'
    closed = True
    closed_date = <Date 2018-12-05.23:00:17.570>
    closer = 'vstinner'
    components = ['macOS', 'Tests']
    creation = <Date 2018-11-26.14:11:47.755>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35316
    keywords = ['patch']
    message_count = 10.0
    messages = ['330432', '330632', '330633', '330634', '330646', '330650', '330653', '330655', '331188', '331189']
    nosy_count = 5.0
    nosy_names = ['ronaldoussoren', 'vstinner', 'ned.deily', 'pablogsal', 'miss-islington']
    pr_nums = ['10782', '10784', '10785']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue35316'
    versions = ['Python 3.8']

    Activity

    1. vstinner commented on Nov 26, 2018

      @vstinner
      MemberAuthor

      test_sleep() of test_eintr fails on VSTS/macOS.

      select.select() sleeps 200 ms, the process is supposed to get a signal every 100 ms, but the test says that the signal handler was not called during the test. All tests pass, the issue seems to be specific to macOS.

      Maybe select() cannot be interrupted by SIGALRM on macOS?

      https://dev.azure.com/Python/cpython/_build/results?buildId=34604&view=logs

      2018-11-26T12:51:16.6867210Z FAIL: test_sleep (main.TimeEINTRTest)
      2018-11-26T12:51:16.6868140Z ----------------------------------------------------------------------

      2018-11-26T12:51:16.6868300Z Traceback (most recent call last):
      2018-11-26T12:51:16.6868450Z   File "/Users/vsts/agent/2.142.1/work/1/s/Lib/test/eintrdata/eintr_tester.py", line 73, in tearDown
      2018-11-26T12:51:16.6868570Z     self.assertGreater(self.signals, 0)
      2018-11-26T12:51:16.6869080Z AssertionError: 0 not greater than 0

      2018-11-26T12:49:29.9119300Z os.uname: posix.uname_result(sysname='Darwin', nodename='Mac-329.local', release='17.7.0', version='Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64', machine='x86_64')

      I added the check (which fails) last week, ensure that the signal handler has been called at least once:

    2. pablogsal commented on Nov 28, 2018

      @pablogsal
      Member

      Some buildbots failing with this problem:

      https://buildbot.python.org/all/#/builders/145/builds/849

    3. pablogsal commented on Nov 28, 2018

      @pablogsal
      Member

      I will investigate with MacOS Mojave this week.

    4. self-assigned this
      on Nov 28, 2018
    5. vstinner commented on Nov 28, 2018

      @vstinner
      MemberAuthor

      I'm unable to reproduce the issue using "./python.exe Lib/test/eintrdata/eintr_tester.py -v SelectEINTRTest.test_select" on macOS 10.13.6.

    6. vstinner commented on Nov 29, 2018

      @vstinner
      MemberAuthor

      New changeset 2956bff by Victor Stinner in branch 'master':
      bpo-35189, bpo-35316: Make test_eintr less strict (GH-10782)
      2956bff

    7. miss-islington commented on Nov 29, 2018

      @miss-islington
      Contributor

      New changeset 2fa5b2a by Miss Islington (bot) in branch '3.7':
      bpo-35189, bpo-35316: Make test_eintr less strict (GH-10782)
      2fa5b2a

    8. miss-islington commented on Nov 29, 2018

      @miss-islington
      Contributor

      New changeset 833a706 by Miss Islington (bot) in branch '3.6':
      bpo-35189, bpo-35316: Make test_eintr less strict (GH-10782)
      833a706

    9. vstinner commented on Nov 29, 2018

      @vstinner
      MemberAuthor

      I will investigate with MacOS Mojave this week.

      Ok, so I leave the issue open.

    10. vstinner commented on Dec 5, 2018

      @vstinner
      MemberAuthor

      I close the issue.

      @pablo: You are free to continue to investigate why sometimes test_sleep() is not interrupted by any signal.

    11. vstinner commented on Dec 5, 2018

      @vstinner
      MemberAuthor

      Note: I just fixed another test_eintr bug on macOS, bpo-35363.

    12. 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

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions