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

Issue 491393002: Avoid deadlock during trace_event flush (Closed)

Created:
6 years, 4 months ago by Xianzhu
Modified:
6 years, 3 months ago
Reviewers:
dsinclair, nduca
CC:
chromium-reviews, wfh+watch_chromium.org, dsinclair+watch_chromium.org, erikwright+watch_chromium.org, xunjieli
Project:
chromium
Visibility:
Public.

Description

Avoid deadlock during trace_event flush The deadlock occurs because we hold lock when posting flush tasks. If MessageLoop::PostTask() also calls TRACE_EVENT and the TRACE_EVENT has never been reached before, the TRACE_EVENT will try to get the category enabled flag which will also need a lock. Copy thread_message_loops into a temporary vector of scoped_refptr<SingleProcessTaskRunner> to avoid lock when calling PostTask(). BUG=397022 TEST=Existing tests and ThreadSanitizer Committed: https://crrev.com/bb113630cf9e1290eb211e8f9413f9dc4d4c5aab Cr-Commit-Position: refs/heads/master@{#293144}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : New simpler method #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -7 lines) Patch
M base/debug/trace_event_impl.cc View 1 2 2 chunks +16 lines, -7 lines 0 comments Download

Messages

Total messages: 21 (5 generated)
Xianzhu
dsinclair@ is on vacation. nduca@ could you ptal?
6 years, 4 months ago (2014-08-21 17:56:32 UTC) #1
Xianzhu
ping...
6 years, 3 months ago (2014-08-26 15:35:38 UTC) #2
Xianzhu
wangxianzhu@chromium.org changed reviewers: + dsinclair@chromium.org
6 years, 3 months ago (2014-08-28 01:40:52 UTC) #3
Xianzhu
6 years, 3 months ago (2014-08-28 01:40:52 UTC) #4
dsinclair
lgtm
6 years, 3 months ago (2014-09-02 14:26:04 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/491393002/1
6 years, 3 months ago (2014-09-02 16:07:44 UTC) #7
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 3 months ago (2014-09-02 16:18:28 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/7520)
6 years, 3 months ago (2014-09-02 16:20:38 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/491393002/20001
6 years, 3 months ago (2014-09-02 16:43:28 UTC) #12
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_tests_recipe on tryserver.chromium.linux ...
6 years, 3 months ago (2014-09-02 17:41:47 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/4423)
6 years, 3 months ago (2014-09-02 18:42:30 UTC) #15
Xianzhu
Unfortunately Patch Set 2 didn't work properly. The shared thread_message_loops still needs lock to access. ...
6 years, 3 months ago (2014-09-02 22:45:42 UTC) #16
dsinclair
lgtm
6 years, 3 months ago (2014-09-03 13:21:49 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/491393002/40001
6 years, 3 months ago (2014-09-03 15:19:39 UTC) #19
commit-bot: I haz the power
Committed patchset #3 (id:40001) as ede32d2bfa75f6c02373dffb58582be7eb0aa7f9
6 years, 3 months ago (2014-09-03 16:14:43 UTC) #20
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:25:59 UTC) #21
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/bb113630cf9e1290eb211e8f9413f9dc4d4c5aab
Cr-Commit-Position: refs/heads/master@{#293144}

Powered by Google App Engine
This is Rietveld 408576698