New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 846252 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 1
Type: Bug
Hotlist-MemoryInfra



Sign in to add a comment

MemoryInfra: Add whitelisting for missing sync model type MOUNTAIN_SHARE

Project Member Reported by treib@chromium.org, May 24 2018

Issue description

A new sync model type was added in https://crrev.com/c/1068528, and kAllocatorDumpNameWhitelist in memory_infra_background_whitelist.cc is missing an entry for it.
I haven't seen any active problems caused by this so far, but it's blocking some ongoing work (unrelated browser_tests start failing), and it seems likely that this will cause crashes similar to bug 818570.
 

Comment 1 by treib@chromium.org, May 24 2018

A CL that adds a new entry is already up at https://crrev.com/c/1070139. Going forward, we also need to find some way to avoid this happening whenever a new sync model type is added. Maybe we can have a whitelist pattern that covers all (current and future) model types, or if that's not feasible, at least a static_assert.
Project Member

Comment 2 by bugdroid1@chromium.org, May 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fd819de0a712442e0679ad982f5e31838ba9b0a9

commit fd819de0a712442e0679ad982f5e31838ba9b0a9
Author: Marc Treib <treib@chromium.org>
Date: Fri May 25 19:39:14 2018

MemoryInfra: Add missing sync model type MOUNTAIN_SHARE

This new model type was introduced in https://crrev.com/c/1068528, which
failed to add the new whitelist entry. Similar to https://crbug.com/818570.

Bug:  846252 
Change-Id: Ie11443d48f62cc034bf177ff0e7d35d06aa6c2c8
Reviewed-on: https://chromium-review.googlesource.com/1070139
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Reviewed-by: Siddhartha S <ssid@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561973}
[modify] https://crrev.com/fd819de0a712442e0679ad982f5e31838ba9b0a9/base/trace_event/memory_infra_background_whitelist.cc

Comment 3 by treib@chromium.org, May 28 2018

Cc: treib@chromium.org
Owner: ssid@chromium.org
So, we'd like to have something like
static_assert(41 == syncer::MODEL_TYPE_COUNT, "msg");
in memory_infra_background_whitelist.cc, but that won't work: The enum is defined in /components/sync, but the whitelist is in /base. :-/

ssid@, any other ideas?
You can add an assert somewhere else (even after the enum definition itself), just mention the file in the assert comment, the point is that something should fail automatically :)
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 1 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5686be59bc4889a0644fe61f913c4fb9fcc8055c

commit 5686be59bc4889a0644fe61f913c4fb9fcc8055c
Author: vitaliii <vitaliii@chromium.org>
Date: Fri Jun 01 08:11:47 2018

[Sync::Cleanup] Add more |static_assert|'s related to new types.

So that it is more difficult to forget to update something when adding a
new sync datatype.

Bug:  846252 
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I45a2bb0c39407291229d05c8509127761a993351
Reviewed-on: https://chromium-review.googlesource.com/1078767
Commit-Queue: vitaliii <vitaliii@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563562}
[modify] https://crrev.com/5686be59bc4889a0644fe61f913c4fb9fcc8055c/chrome/browser/sync/profile_sync_service_factory_unittest.cc
[modify] https://crrev.com/5686be59bc4889a0644fe61f913c4fb9fcc8055c/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/5686be59bc4889a0644fe61f913c4fb9fcc8055c/components/sync/base/model_type.h
[modify] https://crrev.com/5686be59bc4889a0644fe61f913c4fb9fcc8055c/components/sync/protocol/proto_value_conversions_unittest.cc
[modify] https://crrev.com/5686be59bc4889a0644fe61f913c4fb9fcc8055c/components/sync/syncable/model_type.cc
[modify] https://crrev.com/5686be59bc4889a0644fe61f913c4fb9fcc8055c/ios/chrome/browser/sync/profile_sync_service_factory_unittest.cc

Comment 7 by treib@chromium.org, Jun 4 2018

Cc: vitaliii@chromium.org
Owner: treib@chromium.org
Status: Fixed (was: Started)
Thanks vitaliii@! I think we can consider this done now.

Sign in to add a comment