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

Issue 917380 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Yesterday
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug
Flaky-Test: SingleClientWalletSecondaryAccountSyncTest.SwitchesFromAccountToProfileStorageOnSyncOptIn

Blocked on:
issue 852002

Blocking:
issue 917385



Sign in to add a comment

ThreadSanitizer complains about data race in sqlite (when multiple sqlite instances are used from multiple threads)

Project Member Reported by Findit, Dec 21

Issue description

Cc: mpear...@chromium.org
This is essentially the same race as in  issue 913702 :


[ RUN      ] SingleClientWalletSecondaryAccountSyncTest.SwitchesFromAccountToProfileStorageOnSyncOptIn
[14942:14942:1221/002633.776428:20661861584:WARNING:loopback_server.cc(719)] Loopback sync persistent state file does not exist.
Xlib:  extension "RANDR" missing on display ":99".
[14942:14942:1221/002635.519996:ERROR:browser_dm_token_storage_linux.cc(101)] Error: /etc/machine-id contains 0 characters (32 were expected).
==================
WARNING: ThreadSanitizer: data race (pid=14942)
  Write of size 4 at 0x55a8a3c59040 by thread T24 (mutexes: write M588417992796070160):
    #0 pcache1FetchStage2 third_party/sqlite/amalgamation/sqlite3.c (sync_integration_tests+0x8ea9f1e)
    #1 pcache1FetchNoMutex third_party/sqlite/amalgamation/sqlite3.c:49514:12 (sync_integration_tests+0x8ea8625)
    #2 pcache1Fetch third_party/sqlite/amalgamation/sqlite3.c:49556 (sync_integration_tests+0x8ea8625)
    #3 sqlite3PcacheFetch third_party/sqlite/amalgamation/sqlite3.c:48011:10 (sync_integration_tests+0x8d6012e)
    #4 getPageNormal third_party/sqlite/amalgamation/sqlite3.c:55899 (sync_integration_tests+0x8d6012e)
    #5 sqlite3PagerGet third_party/sqlite/amalgamation/sqlite3.c:56078:10 (sync_integration_tests+0x8d70e65)
    #6 btreeGetPage third_party/sqlite/amalgamation/sqlite3.c:65059 (sync_integration_tests+0x8d70e65)
    #7 btreeGetUnusedPage third_party/sqlite/amalgamation/sqlite3.c:65203 (sync_integration_tests+0x8d70e65)
    #8 allocateBtreePage third_party/sqlite/amalgamation/sqlite3.c:69099 (sync_integration_tests+0x8d70e65)
    #9 btreeCreateTable third_party/sqlite/amalgamation/sqlite3.c:71903:10 (sync_integration_tests+0x8d9aa8e)
    #10 sqlite3BtreeCreateTable third_party/sqlite/amalgamation/sqlite3.c:71922 (sync_integration_tests+0x8d9aa8e)
    #11 sqlite3VdbeExec third_party/sqlite/amalgamation/sqlite3.c:88755:8 (sync_integration_tests+0x8d89e07)
    #12 sqlite3Step third_party/sqlite/amalgamation/sqlite3.c:81415:10 (sync_integration_tests+0x8d3af88)
    #13 chrome_sqlite3_step third_party/sqlite/amalgamation/sqlite3.c:81478 (sync_integration_tests+0x8d3af88)
    #14 sql::Database::ExecuteAndReturnErrorCode(char const*) sql/database.cc:1304:18 (sync_integration_tests+0x8d20b86)
    #15 sql::Database::Execute(char const*) sql/database.cc:1341:15 (sync_integration_tests+0x8d1eb7e)
    #16 InitProfilesTable components/autofill/core/browser/webdata/autofill_table.cc:2884:15 (sync_integration_tests+0x9deb2e2)
    #17 autofill::AutofillTable::CreateTablesIfNecessary() components/autofill/core/browser/webdata/autofill_table.cc:408 (sync_integration_tests+0x9deb2e2)
    #18 WebDatabase::Init(base::FilePath const&) components/webdata/common/web_database.cc:136:22 (sync_integration_tests+0x99905bd)
    #19 WebDatabaseBackend::LoadDatabaseIfNecessary() components/webdata/common/web_database_backend.cc:110:23 (sync_integration_tests+0x9992d66)
    #20 WebDatabaseBackend::InitDatabase() components/webdata/common/web_database_backend.cc:38:3 (sync_integration_tests+0x9992aed)
    #21 Invoke<void (WebDatabaseBackend::*)(), scoped_refptr<WebDatabaseBackend>> base/bind_internal.h:516:12 (sync_integration_tests+0x9991f69)
    #22 MakeItSo<void (WebDatabaseBackend::*)(), scoped_refptr<WebDatabaseBackend> > base/bind_internal.h:616 (sync_integration_tests+0x9991f69)
    #23 RunImpl<void (WebDatabaseBackend::*)(), std::__1::tuple<scoped_refptr<WebDatabaseBackend> >, 0> base/bind_internal.h:689 (sync_integration_tests+0x9991f69)
    #24 base::internal::Invoker<base::internal::BindState<void (WebDatabaseBackend::*)(), scoped_refptr<WebDatabaseBackend> >, void ()>::RunOnce(base::internal::BindStateBase*) base/bind_internal.h:658 (sync_integration_tests+0x9991f69)
    #25 Run base/callback.h:99:12 (sync_integration_tests+0x6ca208f)
    #26 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:99 (sync_integration_tests+0x6ca208f)
    #27 base::internal::TaskTracker::RunBlockShutdown(base::internal::Task*) base/task/task_scheduler/task_tracker.cc:950:19 (sync_integration_tests+0x6d337dc)
    #28 RunTaskWithShutdownBehavior base/task/task_scheduler/task_tracker.cc:965:7 (sync_integration_tests+0x6d330d3)
    #29 base::internal::TaskTracker::RunOrSkipTask(base::internal::Task, base::internal::Sequence*, base::TaskTraits const&, bool) base/task/task_scheduler/task_tracker.cc:649 (sync_integration_tests+0x6d330d3)
    #30 base::internal::TaskTrackerPosix::RunOrSkipTask(base::internal::Task, base::internal::Sequence*, base::TaskTraits const&, bool) base/task/task_scheduler/task_tracker_posix.cc:24:16 (sync_integration_tests+0x6da093f)
    #31 base::internal::TaskTracker::RunAndPopNextTask(scoped_refptr<base::internal::Sequence>, base::internal::CanScheduleSequenceObserver*) base/task/task_scheduler/task_tracker.cc:505:3 (sync_integration_tests+0x6d324b3)
    #32 base::internal::SchedulerWorker::RunWorker() base/task/task_scheduler/scheduler_worker.cc:337:24 (sync_integration_tests+0x6d2d304)
    #33 base::internal::SchedulerWorker::RunSharedWorker() base/task/task_scheduler/scheduler_worker.cc:241:3 (sync_integration_tests+0x6d2cf71)
    #34 base::internal::SchedulerWorker::ThreadMain() base/task/task_scheduler/scheduler_worker.cc:211:7 (sync_integration_tests+0x6d2cdd9)
    #35 base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:81:13 (sync_integration_tests+0x6da14d4)

  Previous write of size 4 at 0x55a8a3c59040 by thread T25 (mutexes: write M588980942749496560):
    #0 pcache1FetchStage2 third_party/sqlite/amalgamation/sqlite3.c (sync_integration_tests+0x8ea9f1e)
    #1 pcache1FetchNoMutex third_party/sqlite/amalgamation/sqlite3.c:49514:12 (sync_integration_tests+0x8ea8625)
    #2 pcache1Fetch third_party/sqlite/amalgamation/sqlite3.c:49556 (sync_integration_tests+0x8ea8625)
    #3 sqlite3PcacheFetch third_party/sqlite/amalgamation/sqlite3.c:48011:10 (sync_integration_tests+0x8d6012e)
    #4 getPageNormal third_party/sqlite/amalgamation/sqlite3.c:55899 (sync_integration_tests+0x8d6012e)
    #5 sqlite3PagerGet third_party/sqlite/amalgamation/sqlite3.c:56078:10 (sync_integration_tests+0x8d70e65)
    #6 btreeGetPage third_party/sqlite/amalgamation/sqlite3.c:65059 (sync_integration_tests+0x8d70e65)
    #7 btreeGetUnusedPage third_party/sqlite/amalgamation/sqlite3.c:65203 (sync_integration_tests+0x8d70e65)
    #8 allocateBtreePage third_party/sqlite/amalgamation/sqlite3.c:69099 (sync_integration_tests+0x8d70e65)
    #9 btreeCreateTable third_party/sqlite/amalgamation/sqlite3.c:71825:10 (sync_integration_tests+0x8d9a95d)
    #10 sqlite3BtreeCreateTable third_party/sqlite/amalgamation/sqlite3.c:71922 (sync_integration_tests+0x8d9a95d)
    #11 sqlite3VdbeExec third_party/sqlite/amalgamation/sqlite3.c:88755:8 (sync_integration_tests+0x8d89e07)
    #12 sqlite3Step third_party/sqlite/amalgamation/sqlite3.c:81415:10 (sync_integration_tests+0x8d3af88)
    #13 chrome_sqlite3_step third_party/sqlite/amalgamation/sqlite3.c:81478 (sync_integration_tests+0x8d3af88)
    #14 sql::Database::ExecuteAndReturnErrorCode(char const*) sql/database.cc:1304:18 (sync_integration_tests+0x8d20b86)
    #15 sql::Database::Execute(char const*) sql/database.cc:1341:15 (sync_integration_tests+0x8d1eb7e)
    #16 history::URLDatabase::CreateKeywordSearchTermsIndices() components/history/core/browser/url_database.cc:441:16 (sync_integration_tests+0x9b1a279)
    #17 history::InMemoryDatabase::InitFromDisk(base::FilePath const&) components/history/core/browser/in_memory_database.cc:156:3 (sync_integration_tests+0x9af57b8)
    #18 history::InMemoryHistoryBackend::Init(base::FilePath const&) components/history/core/browser/in_memory_history_backend.cc:28:15 (sync_integration_tests+0x9af4c69)
    #19 history::HistoryBackend::InitImpl(history::HistoryDatabaseParams const&) components/history/core/browser/history_backend.cc:721:22 (sync_integration_tests+0x9acdcc5)
    #20 history::HistoryBackend::Init(bool, history::HistoryDatabaseParams const&) components/history/core/browser/history_backend.cc:242:5 (sync_integration_tests+0x9acd79d)
    #21 Invoke<void (history::HistoryBackend::*)(bool, const history::HistoryDatabaseParams &), scoped_refptr<history::HistoryBackend>, bool, history::HistoryDatabaseParams> base/bind_internal.h:516:12 (sync_integration_tests+0x9acc074)
    #22 MakeItSo<void (history::HistoryBackend::*)(bool, const history::HistoryDatabaseParams &), scoped_refptr<history::HistoryBackend>, bool, history::HistoryDatabaseParams> base/bind_internal.h:616 (sync_integration_tests+0x9acc074)
    #23 RunImpl<void (history::HistoryBackend::*)(bool, const history::HistoryDatabaseParams &), std::__1::tuple<scoped_refptr<history::HistoryBackend>, bool, history::HistoryDatabaseParams>, 0, 1, 2> base/bind_internal.h:689 (sync_integration_tests+0x9acc074)
    #24 base::internal::Invoker<base::internal::BindState<void (history::HistoryBackend::*)(bool, history::HistoryDatabaseParams const&), scoped_refptr<history::HistoryBackend>, bool, history::HistoryDatabaseParams>, void ()>::RunOnce(base::internal::BindStateBase*) base/bind_internal.h:658 (sync_integration_tests+0x9acc074)
    #25 Run base/callback.h:99:12 (sync_integration_tests+0x6ca208f)
    #26 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:99 (sync_integration_tests+0x6ca208f)
    #27 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::TimeTicks*) base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:244:21 (sync_integration_tests+0x6d17085)
    #28 DoWork base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:214:10 (sync_integration_tests+0x6d175ff)
    #29 non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() base/task/sequence_manager/thread_controller_with_message_pump_impl.cc (sync_integration_tests+0x6d175ff)
    #30 base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:39:31 (sync_integration_tests+0x6ca4429)
    #31 Run base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:342:12 (sync_integration_tests+0x6d17970)
    #32 non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool) base/task/sequence_manager/thread_controller_with_message_pump_impl.cc (sync_integration_tests+0x6d17970)
    #33 base::RunLoop::Run() base/run_loop.cc:102:14 (sync_integration_tests+0x6cd944a)
    #34 base::Thread::Run(base::RunLoop*) base/threading/thread.cc:250:13 (sync_integration_tests+0x6d45a59)
    #35 base::Thread::ThreadMain() base/threading/thread.cc:332:3 (sync_integration_tests+0x6d45d11)
    #36 base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:81:13 (sync_integration_tests+0x6da14d4)

  Location is global 'pcache1Create.dummyCurrentPage' of size 4 at 0x55a8a3c59040 (sync_integration_tests+0x00000f50b040)

  Mutex M588417992796070160 is already destroyed.

  Mutex M588980942749496560 is already destroyed.

  Thread T24 'TaskSchedulerSi' (tid=15048, running) created by main thread at:
    #0 pthread_create /b/swarming/w/ir/kitchen-workdir/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:980:3 (sync_integration_tests+0x3112685)
    #1 base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:120:13 (sync_integration_tests+0x6da0ee7)
    #2 base::PlatformThread::CreateWithPriority(unsigned long, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:238:10 (sync_integration_tests+0x6da0de5)
    #3 base::internal::SchedulerWorker::Start(base::SchedulerWorkerObserver*) base/task/task_scheduler/scheduler_worker.cc:79:3 (sync_integration_tests+0x6d2c92d)
    #4 CreateTaskRunnerWithTraitsImpl<base::internal::(anonymous namespace)::SchedulerWorkerDelegate> base/task/task_scheduler/scheduler_single_thread_task_runner_manager.cc:487:13 (sync_integration_tests+0x6d2ea1e)
    #5 base::internal::SchedulerSingleThreadTaskRunnerManager::CreateSingleThreadTaskRunnerWithTraits(base::TaskTraits const&, base::SingleThreadTaskRunnerThreadMode) base/task/task_scheduler/scheduler_single_thread_task_runner_manager.cc:420 (sync_integration_tests+0x6d2ea1e)
    #6 base::internal::TaskSchedulerImpl::CreateSingleThreadTaskRunnerWithTraits(base::TaskTraits const&, base::SingleThreadTaskRunnerThreadMode) base/task/task_scheduler/task_scheduler_impl.cc:245:8 (sync_integration_tests+0x6d1ea6d)
    #7 base::CreateSingleThreadTaskRunnerWithTraits(base::TaskTraits const&, base::SingleThreadTaskRunnerThreadMode) base/task/post_task.cc:116:9 (sync_integration_tests+0x6cfe865)
    #8 WebDataServiceWrapper::WebDataServiceWrapper(base::FilePath const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, scoped_refptr<base::SingleThreadTaskRunner> const&, base::RepeatingCallback<void (syncer::ModelType)> const&, base::RepeatingCallback<void (WebDataServiceWrapper::ErrorType, sql::InitStatus, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)> const&) components/webdata_services/web_data_service_wrapper.cc:136:25 (sync_integration_tests+0xb2d0986)
    #9 WebDataServiceFactory::BuildServiceInstanceFor(content::BrowserContext*) const chrome/browser/web_data_service_factory.cc:178:14 (sync_integration_tests+0x74ddfa3)
    #10 BrowserContextKeyedServiceFactory::BuildServiceInstanceFor(base::SupportsUserData*) const components/keyed_service/content/browser_context_keyed_service_factory.cc:105:7 (sync_integration_tests+0xa0ee37f)
    #11 KeyedServiceFactory::GetServiceForContext(base::SupportsUserData*, bool) components/keyed_service/core/keyed_service_factory.cc:89:15 (sync_integration_tests+0x8a9fefe)
    #12 BrowserContextKeyedServiceFactory::GetServiceForBrowserContext(content::BrowserContext*, bool) components/keyed_service/content/browser_context_keyed_service_factory.cc:58:31 (sync_integration_tests+0xa0ee239)
    #13 WebDataServiceFactory::GetForProfile(Profile*, ServiceAccessType) chrome/browser/web_data_service_factory.cc:89:22 (sync_integration_tests+0x74ddbd4)
    #14 WebDataServiceFactory::GetTokenWebDataForProfile(Profile*, ServiceAccessType) chrome/browser/web_data_service_factory.cc:146:7 (sync_integration_tests+0x74ddded)
    #15 CreateMutableProfileOAuthDelegate chrome/browser/signin/profile_oauth2_token_service_factory.cc:104:7 (sync_integration_tests+0x74696b6)
    #16 CreateOAuth2TokenServiceDelegate chrome/browser/signin/profile_oauth2_token_service_factory.cc:129 (sync_integration_tests+0x74696b6)
    #17 ProfileOAuth2TokenServiceFactory::BuildServiceInstanceFor(content::BrowserContext*) const chrome/browser/signin/profile_oauth2_token_service_factory.cc:186 (sync_integration_tests+0x74696b6)
    #18 BrowserContextKeyedServiceFactory::BuildServiceInstanceFor(base::SupportsUserData*) const components/keyed_service/content/browser_context_keyed_service_factory.cc:105:7 (sync_integration_tests+0xa0ee37f)
    #19 KeyedServiceFactory::GetServiceForContext(base::SupportsUserData*, bool) components/keyed_service/core/keyed_service_factory.cc:89:15 (sync_integration_tests+0x8a9fefe)
    #20 BrowserContextKeyedServiceFactory::GetServiceForBrowserContext(content::BrowserContext*, bool) components/keyed_service/content/browser_context_keyed_service_factory.cc:58:31 (sync_integration_tests+0xa0ee239)
    #21 ProfileOAuth2TokenServiceFactory::GetForProfile(Profile*) chrome/browser/signin/profile_oauth2_token_service_factory.cc:155:22 (sync_integration_tests+0x74694cd)
    #22 SigninManagerFactory::BuildServiceInstanceFor(content::BrowserContext*) const chrome/browser/signin/signin_manager_factory.cc:123:15 (sync_integration_tests+0x746a6a5)
    #23 BrowserContextKeyedServiceFactory::BuildServiceInstanceFor(base::SupportsUserData*) const components/keyed_service/content/browser_context_keyed_service_factory.cc:105:7 (sync_integration_tests+0xa0ee37f)
    #24 KeyedServiceFactory::GetServiceForContext(base::SupportsUserData*, bool) components/keyed_service/core/keyed_service_factory.cc:89:15 (sync_integration_tests+0x8a9fefe)
    #25 BrowserContextKeyedServiceFactory::GetServiceForBrowserContext(content::BrowserContext*, bool) components/keyed_service/content/browser_context_keyed_service_factory.cc:58:31 (sync_integration_tests+0xa0ee239)
    #26 SigninManagerFactory::GetForProfile(Profile*) chrome/browser/signin/signin_manager_factory.cc:63:22 (sync_integration_tests+0x746a02d)
    #27 IdentityManagerWrapper::IdentityManagerWrapper(Profile*) chrome/browser/signin/identity_manager_factory.cc:52:13 (sync_integration_tests+0x74685b8)
    #28 IdentityManagerFactory::BuildServiceInstanceFor(content::BrowserContext*) const chrome/browser/signin/identity_manager_factory.cc:93:14 (sync_integration_tests+0x7468572)
    #29 BrowserContextKeyedServiceFactory::BuildServiceInstanceFor(base::SupportsUserData*) const components/keyed_service/content/browser_context_keyed_service_factory.cc:105:7 (sync_integration_tests+0xa0ee37f)
    #30 KeyedServiceFactory::GetServiceForContext(base::SupportsUserData*, bool) components/keyed_service/core/keyed_service_factory.cc:89:15 (sync_integration_tests+0x8a9fefe)
    #31 BrowserContextKeyedServiceFactory::GetServiceForBrowserContext(content::BrowserContext*, bool) components/keyed_service/content/browser_context_keyed_service_factory.cc:58:31 (sync_integration_tests+0xa0ee239)
    #32 IdentityManagerFactory::GetForProfile(Profile*) chrome/browser/signin/identity_manager_factory.cc:75:22 (sync_integration_tests+0x74683b6)
    #33 RendererUpdater::RendererUpdater(Profile*) chrome/browser/profiles/renderer_updater.cc:57:23 (sync_integration_tests+0x7431d74)
    #34 RendererUpdaterFactory::BuildServiceInstanceFor(content::BrowserContext*) const chrome/browser/profiles/renderer_updater_factory.cc:34:14 (sync_integration_tests+0x74341ca)
    #35 BrowserContextKeyedServiceFactory::BuildServiceInstanceFor(base::SupportsUserData*) const components/keyed_service/content/browser_context_keyed_service_factory.cc:105:7 (sync_integration_tests+0xa0ee37f)
    #36 KeyedServiceFactory::GetServiceForContext(base::SupportsUserData*, bool) components/keyed_service/core/keyed_service_factory.cc:89:15 (sync_integration_tests+0x8a9fefe)
    #37 KeyedServiceFactory::CreateServiceNow(base::SupportsUserData*) components/keyed_service/core/keyed_service_factory.cc:137:3 (sync_integration_tests+0x8aa0825)
    #38 DependencyManager::CreateContextServices(base::SupportsUserData*, bool) components/keyed_service/core/dependency_manager.cc:72:16 (sync_integration_tests+0x8a9c708)
    #39 BrowserContextDependencyManager::DoCreateBrowserContextServices(content::BrowserContext*, bool) components/keyed_service/content/browser_context_dependency_manager.cc:47:22 (sync_integration_tests+0xa0ed5bd)
    #40 BrowserContextDependencyManager::CreateBrowserContextServices(content::BrowserContext*) components/keyed_service/content/browser_context_dependency_manager.cc:32:3 (sync_integration_tests+0xa0ed4c2)
    #41 ProfileImpl::OnLocaleReady() chrome/browser/profiles/profile_impl.cc:914:11 (sync_integration_tests+0x74032a1)
    #42 ProfileImpl::OnPrefsLoaded(Profile::CreateMode, bool) chrome/browser/profiles/profile_impl.cc:948:3 (sync_integration_tests+0x7400210)
    #43 ProfileImpl::ProfileImpl(base::FilePath const&, Profile::Delegate*, Profile::CreateMode, scoped_refptr<base::SequencedTaskRunner>) chrome/browser/profiles/profile_impl.cc:576:5 (sync_integration_tests+0x73fffbd)
    #44 Profile::CreateProfile(base::FilePath const&, Profile::Delegate*, Profile::CreateMode) chrome/browser/profiles/profile_impl.cc:354:11 (sync_integration_tests+0x73fdf75)
    #45 ProfileManager::CreateProfileHelper(base::FilePath const&) chrome/browser/profiles/profile_manager.cc:1403:10 (sync_integration_tests+0x742bf51)
    #46 ProfileManager::CreateAndInitializeProfile(base::FilePath const&) chrome/browser/profiles/profile_manager.cc:1480:22 (sync_integration_tests+0x7424afe)
    #47 ProfileManager::GetProfile(base::FilePath const&) chrome/browser/profiles/profile_manager.cc:523:10 (sync_integration_tests+0x7424879)
    #48 GetStartupProfile(base::FilePath const&, base::CommandLine const&) chrome/browser/ui/startup/startup_browser_creator.cc:994:39 (sync_integration_tests+0xac910c2)
    #49 CreatePrimaryProfile chrome/browser/chrome_browser_main.cc:411:13 (sync_integration_tests+0x71dcbb7)
    #50 ChromeBrowserMainParts::PreMainMessageLoopRunImpl() chrome/browser/chrome_browser_main.cc:1497 (sync_integration_tests+0x71dcbb7)
    #51 ChromeBrowserMainParts::PreMainMessageLoopRun() chrome/browser/chrome_browser_main.cc:1175:18 (sync_integration_tests+0x71dc060)
    #52 content::BrowserMainLoop::PreMainMessageLoopRun() content/browser/browser_main_loop.cc:983:13 (sync_integration_tests+0x47131f5)
    #53 Invoke<int (content::BrowserMainLoop::*)(), content::BrowserMainLoop *> base/bind_internal.h:516:12 (sync_integration_tests+0x4715bf8)
    #54 MakeItSo<int (content::BrowserMainLoop::*const &)(), content::BrowserMainLoop *> base/bind_internal.h:616 (sync_integration_tests+0x4715bf8)
    #55 RunImpl<int (content::BrowserMainLoop::*const &)(), const std::__1::tuple<base::internal::UnretainedWrapper<content::BrowserMainLoop> > &, 0> base/bind_internal.h:689 (sync_integration_tests+0x4715bf8)
    #56 base::internal::Invoker<base::internal::BindState<int (content::BrowserMainLoop::*)(), base::internal::UnretainedWrapper<content::BrowserMainLoop> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:671 (sync_integration_tests+0x4715bf8)
    #57 Run base/callback.h:129:12 (sync_integration_tests+0x4d78d0e)
    #58 content::StartupTaskRunner::RunAllTasksNow() content/browser/startup_task_runner.cc:41 (sync_integration_tests+0x4d78d0e)
    #59 content::BrowserMainLoop::CreateStartupTasks() content/browser/browser_main_loop.cc:917:25 (sync_integration_tests+0x47119a1)
    #60 content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) content/browser/browser_main_runner_impl.cc:144:15 (sync_integration_tests+0x4716412)
    #61 content::BrowserMain(content::MainFunctionParams const&) content/browser/browser_main.cc:43:32 (sync_integration_tests+0x470f22b)
    #62 RunBrowserProcessMain content/app/content_main_runner_impl.cc:545:10 (sync_integration_tests+0x667555f)
    #63 content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&, bool) content/app/content_main_runner_impl.cc:954 (sync_integration_tests+0x667555f)
    #64 content::ContentMainRunnerImpl::Run(bool) content/app/content_main_runner_impl.cc:868:12 (sync_integration_tests+0x6674f98)
    #65 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() content/app/content_service_manager_main_delegate.cc:53:32 (sync_integration_tests+0x6671a5f)
    #66 service_manager::Main(service_manager::MainParams const&) services/service_manager/embedder/main.cc:460:29 (sync_integration_tests+0x97b41c1)
    #67 content::ContentMain(content::ContentMainParams const&) content/app/content_main.cc:19:10 (sync_integration_tests+0x6672ceb)
    #68 content::BrowserTestBase::SetUp() content/public/test/browser_test_base.cc:349:3 (sync_integration_tests+0xe233731)
    #69 InProcessBrowserTest::SetUp() chrome/test/base/in_process_browser_test.cc:284:20 (sync_integration_tests+0x6a8cc3d)
    #70 SyncTest::SetUp() chrome/browser/sync/test/integration/sync_test.cc:274:25 (sync_integration_tests+0x6a71e04)
    #71 HandleExceptionsInMethodIfSupported<testing::Test, void> third_party/googletest/src/googletest/src/gtest.cc (sync_integration_tests+0x34fa482)
    #72 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc:2517 (sync_integration_tests+0x34fa482)
    #73 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2703:11 (sync_integration_tests+0x34fb728)
    #74 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2825:28 (sync_integration_tests+0x34fc066)
    #75 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5227:43 (sync_integration_tests+0x350cae6)
    #76 HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> third_party/googletest/src/googletest/src/gtest.cc (sync_integration_tests+0x350c3b7)
    #77 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc:4835 (sync_integration_tests+0x350c3b7)
    #78 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2369:46 (sync_integration_tests+0x6c55152)
    #79 base::TestSuite::Run() base/test/test_suite.cc:294 (sync_integration_tests+0x6c55152)
    #80 ChromeTestSuiteRunner::RunTestSuite(int, char**) chrome/test/base/chrome_test_launcher.cc:71:21 (sync_integration_tests+0x6a8ba40)
    #81 ChromeTestLauncherDelegate::RunTestSuite(int, char**) chrome/test/base/chrome_test_launcher.cc:80:19 (sync_integration_tests+0x6a8bb4f)
    #82 content::LaunchTests(content::TestLauncherDelegate*, unsigned long, int, char**) content/public/test/test_launcher.cc:647:31 (sync_integration_tests+0xe23b3a4)
    #83 LaunchChromeTests(unsigned long, content::TestLauncherDelegate*, int, char**) chrome/test/base/chrome_test_launcher.cc:184:10 (sync_integration_tests+0x6a8c0d2)
    #84 main chrome/test/base/browser_tests_main.cc:36:10 (sync_integration_tests+0x6a3b32c)

  Thread T25 'Chrome_HistoryThread' (tid=15049, running) created by main thread at:
    #0 pthread_create /b/swarming/w/ir/kitchen-workdir/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:980:3 (sync_integration_tests+0x3112685)
    #1 base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:120:13 (sync_integration_tests+0x6da0ee7)
    #2 base::PlatformThread::CreateWithPriority(unsigned long, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:238:10 (sync_integration_tests+0x6da0de5)
    #3 base::Thread::StartWithOptions(base::Thread::Options const&) base/threading/thread.cc:112:15 (sync_integration_tests+0x6d4557d)
    #4 history::HistoryService::Init(bool, history::HistoryDatabaseParams const&) components/history/core/browser/history_service.cc:943:21 (sync_integration_tests+0x9ac0ff9)
    #5 Init components/history/core/browser/history_service.h:101:12 (sync_integration_tests+0x726f022)
    #6 HistoryServiceFactory::BuildServiceInstanceFor(content::BrowserContext*) const chrome/browser/history/history_service_factory.cc:85 (sync_integration_tests+0x726f022)
    #7 BrowserContextKeyedServiceFactory::BuildServiceInstanceFor(base::SupportsUserData*) const components/keyed_service/content/browser_context_keyed_service_factory.cc:105:7 (sync_integration_tests+0xa0ee37f)
    #8 KeyedServiceFactory::GetServiceForContext(base::SupportsUserData*, bool) components/keyed_service/core/keyed_service_factory.cc:89:15 (sync_integration_tests+0x8a9fefe)
    #9 BrowserContextKeyedServiceFactory::GetServiceForBrowserContext(content::BrowserContext*, bool) components/keyed_service/content/browser_context_keyed_service_factory.cc:58:31 (sync_integration_tests+0xa0ee239)
    #10 HistoryServiceFactory::GetForProfile(Profile*, ServiceAccessType) chrome/browser/history/history_service_factory.cc:33:22 (sync_integration_tests+0x726ec01)
    #11 BrowsingDataHistoryObserverService chrome/browser/browsing_data/browsing_data_history_observer_service.cc:22:27 (sync_integration_tests+0x73ddf9d)
    #12 BrowsingDataHistoryObserverService::Factory::BuildServiceInstanceFor(content::BrowserContext*) const chrome/browser/browsing_data/browsing_data_history_observer_service.cc:60 (sync_integration_tests+0x73ddf9d)
    #13 BrowserContextKeyedServiceFactory::BuildServiceInstanceFor(base::SupportsUserData*) const components/keyed_service/content/browser_context_keyed_service_factory.cc:105:7 (sync_integration_tests+0xa0ee37f)
    #14 KeyedServiceFactory::GetServiceForContext(base::SupportsUserData*, bool) components/keyed_service/core/keyed_service_factory.cc:89:15 (sync_integration_tests+0x8a9fefe)
    #15 KeyedServiceFactory::CreateServiceNow(base::SupportsUserData*) components/keyed_service/core/keyed_service_factory.cc:137:3 (sync_integration_tests+0x8aa0825)
    #16 DependencyManager::CreateContextServices(base::SupportsUserData*, bool) components/keyed_service/core/dependency_manager.cc:72:16 (sync_integration_tests+0x8a9c708)
    #17 BrowserContextDependencyManager::DoCreateBrowserContextServices(content::BrowserContext*, bool) components/keyed_service/content/browser_context_dependency_manager.cc:47:22 (sync_integration_tests+0xa0ed5bd)
    #18 BrowserContextDependencyManager::CreateBrowserContextServices(content::BrowserContext*) components/keyed_service/content/browser_context_dependency_manager.cc:32:3 (sync_integration_tests+0xa0ed4c2)
    #19 ProfileImpl::OnLocaleReady() chrome/browser/profiles/profile_impl.cc:914:11 (sync_integration_tests+0x74032a1)
    #20 ProfileImpl::OnPrefsLoaded(Profile::CreateMode, bool) chrome/browser/profiles/profile_impl.cc:948:3 (sync_integration_tests+0x7400210)
    #21 ProfileImpl::ProfileImpl(base::FilePath const&, Profile::Delegate*, Profile::CreateMode, scoped_refptr<base::SequencedTaskRunner>) chrome/browser/profiles/profile_impl.cc:576:5 (sync_integration_tests+0x73fffbd)
    #22 Profile::CreateProfile(base::FilePath const&, Profile::Delegate*, Profile::CreateMode) chrome/browser/profiles/profile_impl.cc:354:11 (sync_integration_tests+0x73fdf75)
    #23 ProfileManager::CreateProfileHelper(base::FilePath const&) chrome/browser/profiles/profile_manager.cc:1403:10 (sync_integration_tests+0x742bf51)
    #24 ProfileManager::CreateAndInitializeProfile(base::FilePath const&) chrome/browser/profiles/profile_manager.cc:1480:22 (sync_integration_tests+0x7424afe)
    #25 ProfileManager::GetProfile(base::FilePath const&) chrome/browser/profiles/profile_manager.cc:523:10 (sync_integration_tests+0x7424879)
    #26 GetStartupProfile(base::FilePath const&, base::CommandLine const&) chrome/browser/ui/startup/startup_browser_creator.cc:994:39 (sync_integration_tests+0xac910c2)
    #27 CreatePrimaryProfile chrome/browser/chrome_browser_main.cc:411:13 (sync_integration_tests+0x71dcbb7)
    #28 ChromeBrowserMainParts::PreMainMessageLoopRunImpl() chrome/browser/chrome_browser_main.cc:1497 (sync_integration_tests+0x71dcbb7)
    #29 ChromeBrowserMainParts::PreMainMessageLoopRun() chrome/browser/chrome_browser_main.cc:1175:18 (sync_integration_tests+0x71dc060)
    #30 content::BrowserMainLoop::PreMainMessageLoopRun() content/browser/browser_main_loop.cc:983:13 (sync_integration_tests+0x47131f5)
    #31 Invoke<int (content::BrowserMainLoop::*)(), content::BrowserMainLoop *> base/bind_internal.h:516:12 (sync_integration_tests+0x4715bf8)
    #32 MakeItSo<int (content::BrowserMainLoop::*const &)(), content::BrowserMainLoop *> base/bind_internal.h:616 (sync_integration_tests+0x4715bf8)
    #33 RunImpl<int (content::BrowserMainLoop::*const &)(), const std::__1::tuple<base::internal::UnretainedWrapper<content::BrowserMainLoop> > &, 0> base/bind_internal.h:689 (sync_integration_tests+0x4715bf8)
    #34 base::internal::Invoker<base::internal::BindState<int (content::BrowserMainLoop::*)(), base::internal::UnretainedWrapper<content::BrowserMainLoop> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:671 (sync_integration_tests+0x4715bf8)
    #35 Run base/callback.h:129:12 (sync_integration_tests+0x4d78d0e)
    #36 content::StartupTaskRunner::RunAllTasksNow() content/browser/startup_task_runner.cc:41 (sync_integration_tests+0x4d78d0e)
    #37 content::BrowserMainLoop::CreateStartupTasks() content/browser/browser_main_loop.cc:917:25 (sync_integration_tests+0x47119a1)
    #38 content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) content/browser/browser_main_runner_impl.cc:144:15 (sync_integration_tests+0x4716412)
    #39 content::BrowserMain(content::MainFunctionParams const&) content/browser/browser_main.cc:43:32 (sync_integration_tests+0x470f22b)
    #40 RunBrowserProcessMain content/app/content_main_runner_impl.cc:545:10 (sync_integration_tests+0x667555f)
    #41 content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&, bool) content/app/content_main_runner_impl.cc:954 (sync_integration_tests+0x667555f)
    #42 content::ContentMainRunnerImpl::Run(bool) content/app/content_main_runner_impl.cc:868:12 (sync_integration_tests+0x6674f98)
    #43 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() content/app/content_service_manager_main_delegate.cc:53:32 (sync_integration_tests+0x6671a5f)
    #44 service_manager::Main(service_manager::MainParams const&) services/service_manager/embedder/main.cc:460:29 (sync_integration_tests+0x97b41c1)
    #45 content::ContentMain(content::ContentMainParams const&) content/app/content_main.cc:19:10 (sync_integration_tests+0x6672ceb)
    #46 content::BrowserTestBase::SetUp() content/public/test/browser_test_base.cc:349:3 (sync_integration_tests+0xe233731)
    #47 InProcessBrowserTest::SetUp() chrome/test/base/in_process_browser_test.cc:284:20 (sync_integration_tests+0x6a8cc3d)
    #48 SyncTest::SetUp() chrome/browser/sync/test/integration/sync_test.cc:274:25 (sync_integration_tests+0x6a71e04)
    #49 HandleExceptionsInMethodIfSupported<testing::Test, void> third_party/googletest/src/googletest/src/gtest.cc (sync_integration_tests+0x34fa482)
    #50 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc:2517 (sync_integration_tests+0x34fa482)
    #51 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2703:11 (sync_integration_tests+0x34fb728)
    #52 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2825:28 (sync_integration_tests+0x34fc066)
    #53 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5227:43 (sync_integration_tests+0x350cae6)
    #54 HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> third_party/googletest/src/googletest/src/gtest.cc (sync_integration_tests+0x350c3b7)
    #55 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc:4835 (sync_integration_tests+0x350c3b7)
    #56 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2369:46 (sync_integration_tests+0x6c55152)
    #57 base::TestSuite::Run() base/test/test_suite.cc:294 (sync_integration_tests+0x6c55152)
    #58 ChromeTestSuiteRunner::RunTestSuite(int, char**) chrome/test/base/chrome_test_launcher.cc:71:21 (sync_integration_tests+0x6a8ba40)
    #59 ChromeTestLauncherDelegate::RunTestSuite(int, char**) chrome/test/base/chrome_test_launcher.cc:80:19 (sync_integration_tests+0x6a8bb4f)
    #60 content::LaunchTests(content::TestLauncherDelegate*, unsigned long, int, char**) content/public/test/test_launcher.cc:647:31 (sync_integration_tests+0xe23b3a4)
    #61 LaunchChromeTests(unsigned long, content::TestLauncherDelegate*, int, char**) chrome/test/base/chrome_test_launcher.cc:184:10 (sync_integration_tests+0x6a8c0d2)
    #62 main chrome/test/base/browser_tests_main.cc:36:10 (sync_integration_tests+0x6a3b32c)

