Skip to content

bpo-40696: Fix a hang that can arise after gen.throw()#20287

Merged
cjerdonek merged 5 commits intopython:masterfrom
cjerdonek:issue-40696-await-hang
May 22, 2020
Merged

bpo-40696: Fix a hang that can arise after gen.throw()#20287
cjerdonek merged 5 commits intopython:masterfrom
cjerdonek:issue-40696-await-hang

Conversation

@cjerdonek
Copy link
Member

@cjerdonek cjerdonek commented May 21, 2020

@cjerdonek cjerdonek requested review from 1st1 and asvetlov as code owners May 21, 2020 08:59
@cjerdonek cjerdonek changed the title [WIP] bpo-40696: Fix a hang that can arise after gen.throw() bpo-40696: Fix a hang that can arise after gen.throw() May 21, 2020
Copy link
Member

@1st1 1st1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left a few comments, Chris.

@cjerdonek cjerdonek force-pushed the issue-40696-await-hang branch from a5084a9 to 66c71aa Compare May 22, 2020 03:35
@cjerdonek
Copy link
Member Author

@1st1 I made some changes. Let me know what you think. Happy to iterate further.

@cjerdonek cjerdonek merged commit 7c30d12 into python:master May 22, 2020
@miss-islington
Copy link
Contributor

Thanks @cjerdonek for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@cjerdonek cjerdonek deleted the issue-40696-await-hang branch May 22, 2020 20:33
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 22, 2020
This updates _PyErr_ChainStackItem() to use _PyErr_SetObject()
instead of _PyErr_ChainExceptions(). This prevents a hang in
certain circumstances because _PyErr_SetObject() performs checks
to prevent cycles in the exception context chain while
_PyErr_ChainExceptions() doesn't.
(cherry picked from commit 7c30d12)

Co-authored-by: Chris Jerdonek <[email protected]>
@bedevere-bot
Copy link

GH-20321 is a backport of this pull request to the 3.9 branch.

@miss-islington
Copy link
Contributor

Thanks @cjerdonek for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 22, 2020
This updates _PyErr_ChainStackItem() to use _PyErr_SetObject()
instead of _PyErr_ChainExceptions(). This prevents a hang in
certain circumstances because _PyErr_SetObject() performs checks
to prevent cycles in the exception context chain while
_PyErr_ChainExceptions() doesn't.
(cherry picked from commit 7c30d12)

Co-authored-by: Chris Jerdonek <[email protected]>
@bedevere-bot
Copy link

GH-20322 is a backport of this pull request to the 3.9 branch.

cjerdonek added a commit that referenced this pull request May 22, 2020
This updates _PyErr_ChainStackItem() to use _PyErr_SetObject()
instead of _PyErr_ChainExceptions(). This prevents a hang in
certain circumstances because _PyErr_SetObject() performs checks
to prevent cycles in the exception context chain while
_PyErr_ChainExceptions() doesn't.
(cherry picked from commit 7c30d12)

Co-authored-by: Chris Jerdonek <[email protected]>
arturoescaip pushed a commit to arturoescaip/cpython that referenced this pull request May 24, 2020
This updates _PyErr_ChainStackItem() to use _PyErr_SetObject()
instead of _PyErr_ChainExceptions(). This prevents a hang in
certain circumstances because _PyErr_SetObject() performs checks
to prevent cycles in the exception context chain while
_PyErr_ChainExceptions() doesn't.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants