Skip to content

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

Merged
1st1 merged 1 commit into
python:masterfrom
msornay:fix-issue-27585
Jun 9, 2017
Merged

bpo-27585: Cancelled lock waiter wakes up the next one#1031
1st1 merged 1 commit into
python:masterfrom
msornay:fix-issue-27585

Conversation

@msornay

@msornay msornay commented Apr 7, 2017

Copy link
Copy Markdown
Contributor

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
Copy Markdown

@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
Copy Markdown

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
Copy Markdown
Contributor

lgtm

@popravich

Copy link
Copy Markdown

Any news?

@jettify

jettify commented Jun 5, 2017

Copy link
Copy Markdown

ping

@1st1

1st1 commented Jun 5, 2017

Copy link
Copy Markdown
Member

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

@1st1 1st1 merged commit 894a654 into python:master Jun 9, 2017
1st1 pushed a commit that referenced this pull request Jun 9, 2017
1st1 pushed 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 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
@Mariatta

Mariatta commented Sep 7, 2017

Copy link
Copy Markdown
Member

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

@miss-islington

Copy link
Copy Markdown
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
Copy Markdown
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