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

Issue 2666423002: Assert sequence validity on non-thread-safe RefCount manipulations (2) (Closed)

Created:
3 years, 10 months ago by tzik
Modified:
3 years, 8 months ago
CC:
chromium-reviews, gavinp+memory_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Assert sequence validity on non-thread-safe RefCount manipulations This CL adds DCHECKs to non-thread-safe base::RefCount to trace racy ref count manipulations. A ref counted object is considered to be bound to a sequence if the count is more than one. After this CL, ref count manipulations to a sequenced-bound one cause DCHECK failure. This CL also adds ScopedAllowCrossThreadRefCountAccess to opt out, and applies the opt-out as needed. BUG=688072 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2666423002 Cr-Original-Commit-Position: refs/heads/master@{#460773} Committed: https://chromium.googlesource.com/chromium/src/+/f9a212dec0fec22e21d7f66ad1aa9414ed1dc068 Review-Url: https://codereview.chromium.org/2666423002 Cr-Commit-Position: refs/heads/master@{#461235} Committed: https://chromium.googlesource.com/chromium/src/+/3f4231f979090ad23fd89622b3b36ed564650645

Patch Set 1 #

Patch Set 2 : fix #

Patch Set 3 : history fix #

Patch Set 4 : fix net_unittests #

Patch Set 5 : +suppressor #

Patch Set 6 : +SW fix #

Patch Set 7 : suppress ppapi false positive #

Patch Set 8 : fix devtools race #

Patch Set 9 : suppress GpuDataManagerImpl #

Patch Set 10 : suppress ResourceBundle and AtExitManager #

Patch Set 11 : fix #

Patch Set 12 : rebase #

Patch Set 13 : +loop_runner_fix. +page_capture_fix #

Patch Set 14 : suppress mojo #

Patch Set 15 : clean up #

Patch Set 16 : fix #

Patch Set 17 : rebase #

Patch Set 18 : rebase #

Patch Set 19 : rebase #

Patch Set 20 : font fix & add_to_home_fix #

Patch Set 21 : rebase on fonts_fix CL #

Total comments: 24

Patch Set 22 : rebase on snapshot_fix. suppress TextureGroup failure #

Patch Set 23 : . #

Patch Set 24 : rebase on ImageStorage fix #

Total comments: 8

Patch Set 25 : rebase #

Patch Set 26 : comment & variable name fix #

Patch Set 27 : . #

Patch Set 28 : rebase #

Patch Set 29 : rebase #

Total comments: 1

Patch Set 30 : rebase #

Patch Set 31 : per-instance opt-out #

Total comments: 1

Patch Set 32 : rebase #

Patch Set 33 : rebase #

Total comments: 6

Patch Set 34 : +comment #

Patch Set 35 : remove DisableSequenceConsistencyAssertions #

Unified diffs Side-by-side diffs Delta from patch set Stats (+160 lines, -1 line) Patch
M base/at_exit.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -0 lines 0 comments Download
M base/memory/ref_counted.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 6 chunks +47 lines, -1 line 0 comments Download
M base/memory/ref_counted.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 2 chunks +25 lines, -0 lines 0 comments Download
M cc/trees/proxy_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/gpu/gpu_data_manager_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 3 chunks +17 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/mailbox_manager_sync.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 5 chunks +20 lines, -0 lines 0 comments Download
M ppapi/shared_impl/proxy_lock.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 8 chunks +36 lines, -0 lines 0 comments Download
M ppapi/shared_impl/tracked_callback.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +5 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 211 (158 generated)
tzik
I think all depending CLs and fixes have landed now. PTAL.
3 years, 10 months ago (2017-02-16 11:43:49 UTC) #80
tzik
On 2017/02/16 11:43:49, tzik wrote: > I think all depending CLs and fixes have landed ...
3 years, 10 months ago (2017-02-16 12:48:52 UTC) #83
tzik
On 2017/02/16 12:48:52, tzik wrote: > On 2017/02/16 11:43:49, tzik wrote: > > I think ...
3 years, 10 months ago (2017-02-16 18:11:46 UTC) #89
gab
Took a peak at ref_counted.h/cc, this is very nice, thanks for doing this and the ...
3 years, 10 months ago (2017-02-16 21:38:47 UTC) #91
tzik
https://codereview.chromium.org/2666423002/diff/420001/base/memory/ref_counted.cc File base/memory/ref_counted.cc (right): https://codereview.chromium.org/2666423002/diff/420001/base/memory/ref_counted.cc#newcode67 base/memory/ref_counted.cc:67: } On 2017/02/16 21:38:46, gab wrote: > Keep these ...
3 years, 10 months ago (2017-02-17 11:36:09 UTC) #99
gab
//base looks great :) I'm don't think I like the ScopedAllow when behind locks though. ...
3 years, 10 months ago (2017-02-17 21:10:41 UTC) #105
tzik
https://codereview.chromium.org/2666423002/diff/480001/base/memory/ref_counted.cc File base/memory/ref_counted.cc (right): https://codereview.chromium.org/2666423002/diff/480001/base/memory/ref_counted.cc#newcode62 base/memory/ref_counted.cc:62: sequence_checker_.CalledOnValidSequence(); On 2017/02/17 21:10:40, gab wrote: > Flip these ...
3 years, 10 months ago (2017-02-21 06:15:03 UTC) #111
tzik
On 2017/02/17 21:10:41, gab wrote: > //base looks great :) > > I'm don't think ...
3 years, 10 months ago (2017-02-21 07:06:26 UTC) #112
gab
On 2017/02/21 07:06:26, tzik wrote: > On 2017/02/17 21:10:41, gab wrote: > > //base looks ...
3 years, 10 months ago (2017-02-21 21:45:38 UTC) #115
gab
On 2017/02/21 07:06:26, tzik wrote: > On 2017/02/17 21:10:41, gab wrote: > > //base looks ...
3 years, 10 months ago (2017-02-21 21:45:38 UTC) #116
tzik
All race fixes have landed. Let's resume this to prevent further race. On 2017/02/21 21:45:38, ...
3 years, 9 months ago (2017-03-03 12:05:49 UTC) #131
danakj
On 2017/03/03 12:05:49, tzik wrote: > All race fixes have landed. Let's resume this to ...
3 years, 9 months ago (2017-03-03 17:32:14 UTC) #132
raymes
On 2017/03/03 17:32:14, danakj wrote: > On 2017/03/03 12:05:49, tzik wrote: > > All race ...
3 years, 9 months ago (2017-03-06 00:43:01 UTC) #133
Zhenyao Mo
gpu side lgtm
3 years, 9 months ago (2017-03-06 02:40:19 UTC) #134
yzshen1
https://codereview.chromium.org/2666423002/diff/580001/mojo/public/cpp/bindings/lib/multiplex_router.cc File mojo/public/cpp/bindings/lib/multiplex_router.cc (right): https://codereview.chromium.org/2666423002/diff/580001/mojo/public/cpp/bindings/lib/multiplex_router.cc#newcode436 mojo/public/cpp/bindings/lib/multiplex_router.cc:436: base::ScopedAllowCrossThreadRefCountAccess Can this opt-out be configured with a type ...
3 years, 9 months ago (2017-03-06 17:53:52 UTC) #135
tzik
On 2017/03/06 17:53:52, yzshen1 wrote: > https://codereview.chromium.org/2666423002/diff/580001/mojo/public/cpp/bindings/lib/multiplex_router.cc > File mojo/public/cpp/bindings/lib/multiplex_router.cc (right): > > https://codereview.chromium.org/2666423002/diff/580001/mojo/public/cpp/bindings/lib/multiplex_router.cc#newcode436 > ...
3 years, 9 months ago (2017-03-07 13:50:27 UTC) #136
yzshen1
On 2017/03/07 13:50:27, tzik wrote: > On 2017/03/06 17:53:52, yzshen1 wrote: > > > https://codereview.chromium.org/2666423002/diff/580001/mojo/public/cpp/bindings/lib/multiplex_router.cc ...
3 years, 9 months ago (2017-03-07 16:49:31 UTC) #137
tzik
On 2017/03/07 16:49:31, yzshen1 wrote: > On 2017/03/07 13:50:27, tzik wrote: > > On 2017/03/06 ...
3 years, 9 months ago (2017-03-13 06:48:20 UTC) #138
danakj
On Mon, Mar 13, 2017 at 2:48 AM, <tzik@chromium.org> wrote: > On 2017/03/07 16:49:31, yzshen1 ...
3 years, 9 months ago (2017-03-13 14:41:39 UTC) #139
yzshen1
On 2017/03/13 14:41:39, danakj wrote: > On Mon, Mar 13, 2017 at 2:48 AM, <mailto:tzik@chromium.org> ...
3 years, 9 months ago (2017-03-13 18:10:03 UTC) #145
yzshen1
On 2017/03/13 06:48:20, tzik wrote: > On 2017/03/07 16:49:31, yzshen1 wrote: > > On 2017/03/07 ...
3 years, 9 months ago (2017-03-13 18:12:52 UTC) #146
danakj
On Mon, Mar 13, 2017 at 2:10 PM, <yzshen@chromium.org> wrote: > On 2017/03/13 14:41:39, danakj ...
3 years, 9 months ago (2017-03-13 18:13:22 UTC) #147
yzshen1
On Mon, Mar 13, 2017 at 11:12 AM, <danakj@chromium.org> wrote: > On Mon, Mar 13, ...
3 years, 9 months ago (2017-03-13 18:17:15 UTC) #148
tzik
Added per-instance opt-out and applied it to Mojo.
3 years, 9 months ago (2017-03-14 12:30:34 UTC) #151
yzshen1
mojo LGTM https://codereview.chromium.org/2666423002/diff/620001/base/memory/ref_counted.h File base/memory/ref_counted.h (right): https://codereview.chromium.org/2666423002/diff/620001/base/memory/ref_counted.h#newcode165 base/memory/ref_counted.h:165: // and disable the aforementioned check. Nit: ...
3 years, 9 months ago (2017-03-14 17:36:34 UTC) #154
raymes
ppapi lgtm
3 years, 9 months ago (2017-03-14 23:27:43 UTC) #155
gab
Let me re-iterate this as I think owners started reviewing this CL not this question... ...
3 years, 9 months ago (2017-03-15 20:34:34 UTC) #156
danakj
On Wed, Mar 15, 2017 at 4:34 PM, <gab@chromium.org> wrote: > Let me re-iterate this ...
3 years, 9 months ago (2017-03-15 20:37:46 UTC) #157
gab
On 2017/03/15 20:34:34, gab wrote: > Let me re-iterate this as I think owners started ...
3 years, 9 months ago (2017-03-15 20:38:15 UTC) #158
gab
On 2017/03/15 20:37:46, danakj wrote: > On Wed, Mar 15, 2017 at 4:34 PM, <mailto:gab@chromium.org> ...
3 years, 9 months ago (2017-03-15 20:40:21 UTC) #159
danakj
On Wed, Mar 15, 2017 at 4:40 PM, <gab@chromium.org> wrote: > On 2017/03/15 20:37:46, danakj ...
3 years, 9 months ago (2017-03-15 20:46:41 UTC) #160
chromium-reviews
Le mer. 15 mars 2017 16:46, <danakj@chromium.org> a écrit : > On Wed, Mar 15, ...
3 years, 9 months ago (2017-03-15 22:25:18 UTC) #161
raymes
On 2017/03/15 20:34:34, gab wrote: > Let me re-iterate this as I think owners started ...
3 years, 9 months ago (2017-03-15 22:36:34 UTC) #162
danakj
On Wed, Mar 15, 2017 at 6:25 PM, Gabriel Charette <gab@google.com> wrote: > > > ...
3 years, 9 months ago (2017-03-16 15:55:39 UTC) #163
gab
On 2017/03/16 15:55:39, danakj wrote: > On Wed, Mar 15, 2017 at 6:25 PM, Gabriel ...
3 years, 9 months ago (2017-03-20 16:50:43 UTC) #164
tzik
On 2017/03/20 16:50:43, gab wrote: > On 2017/03/16 15:55:39, danakj wrote: > > On Wed, ...
3 years, 9 months ago (2017-03-24 15:20:59 UTC) #176
gab
https://codereview.chromium.org/2666423002/diff/660001/base/memory/ref_counted.h File base/memory/ref_counted.h (right): https://codereview.chromium.org/2666423002/diff/660001/base/memory/ref_counted.h#newcode131 base/memory/ref_counted.h:131: class BASE_EXPORT ScopedAllowCrossThreadRefCountAccess final { // ScopedAllowCrossThreadRefCountAccess disables the ...
3 years, 9 months ago (2017-03-24 15:46:46 UTC) #177
yzshen1
https://codereview.chromium.org/2666423002/diff/660001/mojo/public/cpp/bindings/lib/multiplex_router.cc File mojo/public/cpp/bindings/lib/multiplex_router.cc (right): https://codereview.chromium.org/2666423002/diff/660001/mojo/public/cpp/bindings/lib/multiplex_router.cc#newcode964 mojo/public/cpp/bindings/lib/multiplex_router.cc:964: endpoint->DisableSequenceConsistencyAssertions(); On 2017/03/24 15:46:45, gab wrote: > That seems ...
3 years, 9 months ago (2017-03-24 16:58:09 UTC) #178
yzshen1
I think I have expressed my opinion clearly that ScopedAllowCrossThreadRefCountAccess is not a correct API. ...
3 years, 9 months ago (2017-03-24 17:07:06 UTC) #181
danakj
I tried to make these points earlier but just to reiterate why this doesn't seem ...
3 years, 9 months ago (2017-03-24 17:32:38 UTC) #182
yzshen1
On Fri, Mar 24, 2017 at 10:32 AM, <danakj@chromium.org> wrote: > I tried to make ...
3 years, 9 months ago (2017-03-24 17:42:07 UTC) #183
chromium-reviews
Le ven. 24 mars 2017 12:58, <yzshen@chromium.org> a écrit : > > > https://codereview.chromium.org/2666423002/diff/660001/mojo/public/cpp/bindings/lib/multiplex_router.cc > ...
3 years, 9 months ago (2017-03-24 22:06:46 UTC) #184
yzshen1
On Fri, Mar 24, 2017 at 3:06 PM, Gabriel Charette <gab@google.com> wrote: > > > ...
3 years, 9 months ago (2017-03-25 05:40:55 UTC) #185
tzik
https://codereview.chromium.org/2666423002/diff/660001/base/memory/ref_counted.h File base/memory/ref_counted.h (right): https://codereview.chromium.org/2666423002/diff/660001/base/memory/ref_counted.h#newcode131 base/memory/ref_counted.h:131: class BASE_EXPORT ScopedAllowCrossThreadRefCountAccess final { On 2017/03/24 15:46:45, gab ...
3 years, 8 months ago (2017-03-28 07:11:28 UTC) #188
gab
On 2017/03/24 22:06:46, chromium-reviews wrote: > Le ven. 24 mars 2017 12:58, <https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=yzshen@chromium.org> a écrit ...
3 years, 8 months ago (2017-03-28 15:42:34 UTC) #191
tzik
On 2017/03/28 15:42:34, gab wrote: > On 2017/03/24 22:06:46, chromium-reviews wrote: > > Le ven. ...
3 years, 8 months ago (2017-03-30 09:05:16 UTC) #194
gab
On 2017/03/30 09:05:16, tzik wrote: > On 2017/03/28 15:42:34, gab wrote: > > On 2017/03/24 ...
3 years, 8 months ago (2017-03-30 14:28:26 UTC) #197
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2666423002/700001
3 years, 8 months ago (2017-03-30 15:33:24 UTC) #200
commit-bot: I haz the power
Committed patchset #35 (id:700001) as https://chromium.googlesource.com/chromium/src/+/f9a212dec0fec22e21d7f66ad1aa9414ed1dc068
3 years, 8 months ago (2017-03-30 15:44:18 UTC) #203
wjmaclean
A revert of this CL (patchset #35 id:700001) has been created in https://codereview.chromium.org/2783393002/ by wjmaclean@chromium.org. ...
3 years, 8 months ago (2017-03-30 19:51:55 UTC) #204
tzik
On 2017/03/30 19:51:55, wjmaclean wrote: > A revert of this CL (patchset #35 id:700001) has ...
3 years, 8 months ago (2017-03-31 13:40:47 UTC) #206
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2666423002/700001
3 years, 8 months ago (2017-03-31 17:07:26 UTC) #208
commit-bot: I haz the power
3 years, 8 months ago (2017-03-31 21:32:22 UTC) #211
Message was sent while issue was closed.
Committed patchset #35 (id:700001) as
https://chromium.googlesource.com/chromium/src/+/3f4231f979090ad23fd89622b3b3...

Powered by Google App Engine
This is Rietveld 408576698