GH-130727: test_wmi_query_error test is flaky #134313
Merged
zooba merged 4 commits intopython:mainfrom May 20, 2025
Merged
Conversation
Member
Author
Member
|
@chris-eibl Yeah, give it a NEWS entry, since it's a change to the runtime rather than the tests, and so users might see it out in the wild and wonder about the changed behaviour. Before merging, I'd want to confirm that there's no intentional modification of that struct that is supposed to be picked up by the other thread. I suspect not, but I haven't read the code to double-check. |
zooba
reviewed
May 20, 2025
Misc/NEWS.d/next/Windows/2025-05-20-21-43-20.gh-issue-130727.-69t4D.rst
Outdated
Show resolved
Hide resolved
|
Thanks @chris-eibl for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Thanks @chris-eibl for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
May 20, 2025
… data (pythonGH-134313) (cherry picked from commit e4fbfb1) Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
May 20, 2025
… data (pythonGH-134313) (cherry picked from commit e4fbfb1) Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
|
GH-134396 is a backport of this pull request to the 3.13 branch. |
|
GH-134397 is a backport of this pull request to the 3.14 branch. |
zooba
pushed a commit
that referenced
this pull request
May 20, 2025
zooba
pushed a commit
that referenced
this pull request
May 20, 2025
lkollar
pushed a commit
to lkollar/cpython
that referenced
this pull request
May 26, 2025
Pranjal095
pushed a commit
to Pranjal095/cpython
that referenced
this pull request
Jul 12, 2025
taegyunkim
pushed a commit
to taegyunkim/cpython
that referenced
this pull request
Aug 4, 2025
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I can reproduce the the "invalid handle" errors which @vstinner has also seen #130727 (comment) under high load (using "Stress CPU" of CPU-Z) running
The reason is, that the main thread calls
CloseHandleon the still running thread in case of aWAIT_TIMEOUT, and then the thread dies withand call stack
where
when I debug it in Visual Studio.
This has already been anticipated by @runn in #125315 (comment).
Another manifestation of this race results in
which sometimes occur on the build bots, e.g. https://buildbot.python.org/#/builders/1799/builds/20.
Copying the
_query_datastruct in the wmi thread fixes both issues.test_wmi_query_errortest is flaky #130727