GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — `test_concurrent_futures` sometimes hangs indefinitely on Windows · Issue #92222 · python/cpython

test_concurrent_futures sometimes hangs indefinitely on Windows #92222

New issue
Copy link
New issue
Copy link
Closed
Closed
test_concurrent_futures sometimes hangs indefinitely on Windows#92222
Copy link
Labels
OS-windowstestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@AlexWaygood
AlexWaygood
opened on May 3, 2022
Issue body actions

Bug report

test_concurrent_futures appears to be hanging indefinitely on Windows in our CI. This has happened twice three times in two days, on three separate unrelated CI runs.

Two PRs:

  • gh-92032: Add soft keywords to rlcompleter #92029 (comment)
  • bpo-45897: Fix frozen-slotted dataclass bug #29895: https://github.com/python/cpython/runs/6270908903?check_suite_focus=true

test_concurrent_futures has also been running for 4hr30 (and counting) on Windows (x86) on this recent push to main:

  • 9b027d4: https://github.com/python/cpython/runs/6269422000?check_suite_focus=true

Neither PR had anything to do with concurrent.futures (and the push to main didn't have anything to do with concurrent.futures either). For the first PR, test_concurrent_futures was hanging on Windows (x64) but passed on Windows (x86). For the second PR, the test has passed on Windows (x64) but is hanging on Windows (x86).

cc. @pitrou, @brianquinlan, as listed experts for concurrent.futures.

Activity

  1. AlexWaygood
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    testsTests in the Lib/test dirTests in the Lib/test dir
    on May 3, 2022
  2. AlexWaygood
    changed the title [-]`test_concurrent_futures` hangs indefinitely on Windows[/-] [+]`test_concurrent_futures` sometimes hangs indefinitely on Windows[/+] on May 3, 2022
  3. AlexWaygood commented on May 3, 2022

    @AlexWaygood
    AlexWaygood
    on May 3, 2022
    MemberAuthor
    More actions

    I've run python -m test test_concurrent_futures -v five times in succession on my Windows x64 machine, but haven't yet been able to reproduce this behaviour locally.

  4. AlexWaygood commented on May 3, 2022

    @AlexWaygood
    AlexWaygood
    on May 3, 2022
    MemberAuthor
    More actions

    The most recent significant change to concurrent.futures was #31408, merged by @JelleZijlstra. The most recent significant change to test_concurrent_futures was #91600, by @gpshead. I've no idea if either change is related to this.

  5. AlexWaygood
    added
    OS-windows
    on May 3, 2022
  6. gpshead commented on May 7, 2022

    @gpshead
    gpshead
    on May 7, 2022
    Member
    More actions

    fwiw my change to the test removed this logic that put a 0.1 second delay at the start of most every test (this is already one of the longest running tests in our suite), which was added over a decade ago without explanation and doesn't make logical sense:

        def _prime_executor(self):
            # Make sure that the executor is ready to do work before running the
            # tests. This should reduce the probability of timeouts in the tests.
            futures = [self.executor.submit(time.sleep, 0.1)
                       for _ in range(self.worker_count)]
            for f in futures:
                f.result()

    The only thing code like that can do is hope to work around a logical flaw in tests or hide an actual race condition bug. so if there is a logic flaw or race condition somewhere... we'd be best off finding it as the real fix.

    So far I've not observed timeout failures, but if anyone can reproduce them it'd be great to get a snapshot of what processes were stuck running and hanging on what so we can understand the root of the issue.

    Reacted by Alex Waygood
  7. pitrou commented on May 7, 2022

    @pitrou
    pitrou
    on May 7, 2022
    Member
    More actions

    So far I've not observed timeout failures, but if anyone can reproduce them it'd be great to get a snapshot of what processes were stuck running and hanging on what so we can understand the root of the issue.

    If nothing bad happens on the buildbots then great :-)

  8. AlexWaygood commented on May 17, 2022

    @AlexWaygood
    AlexWaygood
    on May 17, 2022
    MemberAuthor
    More actions

    I opened this issue because I saw the same CI failure three times in two days. I haven't seen it since, though, and haven't been able to reproduce it locally, so I'll close this for now. If it happens again, I'll reopen.

  9. AlexWaygood
    closed this as completedon May 17, 2022
  10. neonene commented on Jun 17, 2022

    @neonene
    neonene
    on Jun 17, 2022
    Contributor
    More actions

    I saw this issue on 3.11 branch Windows (x64):
    https://github.com/python/cpython/runs/6939506633?check_suite_focus=true

  11. neonene commented on Jun 18, 2022

    @neonene
    neonene
    on Jun 18, 2022
    Contributor
    More actions

    I am not able to reproduce locally as well. Would it be possible to inject something that shows what test case is still running or got canceled?

    Reacted by Alex Waygood
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

    OS-windowstestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.