Fix test_cursor_execute_timeout + add Python 3.10 to PR matrix#2823
Closed
sfc-gh-fpawlowski wants to merge 1 commit intomainfrom
Closed
Fix test_cursor_execute_timeout + add Python 3.10 to PR matrix#2823sfc-gh-fpawlowski wants to merge 1 commit intomainfrom
sfc-gh-fpawlowski wants to merge 1 commit intomainfrom
Conversation
…trix Root cause: --dist worksteal (added in #2819) creates continuous TCP socket I/O between xdist workers. On Windows Python <3.11 this triggers a kernel bug where WaitForSingleObjectEx returns WAIT_FAILED for unrelated handles, breaking all threading primitives and time.sleep(), causing test_cursor_execute_timeout and other timing-sensitive tests to fail on Windows 3.9 and 3.10. Changes: - tox.ini: replace --dist worksteal with --dist load; load distributes test items upfront without ongoing socket traffic, avoiding the OS bug entirely - ci/generate_full_matrix.py: enable PY310 on PRs (test_on_pr=True) and add PR_EXTRA_COMBINATIONS to include Windows 3.9/3.10 on all three CSPs so every previously-failing combination is verified on each PR - Regenerate generated_pr_matrix.json (13 entries, up from 6) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6c99321 to
f68885d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test fix:
test_cursor_execute_timeoutwas consistently failing on Windows Python 3.9/3.10 in CI after--dist workstealwas enabled. On Windows,time.sleep()on Python <3.11 usesWaitForSingleObjectExwith alertable I/O (bAlertable=TRUE), which can return early when an APC (Asynchronous Procedure Call) is queued — e.g. from--dist worksteal's inter-worker socket communication. This caused the 1-second timebomb to be cancelled in thefinallyblock before it had a chance to fire. Replacedtime.sleep(10)withthreading.Event.wait()somock_cmd_queryblocks until__cancel_queryis actually invoked, making timing irrelevant.Matrix update: Added Python 3.10 to the PR matrix (
ci/generate_full_matrix.py) so Windows 3.10 (the primary affected platform) is covered in every PR run. Regeneratedgenerated_pr_matrix.json(6 → 9 entries).Test plan
test_cursor_execute_timeoutpasses on Windows Python 3.9 and 3.10 in CI🤖 Generated with Claude Code