|
|
Created:
4 years ago by ssid Modified:
4 years ago Reviewers:
Primiano Tucci (use gerrit) CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org, vmpstr+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionMake memory-infra tests register / unregister with thread safety
The DCHECK for correct thread at unregistration fires only when tracing
is enabled. As a first step to make this check stricter, fix the tests
to unregister on right thread.
Move the DCHECK that tests for task runner for polling MDP to
registration time.
BUG=643438, 607533
Committed: https://crrev.com/cc4d7737106490e79b40e4bc946405f324c0d834
Cr-Commit-Position: refs/heads/master@{#440239}
Patch Set 1 : . #Patch Set 2 : fix tests. #
Total comments: 2
Patch Set 3 : Just fix tests. #
Dependent Patchsets: Messages
Total messages: 31 (24 generated)
The CQ bit was checked by ssid@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
ssid@chromium.org changed reviewers: + primiano@chromium.org
I've always wanted to do this. This would increase the probability of catching races for registration. It will not affect production since it's still DCHECK.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
Patchset #1 (id:1) has been deleted
The CQ bit was checked by ssid@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by ssid@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
On 2016/12/20 00:53:46, ssid wrote: > I've always wanted to do this. This would increase the probability of catching > races for registration. It will not affect production since it's still DCHECK. Conceptually LG, I shouldn't have added that if(!tracing_enabled) before check in the first place. The concrete problem now is that we might have cases like this out there. For instance all these cc_perftests now are failing because they are violating the threading assumption. So, before really landing this I'd like to be in a state where we are confident this is not going to cause pain to everybody and crash here and there when people try to use debug or dcheck_always_Enabled builds. Essentially my fear is that if you land this, flakiness will start popping up. Maybe we need a more graceful path to get to this state, e.g., having some kind of whitelist to make sure that: - newly added MDP always get the DCHECK, regardless of tracing. - Existing ones preserve the current behavior (dcheck only when tracing is enabled) and then we'd slowly reduce the whitelist, enforcing DCHECKS on the MDP one by one, week by week, so at most we cause one flakiness per time. And once we get to the state where the whielist is empty we just remove it and get to the state of this CL. WDYT? In the meantime OK to start fixing the unittests, so LGTM for that part (but not for blindly enabling the full dcheck)
ah forgot a comment in the previous msg https://codereview.chromium.org/2592543002/diff/40001/base/trace_event/memory... File base/trace_event/memory_dump_manager.cc (left): https://codereview.chromium.org/2592543002/diff/40001/base/trace_event/memory... base/trace_event/memory_dump_manager.cc:354: DCHECK(take_mdp_ownership_and_delete_async) I'd still kjeep the DCHECK here, without the string, just for documentation and code readability purposes.
Description was changed from ========== Make memory-infra DCHECKs stricter at registration and unregistration The DCHECK for correct thread at unregistration fires only when tracing is enabled. Make it crash always so that the bots can catch regressions better. Move the DCHECK that tests for task runner for polling MDP to registration time. BUG=643438,607533 ========== to ========== Make memory-infra tests register / unregister with thread safety The DCHECK for correct thread at unregistration fires only when tracing is enabled. As a first step to make this check stricter, fix the tests to unregister on right thread. Move the DCHECK that tests for task runner for polling MDP to registration time. BUG=643438,607533 ==========
Makes sense. I will write another CL with the blacklist for dcheck. Thanks https://codereview.chromium.org/2592543002/diff/40001/base/trace_event/memory... File base/trace_event/memory_dump_manager.cc (left): https://codereview.chromium.org/2592543002/diff/40001/base/trace_event/memory... base/trace_event/memory_dump_manager.cc:354: DCHECK(take_mdp_ownership_and_delete_async) On 2016/12/21 11:44:25, Primiano - Oh Oh Oh till Jan 3 wrote: > I'd still kjeep the DCHECK here, without the string, just for documentation and > code readability purposes. Done.
The CQ bit was checked by ssid@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by ssid@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from primiano@chromium.org Link to the patchset: https://codereview.chromium.org/2592543002/#ps60001 (title: "Just fix tests.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1482358534363910, "parent_rev": "6d4e1b85618db4e5eaf14c369d0f0b2bd9e129de", "commit_rev": "4e6b02602cbd809c4a2c5003b9394e6c078ff812"}
Message was sent while issue was closed.
Description was changed from ========== Make memory-infra tests register / unregister with thread safety The DCHECK for correct thread at unregistration fires only when tracing is enabled. As a first step to make this check stricter, fix the tests to unregister on right thread. Move the DCHECK that tests for task runner for polling MDP to registration time. BUG=643438,607533 ========== to ========== Make memory-infra tests register / unregister with thread safety The DCHECK for correct thread at unregistration fires only when tracing is enabled. As a first step to make this check stricter, fix the tests to unregister on right thread. Move the DCHECK that tests for task runner for polling MDP to registration time. BUG=643438,607533 Review-Url: https://codereview.chromium.org/2592543002 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== Make memory-infra tests register / unregister with thread safety The DCHECK for correct thread at unregistration fires only when tracing is enabled. As a first step to make this check stricter, fix the tests to unregister on right thread. Move the DCHECK that tests for task runner for polling MDP to registration time. BUG=643438,607533 Review-Url: https://codereview.chromium.org/2592543002 ========== to ========== Make memory-infra tests register / unregister with thread safety The DCHECK for correct thread at unregistration fires only when tracing is enabled. As a first step to make this check stricter, fix the tests to unregister on right thread. Move the DCHECK that tests for task runner for polling MDP to registration time. BUG=643438,607533 Committed: https://crrev.com/cc4d7737106490e79b40e4bc946405f324c0d834 Cr-Commit-Position: refs/heads/master@{#440239} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/cc4d7737106490e79b40e4bc946405f324c0d834 Cr-Commit-Position: refs/heads/master@{#440239} |