New issue
Advanced search Search tips
Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment
link

Issue 831674: blink_heap_unittests fail under tsan

Reported by thakis@chromium.org, Apr 11 2018 Project Member

Issue description

I'm adding more tests to the memory bots on https://chromium-review.googlesource.com/c/chromium/src/+/987916/. blink_heap_unittests fails under tsan, see e.g. https://ci.chromium.org/buildbot/tryserver.chromium.linux/linux_chromium_tsan_rel_ng/279471



Some distinct stacks (look for "threadsanitizer:" on https://chromium-swarm.appspot.com/task?id=3c905661786eb510&refresh=10&show_raw=1)

WARNING: ThreadSanitizer: data race (pid=11827)
  Read of size 4 at 0x7b0400004e0c by main thread:
    #0 blink::ThreadedTesterBase::Test(blink::ThreadedTesterBase*) third_party/WebKit/Source/platform/heap/HeapTest.cpp:510:20 (blink_heap_unittests+0x138d1cf)
    #1 Test third_party/WebKit/Source/platform/heap/HeapTest.cpp:6587:5 (blink_heap_unittests+0x137fe28)
    #2 blink::HeapTest_TestClearOnShutdown_Test::TestBody() third_party/WebKit/Source/platform/heap/HeapTest.cpp:6684 (blink_heap_unittests+0x137fe28)
    #3 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15cc61d)
    #4 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2661:11 (blink_heap_unittests+0x15cd15d)
    #5 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2779:28 (blink_heap_unittests+0x15cd9a6)
    #6 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5036:43 (blink_heap_unittests+0x15ddf76)
    #7 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15dd87b)
    #8 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2314:46 (blink_heap_unittests+0x3a0a686)
    #9 base::TestSuite::Run() base/test/test_suite.cc:275 (blink_heap_unittests+0x3a0a686)
    #10 runHelper(base::TestSuite*) third_party/WebKit/Source/platform/heap/RunAllTests.cpp:49:27 (blink_heap_unittests+0x1454ad7)
    #11 Invoke<base::TestSuite *> base/bind_internal.h:402:12 (blink_heap_unittests+0x1454c34)
    #12 MakeItSo<int (*const &)(base::TestSuite *), base::TestSuite *> base/bind_internal.h:530 (blink_heap_unittests+0x1454c34)
    #13 RunImpl<int (*const &)(base::TestSuite *), const std::__1::tuple<base::internal::UnretainedWrapper<base::TestSuite> > &, 0> base/bind_internal.h:604 (blink_heap_unittests+0x1454c34)
    #14 base::internal::Invoker<base::internal::BindState<int (*)(base::TestSuite*), base::internal::UnretainedWrapper<base::TestSuite> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x1454c34)
    #15 Run base/callback.h:95:12 (blink_heap_unittests+0x3a0db70)
    #16 base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225 (blink_heap_unittests+0x3a0db70)
    #17 base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10 (blink_heap_unittests+0x3a0d983)
    #18 main third_party/WebKit/Source/platform/heap/RunAllTests.cpp:56:10 (blink_heap_unittests+0x1454bb7)

  Previous atomic write of size 4 at 0x7b0400004e0c by thread T10:
    #0 __tsan_atomic32_fetch_sub /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc:643:3 (blink_heap_unittests+0x1276202)
    #1 AtomicSubtract third_party/WebKit/Source/platform/wtf/Atomics.h:139:10 (blink_heap_unittests+0x13ba353)
    #2 AtomicDecrement third_party/WebKit/Source/platform/wtf/Atomics.h:154 (blink_heap_unittests+0x13ba353)
    #3 blink::(anonymous namespace)::ThreadedClearOnShutdownTester::RunThread() third_party/WebKit/Source/platform/heap/HeapTest.cpp:6599 (blink_heap_unittests+0x13ba353)
    #4 blink::ThreadedTesterBase::ThreadFunc(void*) third_party/WebKit/Source/platform/heap/HeapTest.cpp:536:50 (blink_heap_unittests+0x138d2e1)
    #5 Invoke<blink::ThreadedTesterBase *> base/bind_internal.h:402:12 (blink_heap_unittests+0x138dae4)
    #6 MakeItSo<void (*const &)(void *), blink::ThreadedTesterBase *> base/bind_internal.h:530 (blink_heap_unittests+0x138dae4)
    #7 RunImpl<void (*const &)(void *), const std::__1::tuple<WTF::CrossThreadUnretainedWrapper<blink::ThreadedTesterBase> > &, 0> base/bind_internal.h:604 (blink_heap_unittests+0x138dae4)
    #8 base::internal::Invoker<base::internal::BindState<void (*)(void*), WTF::CrossThreadUnretainedWrapper<blink::ThreadedTesterBase> >, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x138dae4)
    #9 Run base/callback.h:135:12 (blink_heap_unittests+0x5244da5)
    #10 Run third_party/WebKit/Source/platform/wtf/Functional.h:320 (blink_heap_unittests+0x5244da5)
    #11 blink::(anonymous namespace)::RunCrossThreadClosure(WTF::CrossThreadFunction<void ()>) third_party/WebKit/Source/platform/WebTaskRunner.cpp:35 (blink_heap_unittests+0x5244da5)
    #12 Invoke<WTF::CrossThreadFunction<void ()> > base/bind_internal.h:402:12 (blink_heap_unittests+0x5245bb9)
    #13 MakeItSo<void (*)(WTF::CrossThreadFunction<void ()>), WTF::CrossThreadFunction<void ()> > base/bind_internal.h:530 (blink_heap_unittests+0x5245bb9)
    #14 RunImpl<void (*)(WTF::CrossThreadFunction<void ()>), std::__1::tuple<WTF::CrossThreadFunction<void ()> >, 0> base/bind_internal.h:604 (blink_heap_unittests+0x5245bb9)
    #15 base::internal::Invoker<base::internal::BindState<void (*)(WTF::CrossThreadFunction<void ()>), WTF::CrossThreadFunction<void ()> >, void ()>::RunOnce(base::internal::BindStateBase*) base/bind_internal.h:572 (blink_heap_unittests+0x5245bb9)
    #16 Run base/callback.h:95:12 (blink_heap_unittests+0x38f8074)
    #17 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:61 (blink_heap_unittests+0x38f8074)
    #18 blink::scheduler::internal::ThreadControllerImpl::DoWork(blink::scheduler::internal::SequencedTaskSource::WorkType) third_party/WebKit/Source/platform/scheduler/base/thread_controller_impl.cc:162:21 (blink_heap_unittests+0x2fd9415)
    #19 Invoke<const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::SequencedTaskSource::WorkType &> base/bind_internal.h:447:12 (blink_heap_unittests+0x2fdb952)
    #20 MakeItSo<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::SequencedTaskSource::WorkType), const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::SequencedTaskSource::WorkType &> base/bind_internal.h:550 (blink_heap_unittests+0x2fdb952)
    #21 RunImpl<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::SequencedTaskSource::WorkType), const std::__1::tuple<base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::SequencedTaskSource::WorkType> &, 0, 1> base/bind_internal.h:604 (blink_heap_unittests+0x2fdb952)
    #22 base::internal::Invoker<base::internal::BindState<void (blink::scheduler::internal::ThreadControllerImpl::*)(blink::scheduler::internal::SequencedTaskSource::WorkType), base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::SequencedTaskSource::WorkType>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x2fdb952)
    #23 Run base/callback.h:95:12 (blink_heap_unittests+0x38f8074)
    #24 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:61 (blink_heap_unittests+0x38f8074)
    #25 base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19 (blink_heap_unittests+0x39321ae)
    #26 base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:391:25 (blink_heap_unittests+0x392f253)
    #27 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:403:5 (blink_heap_unittests+0x392f74c)
    #28 base::MessageLoop::DoWork() base/message_loop/message_loop.cc:447:16 (blink_heap_unittests+0x392fae5)
    #29 base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:37:31 (blink_heap_unittests+0x39358e6)
    #30 base::MessageLoop::Run(bool) base/message_loop/message_loop.cc:342:12 (blink_heap_unittests+0x392e7c9)
    #31 non-virtual thunk to base::MessageLoop::Run(bool) base/message_loop/message_loop.cc (blink_heap_unittests+0x392e914)
    #32 base::RunLoop::Run() base/run_loop.cc:130:14 (blink_heap_unittests+0x396621f)
    #33 base::Thread::Run(base::RunLoop*) base/threading/thread.cc:255:13 (blink_heap_unittests+0x39b351b)
    #34 base::Thread::ThreadMain() base/threading/thread.cc:338:3 (blink_heap_unittests+0x39b3b71)
    #35 base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:76:13 (blink_heap_unittests+0x39af448)

  Location is heap block of size 16 at 0x7b0400004e00 allocated by main thread:
    #0 operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc:57:3 (blink_heap_unittests+0x1297119)
    #1 Test third_party/WebKit/Source/platform/heap/HeapTest.cpp:6587:30 (blink_heap_unittests+0x137fde8)
    #2 blink::HeapTest_TestClearOnShutdown_Test::TestBody() third_party/WebKit/Source/platform/heap/HeapTest.cpp:6684 (blink_heap_unittests+0x137fde8)
    #3 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15cc61d)
    #4 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2661:11 (blink_heap_unittests+0x15cd15d)
    #5 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2779:28 (blink_heap_unittests+0x15cd9a6)
    #6 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5036:43 (blink_heap_unittests+0x15ddf76)
    #7 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15dd87b)
    #8 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2314:46 (blink_heap_unittests+0x3a0a686)
    #9 base::TestSuite::Run() base/test/test_suite.cc:275 (blink_heap_unittests+0x3a0a686)
    #10 runHelper(base::TestSuite*) third_party/WebKit/Source/platform/heap/RunAllTests.cpp:49:27 (blink_heap_unittests+0x1454ad7)
    #11 Invoke<base::TestSuite *> base/bind_internal.h:402:12 (blink_heap_unittests+0x1454c34)
    #12 MakeItSo<int (*const &)(base::TestSuite *), base::TestSuite *> base/bind_internal.h:530 (blink_heap_unittests+0x1454c34)
    #13 RunImpl<int (*const &)(base::TestSuite *), const std::__1::tuple<base::internal::UnretainedWrapper<base::TestSuite> > &, 0> base/bind_internal.h:604 (blink_heap_unittests+0x1454c34)
    #14 base::internal::Invoker<base::internal::BindState<int (*)(base::TestSuite*), base::internal::UnretainedWrapper<base::TestSuite> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x1454c34)
    #15 Run base/callback.h:95:12 (blink_heap_unittests+0x3a0db70)
    #16 base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225 (blink_heap_unittests+0x3a0db70)
    #17 base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10 (blink_heap_unittests+0x3a0d983)
    #18 main third_party/WebKit/Source/platform/heap/RunAllTests.cpp:56:10 (blink_heap_unittests+0x1454bb7)

  Thread T10 'blink gc testing thread' (tid=11846, running) created by main thread at:
    #0 pthread_create /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:965:3 (blink_heap_unittests+0x122d4c5)
    #1 base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:115:13 (blink_heap_unittests+0x39aeef6)
    #2 base::PlatformThread::CreateWithPriority(unsigned long, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:200:10 (blink_heap_unittests+0x39aedb5)
    #3 base::Thread::StartWithOptions(base::Thread::Options const&) base/threading/thread.cc:112:15 (blink_heap_unittests+0x39b2d85)
    #4 blink::scheduler::WebThreadImplForWorkerScheduler::WebThreadImplForWorkerScheduler(blink::WebThreadCreationParams const&) third_party/WebKit/Source/platform/scheduler/child/webthread_impl_for_worker_scheduler.cc:29:27 (blink_heap_unittests+0x2fee78b)
    #5 make_unique<blink::scheduler::WebThreadImplForWorkerScheduler, const blink::WebThreadCreationParams &> buildtools/third_party/libc++/trunk/include/memory:3079:32 (blink_heap_unittests+0x2fee3f0)
    #6 blink::scheduler::WebThreadBase::CreateWorkerThread(blink::WebThreadCreationParams const&) third_party/WebKit/Source/platform/scheduler/child/webthread_base.cc:131 (blink_heap_unittests+0x2fee3f0)
    #7 content::BlinkPlatformImpl::CreateThread(blink::WebThreadCreationParams const&) content/child/blink_platform_impl.cc:376:7 (blink_heap_unittests+0x4ddf30c)
    #8 blink::ThreadedTesterBase::Test(blink::ThreadedTesterBase*) third_party/WebKit/Source/platform/heap/HeapTest.cpp:503:46 (blink_heap_unittests+0x138cf54)
    #9 Test third_party/WebKit/Source/platform/heap/HeapTest.cpp:6587:5 (blink_heap_unittests+0x137fe28)
    #10 blink::HeapTest_TestClearOnShutdown_Test::TestBody() third_party/WebKit/Source/platform/heap/HeapTest.cpp:6684 (blink_heap_unittests+0x137fe28)
    #11 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15cc61d)
    #12 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2661:11 (blink_heap_unittests+0x15cd15d)
    #13 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2779:28 (blink_heap_unittests+0x15cd9a6)
    #14 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5036:43 (blink_heap_unittests+0x15ddf76)
    #15 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15dd87b)
    #16 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2314:46 (blink_heap_unittests+0x3a0a686)
    #17 base::TestSuite::Run() base/test/test_suite.cc:275 (blink_heap_unittests+0x3a0a686)
    #18 runHelper(base::TestSuite*) third_party/WebKit/Source/platform/heap/RunAllTests.cpp:49:27 (blink_heap_unittests+0x1454ad7)
    #19 Invoke<base::TestSuite *> base/bind_internal.h:402:12 (blink_heap_unittests+0x1454c34)
    #20 MakeItSo<int (*const &)(base::TestSuite *), base::TestSuite *> base/bind_internal.h:530 (blink_heap_unittests+0x1454c34)
    #21 RunImpl<int (*const &)(base::TestSuite *), const std::__1::tuple<base::internal::UnretainedWrapper<base::TestSuite> > &, 0> base/bind_internal.h:604 (blink_heap_unittests+0x1454c34)
    #22 base::internal::Invoker<base::internal::BindState<int (*)(base::TestSuite*), base::internal::UnretainedWrapper<base::TestSuite> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x1454c34)
    #23 Run base/callback.h:95:12 (blink_heap_unittests+0x3a0db70)
    #24 base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225 (blink_heap_unittests+0x3a0db70)
    #25 base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10 (blink_heap_unittests+0x3a0d983)
    #26 main third_party/WebKit/Source/platform/heap/RunAllTests.cpp:56:10 (blink_heap_unittests+0x1454bb7)







==================
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=11819)
  Cycle in lock order graph: M3617 (0x7b0c0001c560) => M3504 (0x7b0c0000f0f0) => M3617
  Mutex M3504 acquired here while holding mutex M3617 in thread T7:
    #0 pthread_mutex_lock /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4027:3 (blink_heap_unittests+0x1248d0e)
    #1 WTF::MutexBase::lock() third_party/WebKit/Source/platform/wtf/ThreadingPthreads.cpp:145:16 (blink_heap_unittests+0x4de482e)
    #2 lock third_party/WebKit/Source/platform/wtf/ThreadingPrimitives.h:101:54 (blink_heap_unittests+0x137db96)
    #3 MutexLocker third_party/WebKit/Source/platform/wtf/ThreadingPrimitives.h:116 (blink_heap_unittests+0x137db96)
    #4 WakeMainThread third_party/WebKit/Source/platform/heap/HeapTest.cpp:5473 (blink_heap_unittests+0x137db96)
    #5 blink::(anonymous namespace)::WorkerThreadMainForCrossThreadWeakPersistentTest(blink::DestructorLockingObject**) third_party/WebKit/Source/platform/heap/HeapTest.cpp:6466 (blink_heap_unittests+0x137db96)
    #6 Invoke<blink::DestructorLockingObject **> base/bind_internal.h:402:12 (blink_heap_unittests+0x1444a44)
    #7 MakeItSo<void (*const &)(blink::DestructorLockingObject **), blink::DestructorLockingObject **> base/bind_internal.h:530 (blink_heap_unittests+0x1444a44)
    #8 RunImpl<void (*const &)(blink::DestructorLockingObject **), const std::__1::tuple<WTF::CrossThreadUnretainedWrapper<blink::DestructorLockingObject *> > &, 0> base/bind_internal.h:604 (blink_heap_unittests+0x1444a44)
    #9 base::internal::Invoker<base::internal::BindState<void (*)(blink::DestructorLockingObject**), WTF::CrossThreadUnretainedWrapper<blink::DestructorLockingObject*> >, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x1444a44)
    #10 Run base/callback.h:135:12 (blink_heap_unittests+0x5244da5)
    #11 Run third_party/WebKit/Source/platform/wtf/Functional.h:320 (blink_heap_unittests+0x5244da5)
    #12 blink::(anonymous namespace)::RunCrossThreadClosure(WTF::CrossThreadFunction<void ()>) third_party/WebKit/Source/platform/WebTaskRunner.cpp:35 (blink_heap_unittests+0x5244da5)
    #13 Invoke<WTF::CrossThreadFunction<void ()> > base/bind_internal.h:402:12 (blink_heap_unittests+0x5245bb9)
    #14 MakeItSo<void (*)(WTF::CrossThreadFunction<void ()>), WTF::CrossThreadFunction<void ()> > base/bind_internal.h:530 (blink_heap_unittests+0x5245bb9)
    #15 RunImpl<void (*)(WTF::CrossThreadFunction<void ()>), std::__1::tuple<WTF::CrossThreadFunction<void ()> >, 0> base/bind_internal.h:604 (blink_heap_unittests+0x5245bb9)
    #16 base::internal::Invoker<base::internal::BindState<void (*)(WTF::CrossThreadFunction<void ()>), WTF::CrossThreadFunction<void ()> >, void ()>::RunOnce(base::internal::BindStateBase*) base/bind_internal.h:572 (blink_heap_unittests+0x5245bb9)
    #17 Run base/callback.h:95:12 (blink_heap_unittests+0x38f8074)
    #18 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:61 (blink_heap_unittests+0x38f8074)
    #19 blink::scheduler::internal::ThreadControllerImpl::DoWork(blink::scheduler::internal::SequencedTaskSource::WorkType) third_party/WebKit/Source/platform/scheduler/base/thread_controller_impl.cc:162:21 (blink_heap_unittests+0x2fd9415)
    #20 Invoke<const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::SequencedTaskSource::WorkType &> base/bind_internal.h:447:12 (blink_heap_unittests+0x2fdb952)
    #21 MakeItSo<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::SequencedTaskSource::WorkType), const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::SequencedTaskSource::WorkType &> base/bind_internal.h:550 (blink_heap_unittests+0x2fdb952)
    #22 RunImpl<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::SequencedTaskSource::WorkType), const std::__1::tuple<base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::SequencedTaskSource::WorkType> &, 0, 1> base/bind_internal.h:604 (blink_heap_unittests+0x2fdb952)
    #23 base::internal::Invoker<base::internal::BindState<void (blink::scheduler::internal::ThreadControllerImpl::*)(blink::scheduler::internal::SequencedTaskSource::WorkType), base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::SequencedTaskSource::WorkType>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x2fdb952)
    #24 Run base/callback.h:95:12 (blink_heap_unittests+0x38f8074)
    #25 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:61 (blink_heap_unittests+0x38f8074)
    #26 base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19 (blink_heap_unittests+0x39321ae)
    #27 base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:391:25 (blink_heap_unittests+0x392f253)
    #28 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:403:5 (blink_heap_unittests+0x392f74c)
    #29 base::MessageLoop::DoWork() base/message_loop/message_loop.cc:447:16 (blink_heap_unittests+0x392fae5)
    #30 base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:37:31 (blink_heap_unittests+0x39358e6)
    #31 base::MessageLoop::Run(bool) base/message_loop/message_loop.cc:342:12 (blink_heap_unittests+0x392e7c9)
    #32 non-virtual thunk to base::MessageLoop::Run(bool) base/message_loop/message_loop.cc (blink_heap_unittests+0x392e914)
    #33 base::RunLoop::Run() base/run_loop.cc:130:14 (blink_heap_unittests+0x396621f)
    #34 base::Thread::Run(base::RunLoop*) base/threading/thread.cc:255:13 (blink_heap_unittests+0x39b351b)
    #35 base::Thread::ThreadMain() base/threading/thread.cc:338:3 (blink_heap_unittests+0x39b3b71)
    #36 base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:76:13 (blink_heap_unittests+0x39af448)
  Mutex M3617 previously acquired by the same thread here:
    #0 pthread_mutex_lock /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4027:3 (blink_heap_unittests+0x1248d0e)
    #1 WTF::MutexBase::lock() third_party/WebKit/Source/platform/wtf/ThreadingPthreads.cpp:145:16 (blink_heap_unittests+0x4de482e)
    #2 lock third_party/WebKit/Source/platform/wtf/ThreadingPrimitives.h:101:54 (blink_heap_unittests+0x137db09)
    #3 MutexLocker third_party/WebKit/Source/platform/wtf/ThreadingPrimitives.h:116 (blink_heap_unittests+0x137db09)
    #4 blink::(anonymous namespace)::WorkerThreadMainForCrossThreadWeakPersistentTest(blink::DestructorLockingObject**) third_party/WebKit/Source/platform/heap/HeapTest.cpp:6463 (blink_heap_unittests+0x137db09)
    #5 Invoke<blink::DestructorLockingObject **> base/bind_internal.h:402:12 (blink_heap_unittests+0x1444a44)
    #6 MakeItSo<void (*const &)(blink::DestructorLockingObject **), blink::DestructorLockingObject **> base/bind_internal.h:530 (blink_heap_unittests+0x1444a44)
    #7 RunImpl<void (*const &)(blink::DestructorLockingObject **), const std::__1::tuple<WTF::CrossThreadUnretainedWrapper<blink::DestructorLockingObject *> > &, 0> base/bind_internal.h:604 (blink_heap_unittests+0x1444a44)
    #8 base::internal::Invoker<base::internal::BindState<void (*)(blink::DestructorLockingObject**), WTF::CrossThreadUnretainedWrapper<blink::DestructorLockingObject*> >, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x1444a44)
    #9 Run base/callback.h:135:12 (blink_heap_unittests+0x5244da5)
    #10 Run third_party/WebKit/Source/platform/wtf/Functional.h:320 (blink_heap_unittests+0x5244da5)
    #11 blink::(anonymous namespace)::RunCrossThreadClosure(WTF::CrossThreadFunction<void ()>) third_party/WebKit/Source/platform/WebTaskRunner.cpp:35 (blink_heap_unittests+0x5244da5)
    #12 Invoke<WTF::CrossThreadFunction<void ()> > base/bind_internal.h:402:12 (blink_heap_unittests+0x5245bb9)
    #13 MakeItSo<void (*)(WTF::CrossThreadFunction<void ()>), WTF::CrossThreadFunction<void ()> > base/bind_internal.h:530 (blink_heap_unittests+0x5245bb9)
    #14 RunImpl<void (*)(WTF::CrossThreadFunction<void ()>), std::__1::tuple<WTF::CrossThreadFunction<void ()> >, 0> base/bind_internal.h:604 (blink_heap_unittests+0x5245bb9)
    #15 base::internal::Invoker<base::internal::BindState<void (*)(WTF::CrossThreadFunction<void ()>), WTF::CrossThreadFunction<void ()> >, void ()>::RunOnce(base::internal::BindStateBase*) base/bind_internal.h:572 (blink_heap_unittests+0x5245bb9)
    #16 Run base/callback.h:95:12 (blink_heap_unittests+0x38f8074)
    #17 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:61 (blink_heap_unittests+0x38f8074)
    #18 blink::scheduler::internal::ThreadControllerImpl::DoWork(blink::scheduler::internal::SequencedTaskSource::WorkType) third_party/WebKit/Source/platform/scheduler/base/thread_controller_impl.cc:162:21 (blink_heap_unittests+0x2fd9415)
    #19 Invoke<const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::SequencedTaskSource::WorkType &> base/bind_internal.h:447:12 (blink_heap_unittests+0x2fdb952)
    #20 MakeItSo<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::SequencedTaskSource::WorkType), const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::SequencedTaskSource::WorkType &> base/bind_internal.h:550 (blink_heap_unittests+0x2fdb952)
    #21 RunImpl<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::SequencedTaskSource::WorkType), const std::__1::tuple<base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::SequencedTaskSource::WorkType> &, 0, 1> base/bind_internal.h:604 (blink_heap_unittests+0x2fdb952)
    #22 base::internal::Invoker<base::internal::BindState<void (blink::scheduler::internal::ThreadControllerImpl::*)(blink::scheduler::internal::SequencedTaskSource::WorkType), base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::SequencedTaskSource::WorkType>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x2fdb952)
    #23 Run base/callback.h:95:12 (blink_heap_unittests+0x38f8074)
    #24 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:61 (blink_heap_unittests+0x38f8074)
    #25 base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19 (blink_heap_unittests+0x39321ae)
    #26 base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:391:25 (blink_heap_unittests+0x392f253)
    #27 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:403:5 (blink_heap_unittests+0x392f74c)
    #28 base::MessageLoop::DoWork() base/message_loop/message_loop.cc:447:16 (blink_heap_unittests+0x392fae5)
    #29 base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:37:31 (blink_heap_unittests+0x39358e6)
    #30 base::MessageLoop::Run(bool) base/message_loop/message_loop.cc:342:12 (blink_heap_unittests+0x392e7c9)
    #31 non-virtual thunk to base::MessageLoop::Run(bool) base/message_loop/message_loop.cc (blink_heap_unittests+0x392e914)
    #32 base::RunLoop::Run() base/run_loop.cc:130:14 (blink_heap_unittests+0x396621f)
    #33 base::Thread::Run(base::RunLoop*) base/threading/thread.cc:255:13 (blink_heap_unittests+0x39b351b)
    #34 base::Thread::ThreadMain() base/threading/thread.cc:338:3 (blink_heap_unittests+0x39b3b71)
    #35 base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:76:13 (blink_heap_unittests+0x39af448)
  Mutex M3617 acquired here while holding mutex M3504 in main thread:
    #0 pthread_mutex_lock /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:4027:3 (blink_heap_unittests+0x1248d0e)
    #1 WTF::MutexBase::lock() third_party/WebKit/Source/platform/wtf/ThreadingPthreads.cpp:145:16 (blink_heap_unittests+0x4de482e)
    #2 lock third_party/WebKit/Source/platform/wtf/ThreadingPrimitives.h:101:54 (blink_heap_unittests+0x137d641)
    #3 MutexLocker third_party/WebKit/Source/platform/wtf/ThreadingPrimitives.h:116 (blink_heap_unittests+0x137d641)
    #4 WakeWorkerThread third_party/WebKit/Source/platform/heap/HeapTest.cpp:5492 (blink_heap_unittests+0x137d641)
    #5 blink::HeapTest_CrossThreadWeakPersistent_Test::TestBody() third_party/WebKit/Source/platform/heap/HeapTest.cpp:6516 (blink_heap_unittests+0x137d641)
    #6 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15cc61d)
    #7 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2661:11 (blink_heap_unittests+0x15cd15d)
    #8 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2779:28 (blink_heap_unittests+0x15cd9a6)
    #9 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5036:43 (blink_heap_unittests+0x15ddf76)
    #10 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15dd87b)
    #11 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2314:46 (blink_heap_unittests+0x3a0a686)
    #12 base::TestSuite::Run() base/test/test_suite.cc:275 (blink_heap_unittests+0x3a0a686)
    #13 runHelper(base::TestSuite*) third_party/WebKit/Source/platform/heap/RunAllTests.cpp:49:27 (blink_heap_unittests+0x1454ad7)
    #14 Invoke<base::TestSuite *> base/bind_internal.h:402:12 (blink_heap_unittests+0x1454c34)
    #15 MakeItSo<int (*const &)(base::TestSuite *), base::TestSuite *> base/bind_internal.h:530 (blink_heap_unittests+0x1454c34)
    #16 RunImpl<int (*const &)(base::TestSuite *), const std::__1::tuple<base::internal::UnretainedWrapper<base::TestSuite> > &, 0> base/bind_internal.h:604 (blink_heap_unittests+0x1454c34)
    #17 base::internal::Invoker<base::internal::BindState<int (*)(base::TestSuite*), base::internal::UnretainedWrapper<base::TestSuite> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x1454c34)
    #18 Run base/callback.h:95:12 (blink_heap_unittests+0x3a0db70)
    #19 base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225 (blink_heap_unittests+0x3a0db70)
    #20 base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10 (blink_heap_unittests+0x3a0d983)
    #21 main third_party/WebKit/Source/platform/heap/RunAllTests.cpp:56:10 (blink_heap_unittests+0x1454bb7)
  Mutex M3504 previously acquired by the same thread here:
    #0 pthread_cond_wait /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1133:3 (blink_heap_unittests+0x122dc68)
    #1 WTF::ThreadCondition::Wait(WTF::Mutex&) third_party/WebKit/Source/platform/wtf/ThreadingPthreads.cpp:209:16 (blink_heap_unittests+0x4de4cc4)
    #2 ParkMainThread third_party/WebKit/Source/platform/heap/HeapTest.cpp:5469:25 (blink_heap_unittests+0x137d2ea)
    #3 blink::HeapTest_CrossThreadWeakPersistent_Test::TestBody() third_party/WebKit/Source/platform/heap/HeapTest.cpp:6502 (blink_heap_unittests+0x137d2ea)
    #4 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15cc61d)
    #5 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2661:11 (blink_heap_unittests+0x15cd15d)
    #6 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2779:28 (blink_heap_unittests+0x15cd9a6)
    #7 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5036:43 (blink_heap_unittests+0x15ddf76)
    #8 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15dd87b)
    #9 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2314:46 (blink_heap_unittests+0x3a0a686)
    #10 base::TestSuite::Run() base/test/test_suite.cc:275 (blink_heap_unittests+0x3a0a686)
    #11 runHelper(base::TestSuite*) third_party/WebKit/Source/platform/heap/RunAllTests.cpp:49:27 (blink_heap_unittests+0x1454ad7)
    #12 Invoke<base::TestSuite *> base/bind_internal.h:402:12 (blink_heap_unittests+0x1454c34)
    #13 MakeItSo<int (*const &)(base::TestSuite *), base::TestSuite *> base/bind_internal.h:530 (blink_heap_unittests+0x1454c34)
    #14 RunImpl<int (*const &)(base::TestSuite *), const std::__1::tuple<base::internal::UnretainedWrapper<base::TestSuite> > &, 0> base/bind_internal.h:604 (blink_heap_unittests+0x1454c34)
    #15 base::internal::Invoker<base::internal::BindState<int (*)(base::TestSuite*), base::internal::UnretainedWrapper<base::TestSuite> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x1454c34)
    #16 Run base/callback.h:95:12 (blink_heap_unittests+0x3a0db70)
    #17 base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225 (blink_heap_unittests+0x3a0db70)
    #18 base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10 (blink_heap_unittests+0x3a0d983)
    #19 main third_party/WebKit/Source/platform/heap/RunAllTests.cpp:56:10 (blink_heap_unittests+0x1454bb7)
  Thread T7 'Test Worker Thread' (tid=11878, running) created by main thread at:
    #0 pthread_create /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:965:3 (blink_heap_unittests+0x122d4c5)
    #1 base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:115:13 (blink_heap_unittests+0x39aeef6)
    #2 base::PlatformThread::CreateWithPriority(unsigned long, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:200:10 (blink_heap_unittests+0x39aedb5)
    #3 base::Thread::StartWithOptions(base::Thread::Options const&) base/threading/thread.cc:112:15 (blink_heap_unittests+0x39b2d85)
    #4 blink::scheduler::WebThreadImplForWorkerScheduler::WebThreadImplForWorkerScheduler(blink::WebThreadCreationParams const&) third_party/WebKit/Source/platform/scheduler/child/webthread_impl_for_worker_scheduler.cc:29:27 (blink_heap_unittests+0x2fee78b)
    #5 make_unique<blink::scheduler::WebThreadImplForWorkerScheduler, const blink::WebThreadCreationParams &> buildtools/third_party/libc++/trunk/include/memory:3079:32 (blink_heap_unittests+0x2fee3f0)
    #6 blink::scheduler::WebThreadBase::CreateWorkerThread(blink::WebThreadCreationParams const&) third_party/WebKit/Source/platform/scheduler/child/webthread_base.cc:131 (blink_heap_unittests+0x2fee3f0)
    #7 content::BlinkPlatformImpl::CreateThread(blink::WebThreadCreationParams const&) content/child/blink_platform_impl.cc:376:7 (blink_heap_unittests+0x4ddf30c)
    #8 blink::HeapTest_CrossThreadWeakPersistent_Test::TestBody() third_party/WebKit/Source/platform/heap/HeapTest.cpp:6494:67 (blink_heap_unittests+0x137d16b)
    #9 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15cc61d)
    #10 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2661:11 (blink_heap_unittests+0x15cd15d)
    #11 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2779:28 (blink_heap_unittests+0x15cd9a6)
    #12 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5036:43 (blink_heap_unittests+0x15ddf76)
    #13 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15dd87b)
    #14 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2314:46 (blink_heap_unittests+0x3a0a686)
    #15 base::TestSuite::Run() base/test/test_suite.cc:275 (blink_heap_unittests+0x3a0a686)
    #16 runHelper(base::TestSuite*) third_party/WebKit/Source/platform/heap/RunAllTests.cpp:49:27 (blink_heap_unittests+0x1454ad7)
    #17 Invoke<base::TestSuite *> base/bind_internal.h:402:12 (blink_heap_unittests+0x1454c34)
    #18 MakeItSo<int (*const &)(base::TestSuite *), base::TestSuite *> base/bind_internal.h:530 (blink_heap_unittests+0x1454c34)
    #19 RunImpl<int (*const &)(base::TestSuite *), const std::__1::tuple<base::internal::UnretainedWrapper<base::TestSuite> > &, 0> base/bind_internal.h:604 (blink_heap_unittests+0x1454c34)
    #20 base::internal::Invoker<base::internal::BindState<int (*)(base::TestSuite*), base::internal::UnretainedWrapper<base::TestSuite> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x1454c34)
    #21 Run base/callback.h:95:12 (blink_heap_unittests+0x3a0db70)
    #22 base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225 (blink_heap_unittests+0x3a0db70)
    #23 base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10 (blink_heap_unittests+0x3a0d983)
    #24 main third_party/WebKit/Source/platform/heap/RunAllTests.cpp:56:10 (blink_heap_unittests+0x1454bb7)