SUMMARY: ThreadSanitizer: data race third_party/sqlite/amalgamation/sqlite3.c in pcache1FetchStage2




I think we're convinced by now that tsan is just finding a previously-existing race, and that accessing the history db from multiple threads just doesn't work.


If it's just that one test we should disable it under tsan for now, and then find someone to clean up history db thread thingies.
Cc: sdefresne@chromium.org
In this case, the other access thread is created by web_data_service_factory.cc, last touched by sdefresne.
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 21

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

commit d1a5a05418eaa78a74edfdfdeb4e0ed7e297400f
Author: Nico Weber <thakis@chromium.org>
Date: Fri Dec 21 16:06:12 2018

Disable three tests that tsan reports as racy after latest clang roll.

TBR=hans

Bug:  917385 , 917380 
Change-Id: I74f860c62a448d84813a869c4080758bb1b7111a
Reviewed-on: https://chromium-review.googlesource.com/c/1388549
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618543}
[modify] https://crrev.com/d1a5a05418eaa78a74edfdfdeb4e0ed7e297400f/chrome/browser/sync/test/integration/single_client_wallet_sync_test.cc
[modify] https://crrev.com/d1a5a05418eaa78a74edfdfdeb4e0ed7e297400f/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc

Cc: -mpear...@chromium.org
Removing me; this is not my area.  Please re-add me you think I can add something.  (My expertise mostly in omnibox and metrics.)
Another instance reported for SingleClientWalletSecondaryAccountSyncTest.SwitchesFromAccountToProfileStorageOnSyncOptInWithAdvancedSetup in TSan build 31683
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20TSan%20Tests/31683

