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_concurrent_futures.test_crash() failed on x86 Windows7 3.7 #77897

Closed
vstinner opened this issue May 31, 2018 · 9 comments
Closed

test_concurrent_futures.test_crash() failed on x86 Windows7 3.7 #77897

vstinner opened this issue May 31, 2018 · 9 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes OS-windows tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

BPO 33716
Nosy @pfmoore, @pitrou, @vstinner, @tjguk, @zware, @zooba, @pablogsal, @miss-islington
PRs
  • bpo-33716: test_concurrent_futures: increase timeout #7828
  • [3.7] bpo-33716, test_concurrent_futures: increase timeout (GH-7828) #8263
  • [3.6] bpo-33716, test_concurrent_futures: increase timeout (GH-7828) #8264
  • 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 2018-07-12.09:12:17.830>
    created_at = <Date 2018-05-31.12:41:13.723>
    labels = ['3.8', '3.7', 'tests', 'OS-windows']
    title = 'test_concurrent_futures.test_crash() failed on x86 Windows7 3.7'
    updated_at = <Date 2018-07-12.09:12:17.828>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2018-07-12.09:12:17.828>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-07-12.09:12:17.830>
    closer = 'vstinner'
    components = ['Tests', 'Windows']
    creation = <Date 2018-05-31.12:41:13.723>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33716
    keywords = ['patch']
    message_count = 9.0
    messages = ['318294', '320056', '320074', '320126', '320147', '320169', '321530', '321531', '321532']
    nosy_count = 8.0
    nosy_names = ['paul.moore', 'pitrou', 'vstinner', 'tim.golden', 'zach.ware', 'steve.dower', 'pablogsal', 'miss-islington']
    pr_nums = ['7828', '8263', '8264']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue33716'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    @vstinner
    Copy link
    Member Author

    x86 Windows7 3.7:
    http://buildbot.python.org/all/#/builders/111/builds/299

    test_crash (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ... 26.57s ok
    ...
    test_crash (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest) ... 90.96s FAIL
    ...

    ======================================================================
    FAIL: test_crash (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "D:\cygwin\home\db3l\buildarea\3.7.bolen-windows7\build\lib\test\test_concurrent_futures.py", line 131, in tearDown
        self.assertLess(dt, 60, "synchronization issue: test lasted too long")
    AssertionError: 90.95560574531555 not less than 60 : synchronization issue: test lasted too long

    This buildbot is known to be slow.

    See also bpo-33715.

    @vstinner vstinner added 3.7 (EOL) end of life tests Tests in the Lib/test dir OS-windows labels May 31, 2018
    @vstinner
    Copy link
    Member Author

    Hum, I guess that the fix is to use a timeout of 5 minutes instead of 1 minute. It's ok if the buildbot is slow.

    Moreover, it would be interesting to replace time.time() with time.monotonic().

    @vstinner
    Copy link
    Member Author

    Recent failure (fail then pass):
    http://buildbot.python.org/all/#/builders/58/builds/1031

    ======================================================================
    FAIL: test_crash (test.test_concurrent_futures.ProcessPoolSpawnExecutorDeadlockTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_concurrent_futures.py", line 131, in tearDown
        self.assertLess(dt, 60, "synchronization issue: test lasted too long")
    AssertionError: 62.650086402893066 not less than 60 : synchronization issue: test lasted too long

    @vstinner
    Copy link
    Member Author

    + def tearDown(self):
    + self.executor.shutdown(wait=True)
    + dt = time.time() - self.t1
    + if test.support.verbose:
    + print("%.2fs" % dt, end=' ')
    + self.assertLess(dt, 60, "synchronization issue: test lasted too long")

    This code has been added by:

    commit aebac0b
    Author: Antoine Pitrou <solipsis@pitrou.net>
    Date: Thu Mar 24 15:47:39 2011 +0100

    Add tests for the atexit hook in concurrent.futures (part of bpo-11635)
    

    What is the purpose of having an hardcoded maximum test execution duration? If a test takes 2 seconds instead of 1, it means that the test found a design issue in concurrent.futures? Or it would mean that the test has a bug?

    We have many buildbots which are super slow, so I proposed to increase the maximum duration to 5 minutes instead of 1 minute to quickly repair buildbots.

    But with 5 minutes, I'm not sure that the check is still useful.

    @antoine: do you recall the rationale for this check?

    @pitrou
    Copy link
    Member

    pitrou commented Jun 21, 2018

    I don't remember :-/ It's probably ok to increase the timeout, though.

    @pablogsal
    Copy link
    Member

    New changeset 3ad8dec by Pablo Galindo in branch 'master':
    bpo-33716, test_concurrent_futures: increase timeout (GH-7828)
    3ad8dec

    @miss-islington
    Copy link
    Contributor

    New changeset b89776f by Miss Islington (bot) in branch '3.7':
    bpo-33716, test_concurrent_futures: increase timeout (GH-7828)
    b89776f

    @vstinner
    Copy link
    Member Author

    New changeset 8df4770 by Victor Stinner in branch '3.6':
    bpo-33716, test_concurrent_futures: increase timeout (GH-7828) (GH-8264)
    8df4770

    @vstinner
    Copy link
    Member Author

    The issue has been working around by increasing the timeout from 1 minute to 5 minutes.

    @vstinner vstinner added the 3.8 only security fixes label Jul 12, 2018
    @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 3.8 only security fixes OS-windows tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants