-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Cache class: Fix crash on data race on Windows. #12579
Conversation
On Windows, the error gets mapped to a different errno when a race happens, see https://github.com/python/cpython/blob/cecd6012b0ed5dca3916ae341e705ae44172991d/PC/errmap.h#L107. Therefore, we were observing crashes from that code path, as the error wasn't being handled, but bubbled up.
ed608ae
to
685b2fe
Compare
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Cornelius! Clean fix with a great comment (and writeup in the issue 🤩)
Backport to 8.2.x: 💚 backport PR created✅ Backport PR branch: Backported as #12595 🤖 @patchback |
* Cache class: Fix crash on data race on Windows. On Windows, the error gets mapped to a different errno when a race happens, see https://github.com/python/cpython/blob/cecd6012b0ed5dca3916ae341e705ae44172991d/PC/errmap.h#L107. Therefore, we were observing crashes from that code path, as the error wasn't being handled, but bubbled up. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> (cherry picked from commit 9de29bf)
* Cache class: Fix crash on data race on Windows. On Windows, the error gets mapped to a different errno when a race happens, see https://github.com/python/cpython/blob/cecd6012b0ed5dca3916ae341e705ae44172991d/PC/errmap.h#L107. Therefore, we were observing crashes from that code path, as the error wasn't being handled, but bubbled up. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> (cherry picked from commit 9de29bf) Co-authored-by: Cornelius Riemenschneider <[email protected]>
On Windows, the error gets mapped to a different
errno when a race happens, see
https://github.com/python/cpython/blob/cecd6012b0ed5dca3916ae341e705ae44172991d/PC/errmap.h#L107. Therefore, we were observing crashes from that
code path, as the error wasn't being handled,
but bubbled up.
Fixes #12580.