WARNING: ThreadSanitizer: data race (pid=11827)
  Write of size 8 at 0x7b0400004e00 by main thread:
    #0 operator delete(void*) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc:119:3 (blink_heap_unittests+0x129764d)
    #1 blink::(anonymous namespace)::ThreadedClearOnShutdownTester::~ThreadedClearOnShutdownTester() third_party/WebKit/Source/platform/heap/HeapTest.cpp:6583:7 (blink_heap_unittests+0x13ba399)
    #2 blink::ThreadedTesterBase::Test(blink::ThreadedTesterBase*) third_party/WebKit/Source/platform/heap/HeapTest.cpp:513:5 (blink_heap_unittests+0x138d209)
    #3 Test third_party/WebKit/Source/platform/heap/HeapTest.cpp:6587:5 (blink_heap_unittests+0x137fe28)
    #4 blink::HeapTest_TestClearOnShutdown_Test::TestBody() third_party/WebKit/Source/platform/heap/HeapTest.cpp:6684 (blink_heap_unittests+0x137fe28)
    #5 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15cc61d)
    #6 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2661:11 (blink_heap_unittests+0x15cd15d)
    #7 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2779:28 (blink_heap_unittests+0x15cd9a6)
    #8 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5036:43 (blink_heap_unittests+0x15ddf76)
    #9 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15dd87b)
    #10 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2314:46 (blink_heap_unittests+0x3a0a686)
    #11 base::TestSuite::Run() base/test/test_suite.cc:275 (blink_heap_unittests+0x3a0a686)
    #12 runHelper(base::TestSuite*) third_party/WebKit/Source/platform/heap/RunAllTests.cpp:49:27 (blink_heap_unittests+0x1454ad7)
    #13 Invoke<base::TestSuite *> base/bind_internal.h:402:12 (blink_heap_unittests+0x1454c34)
    #14 MakeItSo<int (*const &)(base::TestSuite *), base::TestSuite *> base/bind_internal.h:530 (blink_heap_unittests+0x1454c34)
    #15 RunImpl<int (*const &)(base::TestSuite *), const std::__1::tuple<base::internal::UnretainedWrapper<base::TestSuite> > &, 0> base/bind_internal.h:604 (blink_heap_unittests+0x1454c34)
    #16 base::internal::Invoker<base::internal::BindState<int (*)(base::TestSuite*), base::internal::UnretainedWrapper<base::TestSuite> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x1454c34)
    #17 Run base/callback.h:95:12 (blink_heap_unittests+0x3a0db70)
    #18 base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225 (blink_heap_unittests+0x3a0db70)
    #19 base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10 (blink_heap_unittests+0x3a0d983)
    #20 main third_party/WebKit/Source/platform/heap/RunAllTests.cpp:56:10 (blink_heap_unittests+0x1454bb7)

  Previous read of size 8 at 0x7b0400004e00 by thread T16:
    #0 blink::ThreadedTesterBase::ThreadFunc(void*) third_party/WebKit/Source/platform/heap/HeapTest.cpp:536:50 (blink_heap_unittests+0x138d2d9)
    #1 Invoke<blink::ThreadedTesterBase *> base/bind_internal.h:402:12 (blink_heap_unittests+0x138dae4)
    #2 MakeItSo<void (*const &)(void *), blink::ThreadedTesterBase *> base/bind_internal.h:530 (blink_heap_unittests+0x138dae4)
    #3 RunImpl<void (*const &)(void *), const std::__1::tuple<WTF::CrossThreadUnretainedWrapper<blink::ThreadedTesterBase> > &, 0> base/bind_internal.h:604 (blink_heap_unittests+0x138dae4)
    #4 base::internal::Invoker<base::internal::BindState<void (*)(void*), WTF::CrossThreadUnretainedWrapper<blink::ThreadedTesterBase> >, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x138dae4)
    #5 Run base/callback.h:135:12 (blink_heap_unittests+0x5244da5)
    #6 Run third_party/WebKit/Source/platform/wtf/Functional.h:320 (blink_heap_unittests+0x5244da5)
    #7 blink::(anonymous namespace)::RunCrossThreadClosure(WTF::CrossThreadFunction<void ()>) third_party/WebKit/Source/platform/WebTaskRunner.cpp:35 (blink_heap_unittests+0x5244da5)
    #8 Invoke<WTF::CrossThreadFunction<void ()> > base/bind_internal.h:402:12 (blink_heap_unittests+0x5245bb9)
    #9 MakeItSo<void (*)(WTF::CrossThreadFunction<void ()>), WTF::CrossThreadFunction<void ()> > base/bind_internal.h:530 (blink_heap_unittests+0x5245bb9)
    #10 RunImpl<void (*)(WTF::CrossThreadFunction<void ()>), std::__1::tuple<WTF::CrossThreadFunction<void ()> >, 0> base/bind_internal.h:604 (blink_heap_unittests+0x5245bb9)
    #11 base::internal::Invoker<base::internal::BindState<void (*)(WTF::CrossThreadFunction<void ()>), WTF::CrossThreadFunction<void ()> >, void ()>::RunOnce(base::internal::BindStateBase*) base/bind_internal.h:572 (blink_heap_unittests+0x5245bb9)
    #12 Run base/callback.h:95:12 (blink_heap_unittests+0x38f8074)
    #13 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:61 (blink_heap_unittests+0x38f8074)
    #14 blink::scheduler::internal::ThreadControllerImpl::DoWork(blink::scheduler::internal::SequencedTaskSource::WorkType) third_party/WebKit/Source/platform/scheduler/base/thread_controller_impl.cc:162:21 (blink_heap_unittests+0x2fd9415)
    #15 Invoke<const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::SequencedTaskSource::WorkType &> base/bind_internal.h:447:12 (blink_heap_unittests+0x2fdb952)
    #16 MakeItSo<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::SequencedTaskSource::WorkType), const base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl> &, const blink::scheduler::internal::SequencedTaskSource::WorkType &> base/bind_internal.h:550 (blink_heap_unittests+0x2fdb952)
    #17 RunImpl<void (blink::scheduler::internal::ThreadControllerImpl::*const &)(blink::scheduler::internal::SequencedTaskSource::WorkType), const std::__1::tuple<base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::SequencedTaskSource::WorkType> &, 0, 1> base/bind_internal.h:604 (blink_heap_unittests+0x2fdb952)
    #18 base::internal::Invoker<base::internal::BindState<void (blink::scheduler::internal::ThreadControllerImpl::*)(blink::scheduler::internal::SequencedTaskSource::WorkType), base::WeakPtr<blink::scheduler::internal::ThreadControllerImpl>, blink::scheduler::internal::SequencedTaskSource::WorkType>, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x2fdb952)
    #19 Run base/callback.h:95:12 (blink_heap_unittests+0x38f8074)
    #20 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:61 (blink_heap_unittests+0x38f8074)
    #21 base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19 (blink_heap_unittests+0x39321ae)
    #22 base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:391:25 (blink_heap_unittests+0x392f253)
    #23 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:403:5 (blink_heap_unittests+0x392f74c)
    #24 base::MessageLoop::DoWork() base/message_loop/message_loop.cc:447:16 (blink_heap_unittests+0x392fae5)
    #25 base::MessagePumpDefault::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_default.cc:37:31 (blink_heap_unittests+0x39358e6)
    #26 base::MessageLoop::Run(bool) base/message_loop/message_loop.cc:342:12 (blink_heap_unittests+0x392e7c9)
    #27 non-virtual thunk to base::MessageLoop::Run(bool) base/message_loop/message_loop.cc (blink_heap_unittests+0x392e914)
    #28 base::RunLoop::Run() base/run_loop.cc:130:14 (blink_heap_unittests+0x396621f)
    #29 base::Thread::Run(base::RunLoop*) base/threading/thread.cc:255:13 (blink_heap_unittests+0x39b351b)
    #30 base::Thread::ThreadMain() base/threading/thread.cc:338:3 (blink_heap_unittests+0x39b3b71)
    #31 base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:76:13 (blink_heap_unittests+0x39af448)

  Thread T16 'blink gc testing thread' (tid=11852, running) created by main thread at:
    #0 pthread_create /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:965:3 (blink_heap_unittests+0x122d4c5)
    #1 base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:115:13 (blink_heap_unittests+0x39aeef6)
    #2 base::PlatformThread::CreateWithPriority(unsigned long, base::PlatformThread::Delegate*, base::PlatformThreadHandle*, base::ThreadPriority) base/threading/platform_thread_posix.cc:200:10 (blink_heap_unittests+0x39aedb5)
    #3 base::Thread::StartWithOptions(base::Thread::Options const&) base/threading/thread.cc:112:15 (blink_heap_unittests+0x39b2d85)
    #4 blink::scheduler::WebThreadImplForWorkerScheduler::WebThreadImplForWorkerScheduler(blink::WebThreadCreationParams const&) third_party/WebKit/Source/platform/scheduler/child/webthread_impl_for_worker_scheduler.cc:29:27 (blink_heap_unittests+0x2fee78b)
    #5 make_unique<blink::scheduler::WebThreadImplForWorkerScheduler, const blink::WebThreadCreationParams &> buildtools/third_party/libc++/trunk/include/memory:3079:32 (blink_heap_unittests+0x2fee3f0)
    #6 blink::scheduler::WebThreadBase::CreateWorkerThread(blink::WebThreadCreationParams const&) third_party/WebKit/Source/platform/scheduler/child/webthread_base.cc:131 (blink_heap_unittests+0x2fee3f0)
    #7 content::BlinkPlatformImpl::CreateThread(blink::WebThreadCreationParams const&) content/child/blink_platform_impl.cc:376:7 (blink_heap_unittests+0x4ddf30c)
    #8 blink::ThreadedTesterBase::Test(blink::ThreadedTesterBase*) third_party/WebKit/Source/platform/heap/HeapTest.cpp:503:46 (blink_heap_unittests+0x138cf54)
    #9 Test third_party/WebKit/Source/platform/heap/HeapTest.cpp:6587:5 (blink_heap_unittests+0x137fe28)
    #10 blink::HeapTest_TestClearOnShutdown_Test::TestBody() third_party/WebKit/Source/platform/heap/HeapTest.cpp:6684 (blink_heap_unittests+0x137fe28)
    #11 testing::Test::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15cc61d)
    #12 testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2661:11 (blink_heap_unittests+0x15cd15d)
    #13 testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2779:28 (blink_heap_unittests+0x15cd9a6)
    #14 testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:5036:43 (blink_heap_unittests+0x15ddf76)
    #15 testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc (blink_heap_unittests+0x15dd87b)
    #16 RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2314:46 (blink_heap_unittests+0x3a0a686)
    #17 base::TestSuite::Run() base/test/test_suite.cc:275 (blink_heap_unittests+0x3a0a686)
    #18 runHelper(base::TestSuite*) third_party/WebKit/Source/platform/heap/RunAllTests.cpp:49:27 (blink_heap_unittests+0x1454ad7)
    #19 Invoke<base::TestSuite *> base/bind_internal.h:402:12 (blink_heap_unittests+0x1454c34)
    #20 MakeItSo<int (*const &)(base::TestSuite *), base::TestSuite *> base/bind_internal.h:530 (blink_heap_unittests+0x1454c34)
    #21 RunImpl<int (*const &)(base::TestSuite *), const std::__1::tuple<base::internal::UnretainedWrapper<base::TestSuite> > &, 0> base/bind_internal.h:604 (blink_heap_unittests+0x1454c34)
    #22 base::internal::Invoker<base::internal::BindState<int (*)(base::TestSuite*), base::internal::UnretainedWrapper<base::TestSuite> >, int ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:586 (blink_heap_unittests+0x1454c34)
    #23 Run base/callback.h:95:12 (blink_heap_unittests+0x3a0db70)
    #24 base::(anonymous namespace)::LaunchUnitTestsInternal(base::OnceCallback<int ()>, unsigned long, int, bool, base::OnceCallback<void ()>) base/test/launcher/unit_test_launcher.cc:225 (blink_heap_unittests+0x3a0db70)
    #25 base::LaunchUnitTests(int, char**, base::OnceCallback<int ()>) base/test/launcher/unit_test_launcher.cc:576:10 (blink_heap_unittests+0x3a0d983)
    #26 main third_party/WebKit/Source/platform/heap/RunAllTests.cpp:56:10 (blink_heap_unittests+0x1454bb7)
 

