-
-
Notifications
You must be signed in to change notification settings - Fork 32k
GH-130727: test_wmi_query_error test is flaky #134313
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
Conversation
@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. |
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. |
… data (pythonGH-134313) (cherry picked from commit e4fbfb1) Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
… 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. |
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
CloseHandle
on 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_data
struct in the wmi thread fixes both issues.test_wmi_query_error
test is flaky #130727