TSan error in RenderThreadImplBrowserTest.* |
||||
Issue description
TSan error in RenderThreadImplBrowserTest.NonResourceDispatchIPCTasksDontGoThroughScheduler and RenderThreadImplBrowserTest.ResourceDispatchIPCTasksGoThroughScheduler.
RenderThreadImplBrowserTest.ResourceDispatchIPCTasksGoThroughScheduler (run #1):
[ RUN ] RenderThreadImplBrowserTest.ResourceDispatchIPCTasksGoThroughScheduler
==================
WARNING: ThreadSanitizer: data race (pid=8774)
Read of size 8 at 0x7b48000005c8 by thread T1 (mutexes: write M3369, write M2127):
#0 operator-> base/memory/ref_counted.h:323:12 (content_browsertests+0x000001f6ee48)
#1 PostTaskHelper content/browser/browser_thread_impl.cc:395 (content_browsertests+0x000001f6ee48)
#2 content::BrowserThread::PostDelayedTask(content::BrowserThread::ID, tracked_objects::Location const&, base::Callback<void (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&, base::TimeDelta) content/browser/browser_thread_impl.cc:508 (content_browsertests+0x000001f6ee48)
#3 content::(anonymous namespace)::BrowserThreadTaskRunner::PostDelayedTask(tracked_objects::Location const&, base::Callback<void (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&, base::TimeDelta) content/browser/browser_thread_impl.cc:64:12 (content_browsertests+0x000001f6f6e9)
#4 base::TaskRunner::PostTask(tracked_objects::Location const&, base::Callback<void (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) base/task_runner.cc:45:10 (content_browsertests+0x000002ae8123)
#5 mojo::Watcher::CallOnHandleReady(unsigned long, unsigned int, MojoHandleSignalsState, unsigned int) mojo/public/cpp/system/watcher.cc:105:28 (content_browsertests+0x000002d3e217)
#6 mojo::edk::(anonymous namespace)::CallWatchCallback(void (*)(unsigned long, unsigned int, MojoHandleSignalsState, unsigned int), unsigned long, unsigned int, mojo::edk::HandleSignalsState const&, unsigned int) mojo/edk/system/core.cc:57:3 (content_browsertests+0x0000026eb17c)
#7 Invoke<void (*const &)(unsigned long, unsigned int, MojoHandleSignalsState, unsigned int), const unsigned long &, unsigned int, const mojo::edk::HandleSignalsState &, unsigned int> base/bind_internal.h:164:12 (content_browsertests+0x0000026efb6d)
#8 MakeItSo<void (*const &)(void (*)(unsigned long, unsigned int, MojoHandleSignalsState, unsigned int), unsigned long, unsigned int, const mojo::edk::HandleSignalsState &, unsigned int), void (*const &)(unsigned long, unsigned int, MojoHandleSignalsState, unsigned int), const unsigned long &, unsigned int, const mojo::edk::HandleSignalsState &, unsigned int> base/bind_internal.h:285 (content_browsertests+0x0000026efb6d)
#9 RunImpl<void (*const &)(void (*)(unsigned long, unsigned int, MojoHandleSignalsState, unsigned int), unsigned long, unsigned int, const mojo::edk::HandleSignalsState &, unsigned int), const std::__1::tuple<void (*)(unsigned long, unsigned int, MojoHandleSignalsState, unsigned int), unsigned long> &, 0, 1> base/bind_internal.h:361 (content_browsertests+0x0000026efb6d)
#10 base::internal::Invoker<base::internal::BindState<void (*)(void (*)(unsigned long, unsigned int, MojoHandleSignalsState, unsigned int), unsigned long, unsigned int, mojo::edk::HandleSignalsState const&, unsigned int), void (*)(unsigned long, unsigned int, MojoHandleSignalsState, unsigned int), unsigned long>, void (unsigned int, mojo::edk::HandleSignalsState const&, unsigned int)>::Run(base::internal::BindStateBase*, unsigned int&&, mojo::edk::HandleSignalsState const&, unsigned int&&) base/bind_internal.h:339 (content_browsertests+0x0000026efb6d)
#11 Run base/callback.h:85:12 (content_browsertests+0x0000027165b9)
#12 mojo::edk::Watcher::MaybeInvokeCallback(unsigned int, mojo::edk::HandleSignalsState const&, unsigned int) mojo/edk/system/watcher.cc:24 (content_browsertests+0x0000027165b9)
#13 mojo::edk::RequestContext::~RequestContext() mojo/edk/system/request_context.cc:59:22 (content_browsertests+0x00000270d7ef)
#14 mojo::edk::Core::WriteMessageNew(unsigned int, unsigned long, unsigned int) mojo/edk/system/core.cc:702:1 (content_browsertests+0x0000026ed076)
#15 MojoWriteMessageNewImpl mojo/edk/embedder/entrypoints.cc:120:18 (content_browsertests+0x000000e7ea8c)
#16 MojoWriteMessageNew mojo/public/c/system/thunks.cc:210:10 (content_browsertests+0x000002d3ec34)
#17 WriteMessageNew mojo/public/cpp/system/message_pipe.h:97:10 (content_browsertests+0x000002724757)
#18 mojo::Connector::Accept(mojo::Message*) mojo/public/cpp/bindings/lib/connector.cc:127 (content_browsertests+0x000002724757)
#19 IPC::(anonymous namespace)::ChannelAssociatedGroupController::SendMessage(mojo::Message*) ipc/ipc_mojo_bootstrap.cc:488:26 (content_browsertests+0x000002d4c0b9)
#20 IPC::(anonymous namespace)::ChannelAssociatedGroupController::ControlMessageProxyThunk::Accept(mojo::Message*) ipc/ipc_mojo_bootstrap.cc:458:27 (content_browsertests+0x000002d4beba)
#21 mojo::(anonymous namespace)::SendRunOrClosePipeMessage(mojo::MessageReceiver*, mojo::StructPtr<mojo::pipe_control::RunOrClosePipeInput>, mojo::internal::SerializationContext*) mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc:36:23 (content_browsertests+0x000002733337)
#22 mojo::PipeControlMessageProxy::NotifyPeerEndpointClosed(unsigned int) mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc:58:3 (content_browsertests+0x000002732ff0)
#23 IPC::(anonymous namespace)::ChannelAssociatedGroupController::CloseEndpointHandle(unsigned int, bool) ipc/ipc_mojo_bootstrap.cc:186:30 (content_browsertests+0x000002d4ac9c)
#24 reset mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc:38:22 (content_browsertests+0x00000273368b)
#25 mojo::ScopedInterfaceEndpointHandle::~ScopedInterfaceEndpointHandle() mojo/public/cpp/bindings/lib/scoped_interface_endpoint_handle.cc:23 (content_browsertests+0x00000273368b)
#26 mojo::InterfaceEndpointClient::~InterfaceEndpointClient() mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:173:1 (content_browsertests+0x000002726aad)
#27 mojo::InterfaceEndpointClient::~InterfaceEndpointClient() mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:166:53 (content_browsertests+0x000002726b19)
#28 operator() buildtools/third_party/libc++/trunk/include/memory:2529:13 (content_browsertests+0x000003d83c0d)
#29 reset buildtools/third_party/libc++/trunk/include/memory:2735 (content_browsertests+0x000003d83c0d)
#30 ~AssociatedInterfacePtrState mojo/public/cpp/bindings/lib/associated_interface_ptr_state.h:41 (content_browsertests+0x000003d83c0d)
#31 ~AssociatedInterfacePtr mojo/public/cpp/bindings/associated_interface_ptr.h:55 (content_browsertests+0x000003d83c0d)
#32 mojo::ThreadSafeInterfacePtrBase<content::mojom::RenderMessageFilter, mojo::AssociatedInterfacePtr>::~ThreadSafeInterfacePtrBase() mojo/public/cpp/bindings/thread_safe_interface_ptr.h:82 (content_browsertests+0x000003d83c0d)
#33 mojo::ThreadSafeInterfacePtrBase<content::mojom::RenderMessageFilter, mojo::AssociatedInterfacePtr>::~ThreadSafeInterfacePtrBase() mojo/public/cpp/bindings/thread_safe_interface_ptr.h:82:42 (content_browsertests+0x000003d83d69)
#34 base::DeleteHelper<mojo::ThreadSafeInterfacePtrBase<content::mojom::RenderMessageFilter, mojo::AssociatedInterfacePtr> >::DoDelete(void const*) base/sequenced_task_runner_helpers.h:40:5 (content_browsertests+0x000003d83917)
#35 Invoke<const void *const &> base/bind_internal.h:164:12 (content_browsertests+0x000002acd275)
#36 MakeItSo<void (*const &)(const void *), const void *const &> base/bind_internal.h:285 (content_browsertests+0x000002acd275)
#37 RunImpl<void (*const &)(const void *), const std::__1::tuple<const void *> &, 0> base/bind_internal.h:361 (content_browsertests+0x000002acd275)
#38 base::internal::Invoker<base::internal::BindState<void (*)(void const*), void const*>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:339 (content_browsertests+0x000002acd275)
#39 Run base/callback.h:68:12 (content_browsertests+0x000002b43bec)
#40 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:52 (content_browsertests+0x000002b43bec)
#41 base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:413:19 (content_browsertests+0x000002a9d712)
#42 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:422:5 (content_browsertests+0x000002a9dccd)
#43 base::MessageLoop::DoWork() base/message_loop/message_loop.cc:515:13 (content_browsertests+0x000002a9e494)
#44 base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_libevent.cc:218:31 (content_browsertests+0x000002aa33f0)
#45 base::MessageLoop::RunHandler() base/message_loop/message_loop.cc:378:10 (content_browsertests+0x000002a9d23b)
#46 base::RunLoop::Run() base/run_loop.cc:35:10 (content_browsertests+0x000002acca69)
#47 base::Thread::Run(base::RunLoop*) base/threading/thread.cc:245:13 (content_browsertests+0x000002b002a9)
#48 base::Thread::ThreadMain() base/threading/thread.cc:328:3 (content_browsertests+0x000002b004f4)
#49 base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:71:13 (content_browsertests+0x000002af93dd)
Previous write of size 8 at 0x7b48000005c8 by main thread:
#0 swap base/memory/ref_counted.h:360:9 (content_browsertests+0x000002a9d151)
#1 swap base/memory/ref_counted.h:364 (content_browsertests+0x000002a9d151)
#2 operator= base/memory/ref_counted.h:347 (content_browsertests+0x000002a9d151)
#3 base::MessageLoop::SetTaskRunner(scoped_refptr<base::SingleThreadTaskRunner>) base/message_loop/message_loop.cc:362 (content_browsertests+0x000002a9d151)
#4 RestoreDefaultTaskRunner third_party/WebKit/Source/platform/scheduler/child/scheduler_tqm_delegate_impl.cc:38:20 (content_browsertests+0x000004127a06)
#5 blink::scheduler::SchedulerTqmDelegateImpl::~SchedulerTqmDelegateImpl() third_party/WebKit/Source/platform/scheduler/child/scheduler_tqm_delegate_impl.cc:28 (content_browsertests+0x000004127a06)
#6 blink::scheduler::SchedulerTqmDelegateImpl::~SchedulerTqmDelegateImpl() third_party/WebKit/Source/platform/scheduler/child/scheduler_tqm_delegate_impl.cc:27:55 (content_browsertests+0x000004127a89)
#7 base::TaskRunner::OnDestruct() const base/task_runner.cc:61:3 (content_browsertests+0x000002ae8267)
#8 base::TaskRunnerTraits::Destruct(base::TaskRunner const*) base/task_runner.cc:65:16 (content_browsertests+0x000002ae82a2)
#9 Release base/memory/ref_counted.h:185:7 (content_browsertests+0x0000041272fa)
#10 Release base/memory/ref_counted.h:409 (content_browsertests+0x0000041272fa)
#11 ~scoped_refptr base/memory/ref_counted.h:311 (content_browsertests+0x0000041272fa)
#12 blink::scheduler::SchedulerHelper::~SchedulerHelper() third_party/WebKit/Source/platform/scheduler/child/scheduler_helper.cc:48 (content_browsertests+0x0000041272fa)
#13 blink::scheduler::RendererSchedulerImpl::~RendererSchedulerImpl() third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc:166:1 (content_browsertests+0x00000407f00b)
#14 blink::scheduler::RendererSchedulerImpl::~RendererSchedulerImpl() third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc:141:49 (content_browsertests+0x00000407f219)
#15 operator() buildtools/third_party/libc++/trunk/include/memory:2529:13 (content_browsertests+0x000003d79af8)
#16 reset buildtools/third_party/libc++/trunk/include/memory:2735 (content_browsertests+0x000003d79af8)
#17 ~unique_ptr buildtools/third_party/libc++/trunk/include/memory:2703 (content_browsertests+0x000003d79af8)
#18 content::RenderThreadImpl::~RenderThreadImpl() content/renderer/render_thread_impl.cc:933 (content_browsertests+0x000003d79af8)
#19 ~RenderThreadImplForTest content/renderer/render_thread_impl_browsertest.cc:127:40 (content_browsertests+0x0000009fb884)
#20 ~RenderThreadImplForTest content/renderer/render_thread_impl_browsertest.cc:127 (content_browsertests+0x0000009fb884)
#21 ~RenderThreadImplForTest content/renderer/render_thread_impl_browsertest.cc:127 (content_browsertests+0x0000009fb884)
#22 non-virtual thunk to content::(anonymous namespace)::RenderThreadImplForTest::~RenderThreadImplForTest() content/renderer/render_thread_impl_browsertest.cc (content_browsertests+0x0000009fb884)
#23 operator() buildtools/third_party/libc++/trunk/include/memory:2529:13 (content_browsertests+0x000003c86c82)
#24 reset buildtools/third_party/libc++/trunk/include/memory:2735 (content_browsertests+0x000003c86c82)
#25 content::ChildProcess::~ChildProcess() content/child/child_process.cc:74 (content_browsertests+0x000003c86c82)
#26 ~MockRenderProcess content/test/mock_render_process.cc:17:1 (content_browsertests+0x000002619c19)
#27 content::MockRenderProcess::~MockRenderProcess() content/test/mock_render_process.cc:16 (content_browsertests+0x000002619c19)
#28 operator() buildtools/third_party/libc++/trunk/include/memory:2529:13 (content_browsertests+0x0000009fc7b1)
#29 reset buildtools/third_party/libc++/trunk/include/memory:2735 (content_browsertests+0x0000009fc7b1)
#30 ~unique_ptr buildtools/third_party/libc++/trunk/include/memory:2703 (content_browsertests+0x0000009fc7b1)
#31 content::(anonymous namespace)::RenderThreadImplBrowserTest::~RenderThreadImplBrowserTest() content/renderer/render_thread_impl_browsertest.cc:169 (content_browsertests+0x0000009fc7b1)
#32 content::(anonymous namespace)::RenderThreadImplBrowserTest_ResourceDispatchIPCTasksGoThroughScheduler_Test::~RenderThreadImplBrowserTest_ResourceDispatchIPCTasksGoThroughScheduler_Test() content/renderer/render_thread_impl_browsertest.cc:266:1 (content_browsertests+0x0000009fc379)
#33 testing::TestInfo::Run() testing/gtest/src/gtest-internal-inl.h:803:42 (content_browsertests+0x0000028208db)
#34 testing::TestCase::Run() testing/gtest/src/gtest.cc:2774:28 (content_browsertests+0x000002821086)
#35 testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4647:43 (content_browsertests+0x00000282c036)
#36 HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12 (content_browsertests+0x00000282b8c9)
#37 testing::UnitTest::Run() testing/gtest/src/gtest.cc:4255 (content_browsertests+0x00000282b8c9)
#38 RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:46 (content_browsertests+0x0000026255e9)
#39 base::TestSuite::Run() base/test/test_suite.cc:271 (content_browsertests+0x0000026255e9)
#40 content::ContentTestLauncherDelegate::RunTestSuite(int, char**) content/test/content_test_launcher.cc:105:48 (content_browsertests+0x0000025f698b)
#41 content::LaunchTests(content::TestLauncherDelegate*, int, int, char**) content/public/test/test_launcher.cc:520:31 (content_browsertests+0x000002611e74)
#42 main content/test/content_test_launcher.cc:131:10 (content_browsertests+0x0000025f6912)
Location is heap block of size 352 at 0x7b4800000480 allocated by main thread:
#0 operator new(unsigned long) <null> (content_browsertests+0x000000512b02)
#1 content::TestBrowserThreadBundle::Init() content/public/test/test_browser_thread_bundle.cc:62:25 (content_browsertests+0x0000026082db)
#2 content::TestBrowserThreadBundle::TestBrowserThreadBundle(int) content/public/test/test_browser_thread_bundle.cc:19:3 (content_browsertests+0x0000026081fc)
#3 content::(anonymous namespace)::RenderThreadImplBrowserTest::SetUp() content/renderer/render_thread_impl_browsertest.cc:182:13 (content_browsertests+0x0000009fa0e8)
#4 HandleExceptionsInMethodIfSupported<testing::Test, void> testing/gtest/src/gtest.cc:2458:12 (content_browsertests+0x00000281f3e0)
#5 testing::Test::Run() testing/gtest/src/gtest.cc:2470 (content_browsertests+0x00000281f3e0)
#6 testing::TestInfo::Run() testing/gtest/src/gtest.cc:2656:11 (content_browsertests+0x0000028207ac)
#7 testing::TestCase::Run() testing/gtest/src/gtest.cc:2774:28 (content_browsertests+0x000002821086)
#8 testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4647:43 (content_browsertests+0x00000282c036)
#9 HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12 (content_browsertests+0x00000282b8c9)
#10 testing::UnitTest::Run() testing/gtest/src/gtest.cc:4255 (content_browsertests+0x00000282b8c9)
#11 RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:46 (content_browsertests+0x0000026255e9)
#12 base::TestSuite::Run() base/test/test_suite.cc:271 (content_browsertests+0x0000026255e9)
#13 content::ContentTestLauncherDelegate::RunTestSuite(int, char**) content/test/content_test_launcher.cc:105:48 (content_browsertests+0x0000025f698b)
#14 content::LaunchTests(content::TestLauncherDelegate*, int, int, char**) content/public/test/test_launcher.cc:520:31 (content_browsertests+0x000002611e74)
#15 main content/test/content_test_launcher.cc:131:10 (content_browsertests+0x0000025f6912)
Mutex M3369 (0x7b140001b8b8) created at:
#0 pthread_mutex_init <null> (content_browsertests+0x0000004b52c3)
#1 base::internal::LockImpl::LockImpl() base/synchronization/lock_impl_posix.cc:45:8 (content_browsertests+0x000002ae270d)
#2 Lock base/synchronization/lock.h:24:12 (content_browsertests+0x000002716505)
#3 mojo::edk::Watcher::Watcher(unsigned int, base::Callback<void (unsigned int, mojo::edk::HandleSignalsState const&, unsigned int), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) mojo/edk/system/watcher.cc:13 (content_browsertests+0x000002716505)
#4 mojo::edk::WatcherSet::Add(unsigned int, base::Callback<void (unsigned int, mojo::edk::HandleSignalsState const&, unsigned int), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&, unsigned long, mojo::edk::HandleSignalsState const&) mojo/edk/system/watcher_set.cc:38:38 (content_browsertests+0x000002721cb7)
#5 mojo::edk::AwakableList::AddWatcher(unsigned int, base::Callback<void (unsigned int, mojo::edk::HandleSignalsState const&, unsigned int), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&, unsigned long, mojo::edk::HandleSignalsState const&) mojo/edk/system/awakable_list.cc:79:20 (content_browsertests+0x000002716d8d)
#6 mojo::edk::MessagePipeDispatcher::Watch(unsigned int, base::Callback<void (unsigned int, mojo::edk::HandleSignalsState const&, unsigned int), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&, unsigned long) mojo/edk/system/message_pipe_dispatcher.cc:220:21 (content_browsertests+0x0000026f87ff)
#7 mojo::edk::Core::Watch(unsigned int, unsigned int, void (*)(unsigned long, unsigned int, MojoHandleSignalsState, unsigned int), unsigned long) mojo/edk/system/core.cc:464:22 (content_browsertests+0x0000026eb0b2)
#8 MojoWatchImpl mojo/edk/embedder/entrypoints.cc:52:18 (content_browsertests+0x000000e7e6c5)
#9 MojoWatch mojo/public/c/system/thunks.cc:193:10 (content_browsertests+0x000002d3eb6b)
#10 mojo::Watcher::Start(mojo::Handle, unsigned int, base::Callback<void (unsigned int), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) mojo/public/cpp/system/watcher.cc:42:23 (content_browsertests+0x000002d3e052)
#11 mojo::Connector::WaitToReadMore() mojo/public/cpp/bindings/lib/connector.cc:214:36 (content_browsertests+0x000002723db8)
#12 mojo::Connector::Connector(mojo::ScopedHandleBase<mojo::MessagePipeHandle>, mojo::Connector::ConnectorConfig, scoped_refptr<base::SingleThreadTaskRunner>) mojo/public/cpp/bindings/lib/connector.cc:30:3 (content_browsertests+0x000002723c06)
#13 Bind ipc/ipc_mojo_bootstrap.cc:66:26 (content_browsertests+0x000002d4f67f)
#14 IPC::(anonymous namespace)::MojoBootstrapImpl::Connect() ipc/ipc_mojo_bootstrap.cc:811 (content_browsertests+0x000002d4f67f)
#15 IPC::ChannelMojo::Connect() ipc/ipc_channel_mojo.cc:295:15 (content_browsertests+0x000002d3f867)
#16 IPC::ChannelProxy::Context::OnChannelOpened() ipc/ipc_channel_proxy.cc:191:18 (content_browsertests+0x000002d42ad9)
#17 Invoke<const scoped_refptr<IPC::ChannelProxy::Context> &> base/bind_internal.h:214:12 (content_browsertests+0x000002d44c46)
#18 MakeItSo<void (IPC::ChannelProxy::Context::*const &)(), const scoped_refptr<IPC::ChannelProxy::Context> &> base/bind_internal.h:285 (content_browsertests+0x000002d44c46)
#19 RunImpl<void (IPC::ChannelProxy::Context::*const &)(), const std::__1::tuple<scoped_refptr<IPC::ChannelProxy::Context> > &, 0> base/bind_internal.h:361 (content_browsertests+0x000002d44c46)
#20 base::internal::Invoker<base::internal::BindState<void (IPC::ChannelProxy::Context::*)(), scoped_refptr<IPC::ChannelProxy::Context> >, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:339 (content_browsertests+0x000002d44c46)
#21 Run base/callback.h:68:12 (content_browsertests+0x000002b43bec)
#22 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:52 (content_browsertests+0x000002b43bec)
#23 base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:413:19 (content_browsertests+0x000002a9d712)
#24 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:422:5 (content_browsertests+0x000002a9dccd)
#25 base::MessageLoop::DoWork() base/message_loop/message_loop.cc:515:13 (content_browsertests+0x000002a9e494)
#26 base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_libevent.cc:218:31 (content_browsertests+0x000002aa33f0)
#27 base::MessageLoop::RunHandler() base/message_loop/message_loop.cc:378:10 (content_browsertests+0x000002a9d23b)
#28 base::RunLoop::Run() base/run_loop.cc:35:10 (content_browsertests+0x000002acca69)
#29 content::(anonymous namespace)::RenderThreadImplBrowserTest_ResourceDispatchIPCTasksGoThroughScheduler_Test::TestBody() content/renderer/render_thread_impl_browsertest.cc:271:19 (content_browsertests+0x0000009fc47d)
#30 HandleExceptionsInMethodIfSupported<testing::Test, void> testing/gtest/src/gtest.cc:2458:12 (content_browsertests+0x00000281f606)
#31 testing::Test::Run() testing/gtest/src/gtest.cc:2474 (content_browsertests+0x00000281f606)
#32 testing::TestInfo::Run() testing/gtest/src/gtest.cc:2656:11 (content_browsertests+0x0000028207ac)
#33 testing::TestCase::Run() testing/gtest/src/gtest.cc:2774:28 (content_browsertests+0x000002821086)
#34 testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4647:43 (content_browsertests+0x00000282c036)
#35 HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12 (content_browsertests+0x00000282b8c9)
#36 testing::UnitTest::Run() testing/gtest/src/gtest.cc:4255 (content_browsertests+0x00000282b8c9)
#37 RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:46 (content_browsertests+0x0000026255e9)
#38 base::TestSuite::Run() base/test/test_suite.cc:271 (content_browsertests+0x0000026255e9)
#39 content::ContentTestLauncherDelegate::RunTestSuite(int, char**) content/test/content_test_launcher.cc:105:48 (content_browsertests+0x0000025f698b)
#40 content::LaunchTests(content::TestLauncherDelegate*, int, int, char**) content/public/test/test_launcher.cc:520:31 (content_browsertests+0x000002611e74)
#41 main content/test/content_test_launcher.cc:131:10 (content_browsertests+0x0000025f6912)
Mutex M2127 (0x000009484278) created at:
#0 pthread_mutex_init <null> (content_browsertests+0x0000004b52c3)
#1 base::internal::LockImpl::LockImpl() base/synchronization/lock_impl_posix.cc:45:8 (content_browsertests+0x000002ae270d)
#2 Lock base/synchronization/lock.h:24:12 (content_browsertests+0x000001f6d84c)
#3 BrowserThreadGlobals content/browser/browser_thread_impl.cc:105 (content_browsertests+0x000001f6d84c)
#4 New base/lazy_instance.h:69 (content_browsertests+0x000001f6d84c)
#5 New base/lazy_instance.h:98 (content_browsertests+0x000001f6d84c)
#6 Pointer base/lazy_instance.h:163 (content_browsertests+0x000001f6d84c)
#7 base::LazyInstance<content::(anonymous namespace)::BrowserThreadGlobals, base::internal::LeakyLazyInstanceTraits<content::(anonymous namespace)::BrowserThreadGlobals> >::Get() base/lazy_instance.h:137 (content_browsertests+0x000001f6d84c)
#8 Initialize content/browser/browser_thread_impl.cc:317:45 (content_browsertests+0x000001f6da12)
#9 content::BrowserThreadImpl::BrowserThreadImpl(content::BrowserThread::ID, base::MessageLoop*) content/browser/browser_thread_impl.cc:157 (content_browsertests+0x000001f6da12)
#10 TestBrowserThreadImpl content/public/test/test_browser_thread.cc:22:9 (content_browsertests+0x000002621657)
#11 content::TestBrowserThread::TestBrowserThread(content::BrowserThread::ID, base::MessageLoop*) content/public/test/test_browser_thread.cc:48 (content_browsertests+0x000002621657)
#12 content::TestBrowserThreadBundle::Init() content/public/test/test_browser_thread_bundle.cc:68:11 (content_browsertests+0x00000260836b)
#13 content::TestBrowserThreadBundle::TestBrowserThreadBundle(int) content/public/test/test_browser_thread_bundle.cc:19:3 (content_browsertests+0x0000026081fc)
#14 content::(anonymous namespace)::RenderThreadImplBrowserTest::SetUp() content/renderer/render_thread_impl_browsertest.cc:182:13 (content_browsertests+0x0000009fa0e8)
#15 HandleExceptionsInMethodIfSupported<testing::Test, void> testing/gtest/src/gtest.cc:2458:12 (content_browsertests+0x00000281f3e0)
#16 testing::Test::Run() testing/gtest/src/gtest.cc:2470 (content_browsertests+0x00000281f3e0)
#17 testing::TestInfo::Run() testing/gtest/src/gtest.cc:2656:11 (content_browsertests+0x0000028207ac)
#18 testing::TestCase::Run() testing/gtest/src/gtest.cc:2774:28 (content_browsertests+0x000002821086)
#19 testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4647:43 (content_browsertests+0x00000282c036)
#20 HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12 (content_browsertests+0x00000282b8c9)
#21 testing::UnitTest::Run() testing/gtest/src/gtest.cc:4255 (content_browsertests+0x00000282b8c9)
#22 RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:46 (content_browsertests+0x0000026255e9)
#23 base::TestSuite::Run() base/test/test_suite.cc:271 (content_browsertests+0x0000026255e9)
#24 content::ContentTestLauncherDelegate::RunTestSuite(int, char**) content/test/content_test_launcher.cc:105:48 (content_browsertests+0x0000025f698b)
#25 content::LaunchTests(content::TestLauncherDelegate*, int, int, char**) content/public/test/test_launcher.cc:520:31 (content_browsertests+0x000002611e74)
#26 main content/test/content_test_launcher.cc:131:10 (content_browsertests+0x0000025f6912)
Thread T1 'Chrome_ChildIOThread' (tid=8784, running) created by main thread at:
#0 pthread_create <null> (content_browsertests+0x0000004b42b5)
#1 base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:110:13 (content_browsertests+0x000002af8f67)
#2 base::PlatformThread::CreateWithPriority(unsigned long, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:191:10 (content_browsertests+0x000002af8e65)
#3 base::Thread::StartWithOptions(base::Thread::Options const&) base/threading/thread.cc:112:15 (content_browsertests+0x000002affdf5)
#4 content::ChildProcess::ChildProcess(base::ThreadPriority) content/child/child_process.cc:58:3 (content_browsertests+0x000003c86b83)
#5 content::ChildProcess::ChildProcess() content/child/child_process.cc:38:32 (content_browsertests+0x000003c869fe)
#6 RenderProcess content/renderer/render_process.h:22:3 (content_browsertests+0x000002619b9a)
#7 content::MockRenderProcess::MockRenderProcess() content/test/mock_render_process.cc:12 (content_browsertests+0x000002619b9a)
#8 content::(anonymous namespace)::RenderThreadImplBrowserTest::SetUp() content/renderer/render_thread_impl_browsertest.cc:204:29 (content_browsertests+0x0000009fa572)
#9 HandleExceptionsInMethodIfSupported<testing::Test, void> testing/gtest/src/gtest.cc:2458:12 (content_browsertests+0x00000281f3e0)
#10 testing::Test::Run() testing/gtest/src/gtest.cc:2470 (content_browsertests+0x00000281f3e0)
#11 testing::TestInfo::Run() testing/gtest/src/gtest.cc:2656:11 (content_browsertests+0x0000028207ac)
#12 testing::TestCase::Run() testing/gtest/src/gtest.cc:2774:28 (content_browsertests+0x000002821086)
#13 testing::internal::UnitTestImpl::RunAllTests() testing/gtest/src/gtest.cc:4647:43 (content_browsertests+0x00000282c036)
#14 HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> testing/gtest/src/gtest.cc:2458:12 (content_browsertests+0x00000282b8c9)
#15 testing::UnitTest::Run() testing/gtest/src/gtest.cc:4255 (content_browsertests+0x00000282b8c9)
#16 RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2237:46 (content_browsertests+0x0000026255e9)
#17 base::TestSuite::Run() base/test/test_suite.cc:271 (content_browsertests+0x0000026255e9)
#18 content::ContentTestLauncherDelegate::RunTestSuite(int, char**) content/test/content_test_launcher.cc:105:48 (content_browsertests+0x0000025f698b)
#19 content::LaunchTests(content::TestLauncherDelegate*, int, int, char**) content/public/test/test_launcher.cc:520:31 (content_browsertests+0x000002611e74)
#20 main content/test/content_test_launcher.cc:131:10 (content_browsertests+0x0000025f6912)
SUMMARY: ThreadSanitizer: data race base/memory/ref_counted.h:323:12 in operator->
,
Dec 9 2016
,
Dec 9 2016
I really don't understand how RenderThreadImplBrowserTest setups all threads. Maybe rockot@ could take a look.
,
Dec 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/97a8683a8e2243efcdf13273a4037d5905ab75dd commit 97a8683a8e2243efcdf13273a4037d5905ab75dd Author: rockot <rockot@chromium.org> Date: Sat Dec 10 04:53:06 2016 Fix data race in RenderThreadImplBrowserTest Use ThreadTaskRunnerHandle instead of BrowserThread::GetTaskRunnerForThread. This avoids a data race in shutdown due to the fact that RendererScheduler (used on a BrowserThread in this test) tramples the MessageLoop's TaskRunner in a manner BrowserThreadImpl's TaskRunner facade does not anticipate. Also opportunistically corrects some non-const ref arguments in RenderThreadImpl. BUG= 672812 Review-Url: https://codereview.chromium.org/2568543002 Cr-Commit-Position: refs/heads/master@{#437755} [modify] https://crrev.com/97a8683a8e2243efcdf13273a4037d5905ab75dd/content/renderer/render_thread_impl.cc [modify] https://crrev.com/97a8683a8e2243efcdf13273a4037d5905ab75dd/content/renderer/render_thread_impl.h [modify] https://crrev.com/97a8683a8e2243efcdf13273a4037d5905ab75dd/content/renderer/render_thread_impl_browsertest.cc
,
Dec 10 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by fdoray@chromium.org
, Dec 9 2016