I am going to disable this one under TSan as well.


Cc: mastiz@chromium.org jkrcal@chromium.org
Components: Services>Sync
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 27

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

commit 90444d510c6aa0070abbdf2b8a19a977525b897e
Author: Dominik Röttsches <drott@chromium.org>
Date: Thu Dec 27 11:26:11 2018

Disable racy sync test under TSan

Disable SwitchesFromAccountToProfileStorageOnSyncOptInWithAdvancedSetup
as well, since it shows similar raciness as the previously disabled
tests.

Bug:  917385 ,  917380 
Change-Id: I465059c95862fb867745a99343b7b89834f363f7
Tbr: hans, mastiz, jkrcal
Reviewed-on: https://chromium-review.googlesource.com/c/1391366
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619026}
[modify] https://crrev.com/90444d510c6aa0070abbdf2b8a19a977525b897e/chrome/browser/sync/test/integration/single_client_wallet_sync_test.cc

Labels: -Sheriff-Chromium
Given that c#7 disables the flaky test, let me remove this from the sheriff queue.
Blockedon: 852002
Labels: Stability-ThreadSanitizer
Owner: ----
Over to the sync team's triage queue then.
Cc: treib@chromium.org feuunk@chromium.org
thakis@, thanks for dealing with the flakiness and disabling the tests.

