Skip to content

Commit

Permalink
Revert "Avoid the deadlock prone WT_EXECUTEINWAITTHREAD"
Browse files Browse the repository at this point in the history
This reverts commit 5b59b7d.

Reason for revert: This was a speculative fix which did not help, and
the real cause of the hang reports was found.

Original change's description:
> Avoid the deadlock prone WT_EXECUTEINWAITTHREAD
> 
> WT_EXECUTEINWAITTHREAD is theoretically slightly more efficient than
> WT_EXECUTEDEFAULT when running callbacks registered by
> RegisterWaitForSingleObject but it comes with an ill-defined risk of
> deadlocks. We seem to be hitting those, so this change switches to
> the safer flag.
> 
> If no improvement is seen then this change will be reverted.
> 
> Bug: 877012
> Change-Id: I773cad8cd0621fb487770306bee4cc9812d4f243
> Reviewed-on: https://chromium-review.googlesource.com/1200484
> Commit-Queue: Bruce Dawson <[email protected]>
> Reviewed-by: Greg Thompson <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#589608}

[email protected],[email protected]

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 877012
Change-Id: I78fe13ebfdd7380a1ec79c2e048a59802c3e7964
Reviewed-on: https://chromium-review.googlesource.com/1217150
Reviewed-by: Bruce Dawson <[email protected]>
Commit-Queue: Bruce Dawson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#590046}
  • Loading branch information
randomascii authored and Commit Bot committed Sep 10, 2018
1 parent d4c7f49 commit c5ec899
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/win/object_watcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ bool ObjectWatcher::StartWatchingInternal(HANDLE object, Delegate* delegate,

run_once_ = execute_only_once;

// WT_EXECUTEINWAITTHREAD is theoretically slightly more efficient but comes
// with the risk of deadlocks. WT_EXECUTEDEFAULT is safer.
DWORD wait_flags = WT_EXECUTEDEFAULT;
// Since our job is to just notice when an object is signaled and report the
// result back to this sequence, we can just run on a Windows wait thread.
DWORD wait_flags = WT_EXECUTEINWAITTHREAD;
if (run_once_)
wait_flags |= WT_EXECUTEONLYONCE;

Expand Down

0 comments on commit c5ec899

Please sign in to comment.