Comment 1 by bugdroid1@chromium.org, Apr 12 2018

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

commit d3695968a8414ad39402dd8c275e53155d170023
Author: Nico Weber <thakis@chromium.org>
Date: Thu Apr 12 03:33:46 2018

Remove many chromium.memory exceptions.

If we run tests on the main waterfall, we generally should run them
on the memory waterfall as well.

I filed bugs and added comments to those for the few tests that
actually don't pass on the memory waterfall. Most do pass.

Bug: 814403,831667,831674,831676,830653
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I0ea3cf12745f089d7fb87da8fc20e2665d86d53f
Reviewed-on: https://chromium-review.googlesource.com/987916
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550005}
[modify] https://crrev.com/d3695968a8414ad39402dd8c275e53155d170023/testing/buildbot/chromium.memory.json
[modify] https://crrev.com/d3695968a8414ad39402dd8c275e53155d170023/testing/buildbot/test_suite_exceptions.pyl
[modify] https://crrev.com/d3695968a8414ad39402dd8c275e53155d170023/ui/gl/gl_context_glx_unittest.cc
[modify] https://crrev.com/d3695968a8414ad39402dd8c275e53155d170023/ui/gl/gl_image_shared_memory_unittest.cc

Comment 2 by mlippautz@chromium.org, May 21 2018

