Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Issue 1230303005: Signal a blocked futex if the isolate is interrupted; don't busy-wait (Closed)

Created:
5 years, 5 months ago by binji
Modified:
5 years, 4 months ago
Reviewers:
Jarin
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Signal a blocked futex if the isolate is interrupted; don't busy-wait FutexEmulation::Wait can potentially block forever on a condition variable. We want to allow this to be interrupted (for a debugger, or to terminate the thread, for example). The previous implementation would periodically wake up the waiter to check for interrupts. This CL modifies the StackGuard so it wakes the blocked futex if the thread should be interrupted. BUG=chromium:497295 R=jarin@chromium.org LOG=n Committed: https://crrev.com/b7cf73271d2bbabfd4c19b6b1158c476c364c747 Cr-Commit-Position: refs/heads/master@{#30311}

Patch Set 1 #

Patch Set 2 : lock mutex when notifying condvar #

Patch Set 3 : windows fix? #

Patch Set 4 : merge master #

Patch Set 5 : fix windows build #

Total comments: 2

Patch Set 6 : fixes #

Patch Set 7 : merge master #

Total comments: 4

Patch Set 8 : fixes #

Patch Set 9 : remove atomic waiting_ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -23 lines) Patch
M src/execution.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M src/futex-emulation.h View 1 2 3 4 5 6 7 8 4 chunks +8 lines, -1 line 0 comments Download
M src/futex-emulation.cc View 1 2 3 4 5 6 7 8 3 chunks +67 lines, -22 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 15 (3 generated)
Jarin
I thought it looked good to me, but the bots disagree. Could you take a ...
5 years, 5 months ago (2015-07-23 13:01:05 UTC) #1
Jarin
One question below. Still, could you explain why it deadlocked? https://codereview.chromium.org/1230303005/diff/80001/src/futex-emulation.cc File src/futex-emulation.cc (right): https://codereview.chromium.org/1230303005/diff/80001/src/futex-emulation.cc#newcode138 ...
5 years, 4 months ago (2015-08-11 08:21:49 UTC) #2
binji
There were multiple deadlocks. I described them briefly in the comments, but I'll go into ...
5 years, 4 months ago (2015-08-11 14:51:17 UTC) #3
binji
Updated to HEAD, PTAL
5 years, 4 months ago (2015-08-18 21:58:41 UTC) #4
Jarin
lgtm with a question. https://codereview.chromium.org/1230303005/diff/120001/src/execution.cc File src/execution.cc (right): https://codereview.chromium.org/1230303005/diff/120001/src/execution.cc#newcode418 src/execution.cc:418: if (isolate_->futex_wait_list_node()->waiting()) { Could we ...
5 years, 4 months ago (2015-08-19 05:26:05 UTC) #5
binji
https://codereview.chromium.org/1230303005/diff/120001/src/execution.cc File src/execution.cc (right): https://codereview.chromium.org/1230303005/diff/120001/src/execution.cc#newcode418 src/execution.cc:418: if (isolate_->futex_wait_list_node()->waiting()) { On 2015/08/19 at 05:26:05, Jarin wrote: ...
5 years, 4 months ago (2015-08-19 17:36:23 UTC) #6
Jarin
On 2015/08/19 17:36:23, binji wrote: > https://codereview.chromium.org/1230303005/diff/120001/src/execution.cc > File src/execution.cc (right): > > https://codereview.chromium.org/1230303005/diff/120001/src/execution.cc#newcode418 > ...
5 years, 4 months ago (2015-08-20 05:19:58 UTC) #7
binji
On 2015/08/20 at 05:19:58, jarin wrote: > On 2015/08/19 17:36:23, binji wrote: > > https://codereview.chromium.org/1230303005/diff/120001/src/execution.cc ...
5 years, 4 months ago (2015-08-20 23:16:13 UTC) #8
Jarin
On 2015/08/20 23:16:13, binji wrote: > On 2015/08/20 at 05:19:58, jarin wrote: > > On ...
5 years, 4 months ago (2015-08-21 07:12:41 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1230303005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1230303005/160001
5 years, 4 months ago (2015-08-21 16:04:13 UTC) #13
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 4 months ago (2015-08-21 16:41:50 UTC) #14
commit-bot: I haz the power
5 years, 4 months ago (2015-08-21 16:42:12 UTC) #15
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/b7cf73271d2bbabfd4c19b6b1158c476c364c747
Cr-Commit-Position: refs/heads/master@{#30311}

Powered by Google App Engine
This is Rietveld 408576698