I have difficulties parsing the stack trace. I see threads T24 and T25 writing stuff to SQLite. They *should* each write to a different SQLite instance (History vs WebDB). 

I see both of them starting with "Write of size 4 at 0x55a8a3c59040." What does this address refer to?


(cc'ing treib@ and feuunk@ who might also be remotely related with this bug by a recent refactoring in WebDataServiceWrapper)
For the address, see the later line:

  Location is global 'pcache1Create.dummyCurrentPage' of size 4 at 0x55a8a3c59040 (sync_integration_tests+0x00000f50b040)

To me, it seems like an (innocent) bug in sqlite itself.

If a non-purgeable page cache gets created, it has the bPurgeable flag set to 0 and the pnPurgeable pointer to a counter set to a dummy static variable &dummyCurrentPage:
https://cs.chromium.org/chromium/src/third_party/sqlite/src/src/pcache1.c?l=784

When a new page gets allocated in pcache1AllocPage() called from pcache1FetchStage2(), the counter gets incremented even if bPurgeable == 0:
https://cs.chromium.org/chromium/src/third_party/sqlite/src/src/pcache1.c?l=449

This can only happen if the pCache has a different pGroup in each of the threads so that different group-specific mutexes are used in each of the threads. (This assumption seems plausible for different sqlite DBs based on comments in https://cs.chromium.org/chromium/src/third_party/sqlite/src/src/pcache1.c?l=689 and https://cs.chromium.org/chromium/src/sql/database.cc?l=961)

thakis@, does this sound correct to you?
Let me put on my concurrency hat and remind you there's no such thing as "innocent" data race (there's a wonderful article, "How to miscompile programs with “benign” data races", exactly on this matter). This is still UB from the C++ point of view, so we'd better fix such bugs unless we have strong reasons not to.

In this particular case I don't see the value of dummyCurrentPage being used anywhere, so the question is whether we need it at all.
Labels: Sync-Triaged
An interesting read, thanks for the pointer!
(I still think that this particular data race is innocent because the value is *never read* but the article made me less sure about that ;)

dummyCurrentPage is accessed via pnPurgeable. 

If I am right, it is only written to (at https://cs.chromium.org/chromium/src/third_party/sqlite/src/src/pcache1.c?l=449 and at https://cs.chromium.org/chromium/src/third_party/sqlite/src/src/pcache1.c?l=470) and never read. So we need to get rid of the writes if !bPurgeable.

glider@, thakis@, do you happen to have any contact on the SQLite project?
I followed the standard process and reported the bug to the sqlite-users mailing list (https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/). Let's see what happens.
Blocking: 917385
Owner: jkrcal@chromium.org
Status: Assigned (was: Untriaged)
Cc: pwnall@chromium.org
Summary: ThreadSanitizer complains about data race in sqlite (when multiple sqlite instances are used from multiple threads) (was: SingleClientWalletSecondaryAccountSyncTest.SwitchesFromAccountToProfileStorageOnSyncOptIn is flaky)
This should be fixed on sqlite trunk by https://www.sqlite.org/src/info/383437be276719ac.

pwnall@, do you think you could back-port that CL into sqlite in chromium?
(if you cannot make it, please let me know so that it does not wait unresolved for too long; it is causing quite some TSan flakiness)
Yes, I am backporting this.
Project Member

Comment 21 by bugdroid1@chromium.org, Jan 11

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

commit a1f5e2dfdc3427684524904abd49c98a0fa05b88
Author: Marc Treib <treib@chromium.org>
Date: Fri Jan 11 11:06:57 2019

Disable SingleClientWalletSyncTest.SwitchesBetweenAccountAndProfile... on TSan

It's flaky due to an SQLite data race.

Bug:  920738 ,  917380 
Change-Id: I3ed269d487daa25ebd973bda8b1689ebd22977ec
Reviewed-on: https://chromium-review.googlesource.com/c/1406708
Commit-Queue: Marc Treib <treib@chromium.org>
Commit-Queue: Jan Krcal <jkrcal@chromium.org>
Reviewed-by: Jan Krcal <jkrcal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621968}
[modify] https://crrev.com/a1f5e2dfdc3427684524904abd49c98a0fa05b88/chrome/browser/sync/test/integration/single_client_wallet_sync_test.cc

Cc: mamir@chromium.org estaab@chromium.org
 Issue 919945  has been merged into this issue.
Blocking: -917385
Blocking: 917385
Cc: h...@chromium.org
 Issue 917385  has been merged into this issue.
The SQLite patch is included in https://crrev.com/c/1406928 which is currently going through CQ.
Project Member

Comment 26 by bugdroid1@chromium.org, Jan 11

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

commit c61e3e2f00de49b85c2bd76c252d2a9fd13ed643
Author: Victor Costan <pwnall@chromium.org>
Date: Fri Jan 11 23:20:45 2019

sqlite: Backport a few bug fixes.

This CL removes an unnecessary change in
0006-Fix-dbfuzz2-for-Clusterfuzz.patch and backports fixes for a few
recently discovered issues. The added patches will go away in the
next SQLite upgrade.

Bug: 911253, 911255, 914407,  915348 ,  915479 ,  916478 ,  917285 ,  917380 ,  917834 ,  918035 
Change-Id: I595de36637cdb256153d92f21958b05e2ea6ac92
Reviewed-on: https://chromium-review.googlesource.com/c/1406928
Reviewed-by: Chris Mumford <cmumford@google.com>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622207}
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/amalgamation/sqlite3.c
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0001-Modify-default-VFS-to-support-WebDatabase.patch
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0002-Virtual-table-supporting-recovery-of-corrupted-datab.patch
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0003-Custom-shell.c-helpers-to-load-Chromium-s-ICU-data.patch
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0004-fts3-Disable-fts3_tokenizer-and-fts4.patch
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0005-fuchsia-Use-dot-file-locking-for-sqlite.patch
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0006-Fix-dbfuzz2-for-Clusterfuzz.patch
[add] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0007-Fix-the-Makefile-so-that-it-honors-CFLAGS-when-build.patch
[add] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0008-Adjustments-to-the-page-cache-to-try-to-avoid-harmle.patch
[add] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0009-Remove-an-ALWAYS-from-a-branch-that-is-not-always-ta.patch
[add] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0010-Fix-a-problem-with-nested-CTEs-with-the-same-table.patch
[add] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0011-Fix-detection-of-self-referencing-rows-in-foreign-ke.patch
[add] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0012-Fix-a-segfault-caused-by-using-the-RAISE-function-in.patch
[add] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0013-Fix-for-an-assert-that-could-be-false.patch
[add] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0014-Fix-another-problem-found-by-Matthew-Denton-s-new-fu.patch
[add] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0015-Report-a-new-corruption-case.patch
[add] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0016-Avoid-a-buffer-overread-in-ptrmapPutOvflPtr.patch
[add] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/patches/0017-Improved-detection-of-cell-corruption-in-sqlite3Vdbe.patch
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/src/Makefile.in
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/src/src/btree.c
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/src/src/expr.c
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/src/src/fkey.c
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/src/src/pcache1.c
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/src/src/select.c
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/src/src/vdbeaux.c
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/src/test/dbfuzz2.c
[modify] https://crrev.com/c61e3e2f00de49b85c2bd76c252d2a9fd13ed643/third_party/sqlite/src/test/fuzzcheck.c