Status: Available (was: Untriaged)

Comment 3 by thakis@chromium.org, Jun 18 2018

haraken: Who can look at this?

Comment 4 by haraken@chromium.org, Jun 19 2018

Owner: keishi@chromium.org

Comment 5 by thakis@chromium.org, Jun 29 2018

keishi, any updates?

Comment 6 by keishi@chromium.org, Jun 30 2018

I am fixing the data races:
https://chromium-review.googlesource.com/c/chromium/src/+/1121666

But the lock-order-inversion warnings do not seem to be actual dead locks. I'll need to think about how not to upset tsan.

Comment 7 by bugdroid1@chromium.org, Jun 30 2018

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

commit fc711979320f5229d13c40558ee4cf8a2c622575
Author: Keishi Hattori <keishi@chromium.org>
Date: Sat Jun 30 14:15:42 2018

Oilpan: Fix data races in HeapTest

Fixes data races TSan found in HeapTest

Bug: 831674
Change-Id: Id2d347483a9339d201554862799a4528b542230e
Reviewed-on: https://chromium-review.googlesource.com/1121666
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Keishi Hattori <keishi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571774}
[modify] https://crrev.com/fc711979320f5229d13c40558ee4cf8a2c622575/third_party/blink/renderer/platform/heap/heap_test.cc

