Skip to content
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

bpo-27585: Cancelled lock waiter wakes up the next one #1031

Merged
merged 1 commit into from
Jun 9, 2017

Conversation

msornay
Copy link
Contributor

@msornay msornay commented Apr 7, 2017

Avoid a deadlock when the waiter who is about to take the lock is cancelled

Issue #27585: http://bugs.python.org/issue27585
Original PR on asyncio repository: python/asyncio#467

Avoid a deadlock when the waiter who is about to take the lock is
cancelled

Issue python#27585
@mention-bot
Copy link

@msornay, thanks for your PR! By analyzing the history of the files in this pull request, we identified @1st1, @asvetlov and @serhiy-storchaka to be potential reviewers.

@popravich
Copy link

Guys! @1st1, @asvetlov, @serhiy-storchaka,
Can anyone take a look at this patch, the issue is real PITA.

@msornay, probably, the same fix should be applied to asyncio.Condition.wait() method
as it uses the same logic as asyncio.Lock.acquire():
if await cond.wait() is resolved but owning task is cancelled -- other waiters could end up in a deadlock

@1st1 1st1 self-assigned this May 18, 2017
@asvetlov
Copy link
Contributor

lgtm

@popravich
Copy link

Any news?

@jettify
Copy link

jettify commented Jun 5, 2017

ping

@1st1
Copy link
Member

1st1 commented Jun 5, 2017

I'll take a look tomorrow/the day after.

@1st1 1st1 merged commit 894a654 into python:master Jun 9, 2017
1st1 added a commit that referenced this pull request Jun 9, 2017
1st1 added a commit that referenced this pull request Jun 9, 2017
1st1 pushed a commit that referenced this pull request Jun 9, 2017
Avoid a deadlock when the waiter who is about to take the lock is
cancelled

Issue #27585
1st1 pushed a commit that referenced this pull request Jun 9, 2017
Avoid a deadlock when the waiter who is about to take the lock is
cancelled

Issue #27585
1st1 added a commit that referenced this pull request Jun 9, 2017
Avoid a deadlock when the waiter who is about to take the lock is
cancelled

Issue #27585
1st1 added a commit that referenced this pull request Jun 9, 2017
Avoid a deadlock when the waiter who is about to take the lock is
cancelled

Issue #27585
@Mariatta
Copy link
Member

Mariatta commented Sep 7, 2017

Does this still need backport? If not please remove the label.

@miss-islington
Copy link
Contributor

🐍🍒⛏🤖 Thanks @msornay for the PR, and @1st1 for merging it 🌮🎉.I'm working now to backport this PR to: 3.6.

@miss-islington
Copy link
Contributor

Sorry, @msornay and @1st1, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.

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.

10 participants