jrkcal@: Backporting done. Please check for flakiness and re-enable the disabled test(s) if it makes sense to do so.
 Issue 917572  has been merged into this issue.
pwnall@, thanks a million! I've briefly checked and haven't seen the sqlite issue happen again.

Since another cause of TSan flakiness in sync_integration_tests ( Issue 915219 ) has been fixed only an hour ago, I'll wait some time to see TSan is happy. 
Then I re-enable all the disabled tests.
Labels: Merge-Merged-72-3626
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8

Commit: e6d709904788b93ca8f88bbf67ad0a7af26e5bb8
Author: staphany@chromium.org
Commiter: pwnall@chromium.org
Date: 2019-01-15 22:21:13 +0000 UTC

sqlite: Backport a few bug fixes.

This CL removes an unnecessary change in
0006-Fix-dbfuzz2-for-Clusterfuzz.patch and backports fixes for a few
recently discovered issues. The added patches will go away in the
next SQLite upgrade.

(cherry picked from commit c61e3e2f00de49b85c2bd76c252d2a9fd13ed643)

Bug: 911253, 911255, 914407,  915348 ,  915479 ,  916478 ,  917285 ,  917380 ,  917834 ,  918035 
Change-Id: I595de36637cdb256153d92f21958b05e2ea6ac92
Reviewed-on: https://chromium-review.googlesource.com/c/1406928
Reviewed-by: Chris Mumford <cmumford@google.com>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#622207}
Reviewed-on: https://chromium-review.googlesource.com/c/1413452
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/branch-heads/3626@{#703}
Cr-Branched-From: d897fb137fbaaa9355c0c93124cc048824eb1e65-refs/heads/master@{#612437}
Project Member

Comment 31 by bugdroid1@chromium.org, Jan 15

Labels: merge-merged-3626
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8

commit e6d709904788b93ca8f88bbf67ad0a7af26e5bb8
Author: Staphany Park <staphany@chromium.org>
Date: Tue Jan 15 22:21:13 2019

sqlite: Backport a few bug fixes.

This CL removes an unnecessary change in
0006-Fix-dbfuzz2-for-Clusterfuzz.patch and backports fixes for a few
recently discovered issues. The added patches will go away in the
next SQLite upgrade.

(cherry picked from commit c61e3e2f00de49b85c2bd76c252d2a9fd13ed643)

Bug: 911253, 911255, 914407,  915348 ,  915479 ,  916478 ,  917285 ,  917380 ,  917834 ,  918035 
Change-Id: I595de36637cdb256153d92f21958b05e2ea6ac92
Reviewed-on: https://chromium-review.googlesource.com/c/1406928
Reviewed-by: Chris Mumford <cmumford@google.com>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#622207}
Reviewed-on: https://chromium-review.googlesource.com/c/1413452
Reviewed-by: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/branch-heads/3626@{#703}
Cr-Branched-From: d897fb137fbaaa9355c0c93124cc048824eb1e65-refs/heads/master@{#612437}
[modify] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/amalgamation/sqlite3.c
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0001-Modify-default-VFS-to-support-WebDatabase.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0002-Virtual-table-supporting-recovery-of-corrupted-datab.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0003-Custom-shell.c-helpers-to-load-Chromium-s-ICU-data.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0004-fts3-Disable-fts3_tokenizer-and-fts4.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0005-fuchsia-Use-dot-file-locking-for-sqlite.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0006-Fix-dbfuzz2-for-Clusterfuzz.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0007-Fix-the-Makefile-so-that-it-honors-CFLAGS-when-build.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0008-Adjustments-to-the-page-cache-to-try-to-avoid-harmle.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0009-Remove-an-ALWAYS-from-a-branch-that-is-not-always-ta.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0010-Fix-a-problem-with-nested-CTEs-with-the-same-table.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0011-Fix-detection-of-self-referencing-rows-in-foreign-ke.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0012-Fix-a-segfault-caused-by-using-the-RAISE-function-in.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0013-Fix-for-an-assert-that-could-be-false.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0014-Fix-another-problem-found-by-Matthew-Denton-s-new-fu.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0015-Report-a-new-corruption-case.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0016-Avoid-a-buffer-overread-in-ptrmapPutOvflPtr.patch
[add] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/patches/0017-Improved-detection-of-cell-corruption-in-sqlite3Vdbe.patch
[modify] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/src/Makefile.in
[modify] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/src/src/btree.c
[modify] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/src/src/expr.c
[modify] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/src/src/fkey.c
[modify] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/src/src/pcache1.c
[modify] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/src/src/select.c
[modify] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/src/src/vdbeaux.c
[modify] https://crrev.com/e6d709904788b93ca8f88bbf67ad0a7af26e5bb8/third_party/sqlite/src/test/fuzzcheck.c

Project Member

Comment 32 by bugdroid1@chromium.org, Jan 16 (6 days ago)

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

commit eb2905ee5a9671d13704f29efaf0780206c3b9b6
Author: Jan Krcal <jkrcal@chromium.org>
Date: Wed Jan 16 15:06:53 2019

[Sync] Re-enable integration tests disabled due to clang roll

This CL re-enables sync_integration_tests that got disabled due to TSan
failures (that started occurring after a clang roll). All the issues
have been resolved in the mean-time so we should be safe to run them
again.

Bug:  917380 
Change-Id: I1caec9a7df406b1fca717d4b78b7d774215950e1
Reviewed-on: https://chromium-review.googlesource.com/c/1412812
Commit-Queue: Jan Krcal <jkrcal@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623236}
[modify] https://crrev.com/eb2905ee5a9671d13704f29efaf0780206c3b9b6/chrome/browser/sync/test/integration/single_client_custom_passphrase_sync_test.cc
[modify] https://crrev.com/eb2905ee5a9671d13704f29efaf0780206c3b9b6/chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc
[modify] https://crrev.com/eb2905ee5a9671d13704f29efaf0780206c3b9b6/chrome/browser/sync/test/integration/single_client_wallet_sync_test.cc
[modify] https://crrev.com/eb2905ee5a9671d13704f29efaf0780206c3b9b6/chrome/browser/sync/test/integration/two_client_custom_passphrase_sync_test.cc
[modify] https://crrev.com/eb2905ee5a9671d13704f29efaf0780206c3b9b6/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc
[modify] https://crrev.com/eb2905ee5a9671d13704f29efaf0780206c3b9b6/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc

Comment 33 by jkrcal@chromium.org, Yesterday (43 hours ago)

Status: Fixed (was: Assigned)
Thanks, that fixed the issue!

Sign in to add a comment