Comment 8 by benhenry@chromium.org, Aug 2

Status: Assigned (was: Available)

Comment 9 by thakis@chromium.org, Dec 14

Owner: thakis@chromium.org
Status: Started (was: Assigned)
I'll disable the two failing tests and enable the suite on tsan. issue 915200 tracks the two remaining failures.

Comment 10 by bugdroid1@chromium.org, Dec 14

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

commit f8ab18bbd3fa087a3fdd0eb76353eca1a8ffa441
Author: Nico Weber <thakis@chromium.org>
Date: Fri Dec 14 13:32:59 2018

Disable the two blink_heap_unittests that fail under tsan and run suite on tsan bot.

Disables HeapTest.CrossThreadWeakPersistent and HeapTest.ThreadedStrongification
under TSan.

Bug: 843511,915200,831674, 913704 
Change-Id: I6ab71b83fa937f739a57452a97bd43ef6375bf2c
Reviewed-on: https://chromium-review.googlesource.com/c/1377517
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616652}
[modify] https://crrev.com/f8ab18bbd3fa087a3fdd0eb76353eca1a8ffa441/testing/buildbot/chromium.memory.json
[modify] https://crrev.com/f8ab18bbd3fa087a3fdd0eb76353eca1a8ffa441/testing/buildbot/test_suite_exceptions.pyl
[modify] https://crrev.com/f8ab18bbd3fa087a3fdd0eb76353eca1a8ffa441/third_party/blink/renderer/platform/heap/heap_test.cc

Sign in to add a comment