Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix deadlock on shutdown if test_current_{exception,frames} fails#102019

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
DinoV merged 3 commits intopython:mainfromjbower-fb:fix-deadlock
Feb 23, 2023

Conversation

jbower-fb
Copy link
Contributor

@jbower-fbjbower-fb commentedFeb 18, 2023
edited
Loading

These tests spawn a thread that waits on athreading.Event. If the test fails any of its assertions, theEvent won't be signaled and the thread will wait indefinitely, causing a deadlock whenthreading._shutdown() tries to join all outstanding threads.

The solution is just to put the code in atry-finally block, with the existing clean-up in thefinally.

@swtaarrs found and fixed this originally while working onCinder.

Hopefully this is trivial enough to not need an issue or a NEWS blurb.

@bedevere-botbedevere-bot added awaiting review testsTests in the Lib/test dir labelsFeb 18, 2023
@bedevere-bot
Copy link

Most changes to Pythonrequire a NEWS entry.

Please add it using theblurb_it web app or theblurb command-line tool.

jbower-fband others added2 commitsFebruary 23, 2023 13:25
These tests spawn a thread that waits on a threading.Event. If the test fails any of its assertions, the Event won't be signaled and the thread will wait indefinitely, causing a deadlock when threading._shutdown() tries to join all outstanding threads.Co-authored-by: Brett Simmers <bsimmers@meta.com>
@DinoVDinoV merged commit0c85786 intopython:mainFeb 23, 2023
@jbower-fbjbower-fb deleted the fix-deadlock branchFebruary 23, 2023 23:33
JelleZijlstra pushed a commit to JelleZijlstra/cpython that referenced this pull requestSep 10, 2024
…thon#102019)* Don't deadlock on shutdown if test_current_{exception,frames} failsThese tests spawn a thread that waits on a threading.Event. If the test fails any of its assertions, the Event won't be signaled and the thread will wait indefinitely, causing a deadlock when threading._shutdown() tries to join all outstanding threads.Co-authored-by: Brett Simmers <bsimmers@meta.com>* Add a news entry* Fix whitespace---------Co-authored-by: Brett Simmers <bsimmers@meta.com>Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
skip issuetestsTests in the Lib/test dir
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@jbower-fb@bedevere-bot@DinoV@arhadthedev

[8]ページ先頭

©2009-2025 Movatter.jp