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 failure on Windows #54392

Closed
pitrou opened this issue Oct 23, 2010 · 8 comments
Closed

test_concurrent_futures failure on Windows #54392

pitrou opened this issue Oct 23, 2010 · 8 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@pitrou
Copy link
Member

pitrou commented Oct 23, 2010

BPO 10183
Nosy @brianquinlan, @pitrou
Files
  • timing.patch: Increased Timeouts
  • timing2.patch: Increased event wait timeout
  • 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/brianquinlan'
    closed_at = <Date 2010-11-20.04:10:08.293>
    created_at = <Date 2010-10-23.18:54:09.800>
    labels = ['type-bug', 'library']
    title = 'test_concurrent_futures failure on Windows'
    updated_at = <Date 2010-11-20.04:10:08.291>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2010-11-20.04:10:08.291>
    actor = 'bquinlan'
    assignee = 'bquinlan'
    closed = True
    closed_date = <Date 2010-11-20.04:10:08.293>
    closer = 'bquinlan'
    components = ['Library (Lib)']
    creation = <Date 2010-10-23.18:54:09.800>
    creator = 'pitrou'
    dependencies = []
    files = ['19636', '19645']
    hgrepos = []
    issue_num = 10183
    keywords = ['patch']
    message_count = 8.0
    messages = ['119466', '121448', '121450', '121498', '121567', '121574', '121576', '121594']
    nosy_count = 2.0
    nosy_names = ['bquinlan', 'pitrou']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue10183'
    versions = ['Python 3.2']

    @pitrou
    Copy link
    Member Author

    pitrou commented Oct 23, 2010

    I get this failure quite reliably on a Windows 7 VM, in both 32-bit and 64-bit builds:

    ======================================================================
    FAIL: test_map_timeout (test.test_concurrent_futures.ProcessPoolExecutorTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Y:\py3k\__svn__\lib\test\test_concurrent_futures.py", line 572, in test_map_timeout
        self.assertEquals([42, 42], results)
    AssertionError: Lists differ: [42, 42] != []

    First list contains 2 additional elements.
    First extra element 0:
    42

    • [42, 42]
      + []

    @pitrou pitrou added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Oct 23, 2010
    @brianquinlan
    Copy link
    Contributor

    Would you include the entire output of the test run?

    @pitrou
    Copy link
    Member Author

    pitrou commented Nov 18, 2010

    Y:\>py3k\svn\PCbuild\amd64\python_d.exe -m test.regrtest -v test_concurrent_futures
    == CPython 3.2a4+ (py3k, Nov 18 2010, 11:12:09) [MSC v.1500 64 bit (AMD64)]
    == Windows-7-6.1.7600 little-endian
    == Y:\py3k\svn\build\test_python_2016
    [1/1] test_concurrent_futures
    test_map (test.test_concurrent_futures.ProcessPoolExecutorTest) ... ok
    test_map_exception (test.test_concurrent_futures.ProcessPoolExecutorTest) ... ok

    test_map_timeout (test.test_concurrent_futures.ProcessPoolExecutorTest) ... FAIL

    test_submit (test.test_concurrent_futures.ProcessPoolExecutorTest) ... ok
    test_submit_keyword (test.test_concurrent_futures.ProcessPoolExecutorTest) ... o
    k
    test_map (test.test_concurrent_futures.ThreadPoolExecutorTest) ... ok
    test_map_exception (test.test_concurrent_futures.ThreadPoolExecutorTest) ... ok
    test_map_timeout (test.test_concurrent_futures.ThreadPoolExecutorTest) ... ok
    test_submit (test.test_concurrent_futures.ThreadPoolExecutorTest) ... ok
    test_submit_keyword (test.test_concurrent_futures.ThreadPoolExecutorTest) ... ok

    test_all_completed (test.test_concurrent_futures.ProcessPoolWaitTests) ... ok
    test_all_completed_some_already_completed (test.test_concurrent_futures.ProcessP
    oolWaitTests) ... ok
    test_first_completed (test.test_concurrent_futures.ProcessPoolWaitTests) ... ok
    test_first_completed_one_already_completed (test.test_concurrent_futures.Process
    PoolWaitTests) ... ok
    test_first_exception (test.test_concurrent_futures.ProcessPoolWaitTests) ... ok
    test_first_exception_one_already_failed (test.test_concurrent_futures.ProcessPoo
    lWaitTests) ... ok
    test_first_exception_some_already_complete (test.test_concurrent_futures.Process
    PoolWaitTests) ... ok
    test_timeout (test.test_concurrent_futures.ProcessPoolWaitTests) ... FAIL
    test_all_completed (test.test_concurrent_futures.ThreadPoolWaitTests) ... ok
    test_all_completed_some_already_completed (test.test_concurrent_futures.ThreadPo
    olWaitTests) ... ok
    test_first_completed (test.test_concurrent_futures.ThreadPoolWaitTests) ... ok
    test_first_completed_one_already_completed (test.test_concurrent_futures.ThreadP
    oolWaitTests) ... ok
    test_first_exception (test.test_concurrent_futures.ThreadPoolWaitTests) ... ok
    test_first_exception_one_already_failed (test.test_concurrent_futures.ThreadPool
    WaitTests) ... ok
    test_first_exception_some_already_complete (test.test_concurrent_futures.ThreadP
    oolWaitTests) ... ok
    test_timeout (test.test_concurrent_futures.ThreadPoolWaitTests) ... ok
    test_no_timeout (test.test_concurrent_futures.ProcessPoolAsCompletedTests) ... o
    k
    test_zero_timeout (test.test_concurrent_futures.ProcessPoolAsCompletedTests) ...
    ok
    test_no_timeout (test.test_concurrent_futures.ThreadPoolAsCompletedTests) ... ok

    test_zero_timeout (test.test_concurrent_futures.ThreadPoolAsCompletedTests) ...
    ok
    test_cancel (test.test_concurrent_futures.FutureTests) ... ok
    test_cancelled (test.test_concurrent_futures.FutureTests) ... ok
    test_done (test.test_concurrent_futures.FutureTests) ... ok
    test_done_callback_already_cancelled (test.test_concurrent_futures.FutureTests)
    ... ok
    test_done_callback_already_failed (test.test_concurrent_futures.FutureTests) ...
    ok
    test_done_callback_already_successful (test.test_concurrent_futures.FutureTests)
    ... ok
    test_done_callback_raises (test.test_concurrent_futures.FutureTests) ... ok
    test_done_callback_with_cancel (test.test_concurrent_futures.FutureTests) ... ok

    test_done_callback_with_exception (test.test_concurrent_futures.FutureTests) ...
    ok
    test_done_callback_with_result (test.test_concurrent_futures.FutureTests) ... ok

    test_exception_with_success (test.test_concurrent_futures.FutureTests) ... ok
    test_exception_with_timeout (test.test_concurrent_futures.FutureTests) ... ok
    test_repr (test.test_concurrent_futures.FutureTests) ... ok
    test_result_with_cancel (test.test_concurrent_futures.FutureTests) ... ok
    test_result_with_success (test.test_concurrent_futures.FutureTests) ... ok
    test_result_with_timeout (test.test_concurrent_futures.FutureTests) ... ok
    test_running (test.test_concurrent_futures.FutureTests) ... ok
    test_context_manager_shutdown (test.test_concurrent_futures.ProcessPoolShutdownT
    est) ... ok
    test_del_shutdown (test.test_concurrent_futures.ProcessPoolShutdownTest) ... ok
    test_processes_terminate (test.test_concurrent_futures.ProcessPoolShutdownTest)
    ... ok
    test_run_after_shutdown (test.test_concurrent_futures.ProcessPoolShutdownTest) .
    .. ok
    test_context_manager_shutdown (test.test_concurrent_futures.ThreadPoolShutdownTe
    st) ... ok
    test_del_shutdown (test.test_concurrent_futures.ThreadPoolShutdownTest) ... ok
    test_run_after_shutdown (test.test_concurrent_futures.ThreadPoolShutdownTest) ..
    . ok
    test_threads_terminate (test.test_concurrent_futures.ThreadPoolShutdownTest) ...
    ok

    ======================================================================
    FAIL: test_map_timeout (test.test_concurrent_futures.ProcessPoolExecutorTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Y:\py3k\__svn__\lib\test\test_concurrent_futures.py", line 572, in test_
    map_timeout
        self.assertEquals([42, 42], results)
    AssertionError: Lists differ: [42, 42] != []

    First list contains 2 additional elements.
    First extra element 0:
    42

    • [42, 42]
      + []

    ======================================================================
    FAIL: test_timeout (test.test_concurrent_futures.ProcessPoolWaitTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Y:\py3k\__svn__\lib\test\test_concurrent_futures.py", line 442, in test_
    timeout
        future1]), finished)
    AssertionError: Items in the first set but not the second:
    <Future at 0x2e7e330 state=running>

    Ran 55 tests in 48.469s

    FAILED (failures=2)
    test test_concurrent_futures failed -- multiple errors occurred
    1 test failed:
    test_concurrent_futures
    [106578 refs]

    @brianquinlan
    Copy link
    Contributor

    Could you try rerunning the tests with the attached patch? It could be that your machines are just terribly slow at starting new Python instances.

    @pitrou
    Copy link
    Member Author

    pitrou commented Nov 19, 2010

    Then I get more failures:

    ======================================================================
    FAIL: test_map_timeout (test.test_concurrent_futures.ProcessPoolExecutorTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Y:\py3k\__svn__\lib\test\test_concurrent_futures.py", line 563, in test_
    map_timeout
        timeout=10):
      File "Y:\py3k\__svn__\lib\concurrent\futures\_base.py", line 546, in map
        yield future.result(end_time - time.time())
      File "Y:\py3k\__svn__\lib\concurrent\futures\_base.py", line 400, in result
        return self.__get_result()
      File "Y:\py3k\__svn__\lib\concurrent\futures\_base.py", line 352, in __get_res
    ult
        raise self._exception
    AssertionError

    ======================================================================
    FAIL: test_map_timeout (test.test_concurrent_futures.ThreadPoolExecutorTest)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Y:\py3k\__svn__\lib\test\test_concurrent_futures.py", line 563, in test_
    map_timeout
        timeout=10):
      File "Y:\py3k\__svn__\lib\concurrent\futures\_base.py", line 546, in map
        yield future.result(end_time - time.time())
      File "Y:\py3k\__svn__\lib\concurrent\futures\_base.py", line 400, in result
        return self.__get_result()
      File "Y:\py3k\__svn__\lib\concurrent\futures\_base.py", line 352, in __get_res
    ult
        raise self._exception
      File "Y:\py3k\__svn__\lib\concurrent\futures\thread.py", line 65, in run
        result = self.fn(*self.args, **self.kwargs)
      File "Y:\py3k\__svn__\lib\test\test_concurrent_futures.py", line 132, in __cal
    l__
        super().__call__()
      File "Y:\py3k\__svn__\lib\test\test_concurrent_futures.py", line 107, in __cal
    l__
        self._wait_on_event(self._can_finish)
      File "Y:\py3k\__svn__\lib\test\test_concurrent_futures.py", line 79, in _wait_
    on_event
        assert r == 0
    AssertionError

    ======================================================================
    FAIL: test_timeout (test.test_concurrent_futures.ProcessPoolWaitTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Y:\py3k\__svn__\lib\test\test_concurrent_futures.py", line 442, in test_
    timeout
        future1]), finished)
    AssertionError: Items in the second set but not the first:
    <Future at 0x2c73a80 state=finished raised AssertionError>

    ======================================================================
    FAIL: test_timeout (test.test_concurrent_futures.ThreadPoolWaitTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "Y:\py3k\__svn__\lib\test\test_concurrent_futures.py", line 442, in test_
    timeout
        future1]), finished)
    AssertionError: Items in the second set but not the first:
    <Future at 0x2c99740 state=finished raised AssertionError>

    Ran 55 tests in 64.828s

    FAILED (failures=4)

    @brianquinlan
    Copy link
    Contributor

    Could you try with the patch that I just attached? And thanks for you help, I really appreciated it!

    @pitrou
    Copy link
    Member Author

    pitrou commented Nov 19, 2010

    Could you try with the patch that I just attached? And thanks for you
    help, I really appreciated it!

    It works ok indeed.

    @brianquinlan
    Copy link
    Contributor

    Fixed in r10183

    @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
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants