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

Issue 2652673006: Don't call Timer::Stop() off-sequence in SyncBrowserThreadModelWorkerTest (Closed)

Created:
3 years, 11 months ago by gab
Modified:
3 years, 11 months ago
Reviewers:
stanisc, maxbogue
CC:
chromium-reviews, sync-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't call Timer::Stop() off-sequence in SyncBrowserThreadModelWorkerTest Timer isn't thread-safe and this call is racy as highlighted by https://codereview.chromium.org/2491613004/#ps420001 SyncBrowserThreadModelWorkerTest.DoesWorkOnDatabaseThread (run #1): [ RUN ] SyncBrowserThreadModelWorkerTest.DoesWorkOnDatabaseThread [6916:2808:0123/195343.636:38250883:FATAL:timer.cc(150)] Check failed: origin_sequence_checker_.CalledOnValidSequence(). Backtrace: base::debug::StackTrace::StackTrace [0x01DF27F7+23] logging::LogMessage::~LogMessage [0x01D7F221+49] base::Timer::Stop [0x01DD050B+91] testing::internal::TestFactoryImpl<syncer::`anonymous namespace'::SyncBrowserThreadModelWorkerTest_DoesWorkOnDatabaseThread_Test>::CreateTest [0x00C4A22B+458] base::internal::RunMixin<base::Callback<bool __cdecl(void),1,1> >::Run [0x0115609D+25] base::internal::FunctorTraits<void (__thiscall syncer::BrowserThreadModelWorker::*)(base::Callback<enum syncer::SyncerError __cdecl(void),1,1> const &,syncer::ScopedEventSignal,enum syncer::SyncerError *),void>::Invoke<scoped_refptr<syncer::BrowserThreadM [0x025FBBD7+41] base::internal::Invoker<base::internal::BindState<void (__thiscall syncer::BrowserThreadModelWorker::*)(base::Callback<enum syncer::SyncerError __cdecl(void),1,1> const &,syncer::ScopedEventSignal,enum syncer::SyncerError *),scoped_refptr<syncer::BrowserT [0x025FBC08+46] base::internal::Invoker<base::internal::BindState<void (__thiscall syncer::BrowserThreadModelWorker::*)(base::Callback<enum syncer::SyncerError __cdecl(void),1,1> const &,syncer::ScopedEventSignal,enum syncer::SyncerError *),scoped_refptr<syncer::BrowserT [0x025FBF14+22] base::debug::TaskAnnotator::RunTask [0x01E0136F+383] base::MessageLoop::RunTask [0x01D839CC+1228] base::MessageLoop::DoWork [0x01D82953+611] base::MessagePumpDefault::Run [0x01E0327A+106] base::MessageLoop::RunHandler [0x01D834F1+305] base::RunLoop::Run [0x01D86D54+132] base::Thread::Run [0x01D9F7BD+173] base::Thread::ThreadMain [0x01DA02DE+622] base::PlatformThread::Sleep [0x01D9E832+290] BaseThreadInitThunk [0x7560337A+18] RtlInitializeExceptionChain [0x775692B2+99] RtlInitializeExceptionChain [0x77569285+54] BUG=684640 Review-Url: https://codereview.chromium.org/2652673006 Cr-Commit-Position: refs/heads/master@{#446101} Committed: https://chromium.googlesource.com/chromium/src/+/3c942aae9aaa0a5a04314090526d8f24560d65a6

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -1 line) Patch
M components/sync/engine/browser_thread_model_worker_unittest.cc View 1 chunk +0 lines, -1 line 2 comments Download

Messages

Total messages: 15 (9 generated)
gab
Stanis PTAL, FWIW this Timer is probably overkill (tests have a default timeout and this ...
3 years, 11 months ago (2017-01-24 22:14:50 UTC) #4
stanisc
+ maxbogue@ since he has done a number of refactoring changes in this file recently ...
3 years, 11 months ago (2017-01-25 00:55:16 UTC) #8
gab
https://codereview.chromium.org/2652673006/diff/1/components/sync/engine/browser_thread_model_worker_unittest.cc File components/sync/engine/browser_thread_model_worker_unittest.cc (left): https://codereview.chromium.org/2652673006/diff/1/components/sync/engine/browser_thread_model_worker_unittest.cc#oldcode53 components/sync/engine/browser_thread_model_worker_unittest.cc:53: timer_.Stop(); // Stop the failure timer so the test ...
3 years, 11 months ago (2017-01-25 14:51:47 UTC) #9
maxbogue
lgtm
3 years, 11 months ago (2017-01-25 20:01:00 UTC) #10
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/2652673006/1
3 years, 11 months ago (2017-01-25 20:02:36 UTC) #12
commit-bot: I haz the power
3 years, 11 months ago (2017-01-25 20:10:48 UTC) #15
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/3c942aae9aaa0a5a04314090526d...

Powered by Google App Engine
This is Rietveld 408576698