Memory leaks in DiskCacheEntryTest.UseAfterBackendDestruction |
|||||||
Issue descriptionWhen I try to land https://chromium-review.googlesource.com/c/chromium/src/+/911952, linux_chromium_asan_rel_ng keeps complaining about memory leaks in DiskCacheEntryTest.UseAfterBackendDestruction: [ RUN ] DiskCacheEntryTest.UseAfterBackendDestruction [ OK ] DiskCacheEntryTest.UseAfterBackendDestruction (6 ms) [----------] 1 test from DiskCacheEntryTest (6 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test case ran. (7 ms total) [ PASSED ] 1 test. ================================================================= ==14636==ERROR: LeakSanitizer: detected memory leaks Direct leak of 296 byte(s) in 1 object(s) allocated from: #0 0x2090ef2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:92:3 #1 0xa29eac0 in disk_cache::BackendImpl::CreateEntryImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) net/disk_cache/blockfile/backend_impl.cc:608:7 #2 0xa29e2ec in disk_cache::BackendImpl::SyncCreateEntry(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, scoped_refptr<disk_cache::EntryImpl>*) net/disk_cache/blockfile/backend_impl.cc:380:12 #3 0xa2f68eb in disk_cache::BackendIO::ExecuteBackendOperation() net/disk_cache/blockfile/in_flight_backend_io.cc:257:27 #4 0xa2fe292 in Invoke<const scoped_refptr<disk_cache::BackendIO> &> base/bind_internal.h:211:12 #5 0xa2fe292 in MakeItSo<void (disk_cache::BackendIO::*const &)(), const scoped_refptr<disk_cache::BackendIO> &> base/bind_internal.h:294 #6 0xa2fe292 in RunImpl<void (disk_cache::BackendIO::*const &)(), const std::__1::tuple<scoped_refptr<disk_cache::BackendIO> > &, 0> base/bind_internal.h:368 #7 0xa2fe292 in base::internal::Invoker<base::internal::BindState<void (disk_cache::BackendIO::*)(), scoped_refptr<disk_cache::BackendIO> >, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:350 #8 0xaf53cdf in Run base/callback.h:65:12 #9 0xaf53cdf in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55 #10 0xaf4c7f1 in base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19 #11 0xaf43ecc in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:395:25 #12 0xaf45118 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:407:5 #13 0xaf45a56 in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:451:16 #14 0xaf5a4f0 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_libevent.cc:220:31 #15 0xaf427e8 in base::MessageLoop::Run(bool) base/message_loop/message_loop.cc:346:12 #16 0xafba43a in base::RunLoop::Run() base/run_loop.cc:133:14 #17 0xb05bf44 in base::Thread::Run(base::RunLoop*) base/threading/thread.cc:255:13 #18 0xb05ca7d in base::Thread::ThreadMain() base/threading/thread.cc:338:3 #19 0xb0405e2 in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:75:13 #20 0x7f1f5e816183 in start_thread /build/eglibc-ripdx6/eglibc-2.19/nptl/pthread_create.c:312 Indirect leak of 256 byte(s) in 1 object(s) allocated from: #0 0x2090ef2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:92:3 #1 0x316c894 in disk_cache::StorageBlock<disk_cache::EntryStore>::AllocateData() net/disk_cache/blockfile/storage_block-inl.h:182:13 #2 0xa2d360b in Data net/disk_cache/blockfile/storage_block-inl.h:100:5 #3 0xa2d360b in disk_cache::EntryImpl::CreateEntry(disk_cache::Addr, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int) net/disk_cache/blockfile/entry_impl.cc:419 #4 0xa29eb97 in disk_cache::BackendImpl::CreateEntryImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) net/disk_cache/blockfile/backend_impl.cc:611:21 #5 0xa29e2ec in disk_cache::BackendImpl::SyncCreateEntry(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, scoped_refptr<disk_cache::EntryImpl>*) net/disk_cache/blockfile/backend_impl.cc:380:12 #6 0xa2f68eb in disk_cache::BackendIO::ExecuteBackendOperation() net/disk_cache/blockfile/in_flight_backend_io.cc:257:27 #7 0xa2fe292 in Invoke<const scoped_refptr<disk_cache::BackendIO> &> base/bind_internal.h:211:12 #8 0xa2fe292 in MakeItSo<void (disk_cache::BackendIO::*const &)(), const scoped_refptr<disk_cache::BackendIO> &> base/bind_internal.h:294 #9 0xa2fe292 in RunImpl<void (disk_cache::BackendIO::*const &)(), const std::__1::tuple<scoped_refptr<disk_cache::BackendIO> > &, 0> base/bind_internal.h:368 #10 0xa2fe292 in base::internal::Invoker<base::internal::BindState<void (disk_cache::BackendIO::*)(), scoped_refptr<disk_cache::BackendIO> >, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:350 #11 0xaf53cdf in Run base/callback.h:65:12 #12 0xaf53cdf in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55 #13 0xaf4c7f1 in base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19 #14 0xaf43ecc in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:395:25 #15 0xaf45118 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:407:5 #16 0xaf45a56 in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:451:16 #17 0xaf5a4f0 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_libevent.cc:220:31 #18 0xaf427e8 in base::MessageLoop::Run(bool) base/message_loop/message_loop.cc:346:12 #19 0xafba43a in base::RunLoop::Run() base/run_loop.cc:133:14 #20 0xb05bf44 in base::Thread::Run(base::RunLoop*) base/threading/thread.cc:255:13 #21 0xb05ca7d in base::Thread::ThreadMain() base/threading/thread.cc:338:3 #22 0xb0405e2 in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:75:13 #23 0x7f1f5e816183 in start_thread /build/eglibc-ripdx6/eglibc-2.19/nptl/pthread_create.c:312 Indirect leak of 72 byte(s) in 1 object(s) allocated from: #0 0x2090ef2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:92:3 #1 0xafc297b in make_unique<base::SequenceCheckerImpl::Core> buildtools/third_party/libc++/trunk/include/memory:3079:28 #2 0xafc297b in base::SequenceCheckerImpl::CalledOnValidSequence() const base/sequence_checker_impl.cc:60 #3 0xaf3bc75 in base::internal::WeakReference::Flag::Invalidate() base/memory/weak_ptr.cc:20:3 #4 0xaf3c1e1 in Invalidate base/memory/weak_ptr.cc:63:12 #5 0xaf3c1e1 in base::internal::WeakReferenceOwner::~WeakReferenceOwner() base/memory/weak_ptr.cc:50 #6 0xa2f7e5c in disk_cache::InFlightBackendIO::~InFlightBackendIO() net/disk_cache/blockfile/in_flight_backend_io.cc:367:39 #7 0xa2971b3 in disk_cache::BackendImpl::~BackendImpl() net/disk_cache/blockfile/backend_impl.cc:224:1 #8 0xa297aed in disk_cache::BackendImpl::~BackendImpl() net/disk_cache/blockfile/backend_impl.cc:203:29 #9 0x32c8c54 in operator() buildtools/third_party/libc++/trunk/include/memory:2286:5 #10 0x32c8c54 in reset buildtools/third_party/libc++/trunk/include/memory:2599 #11 0x32c8c54 in DiskCacheEntryTest::UseAfterBackendDestruction() net/disk_cache/entry_unittest.cc:4171 #12 0x814f07c in testing::Test::Run() third_party/googletest/src/googletest/src/gtest-internal-inl.h #13 0x8151174 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2651:11 #14 0x8152526 in testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2769:28 #15 0x816b0f6 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:4644:43 #16 0x816a628 in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc #17 0xb8a0f98 in RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2300:46 #18 0xb8a0f98 in base::TestSuite::Run() base/test/test_suite.cc:272 #19 0xb8acb18 in Run base/callback.h:94:12 #20 0xb8acb18 in base::(anonymous namespace)::LaunchUnitTestsInternal(base::RepeatingCallback<int ()> const&, unsigned long, int, bool, base::RepeatingCallback<void ()> const&) base/test/launcher/unit_test_launcher.cc:220 #21 0xb8ac5ed in base::LaunchUnitTests(int, char**, base::RepeatingCallback<int ()> const&) base/test/launcher/unit_test_launcher.cc:558:10 #22 0x7237b64 in main net/test/run_all_unittests.cc:64:10 #23 0x7f1f5c078f44 in __libc_start_main /build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:287 Indirect leak of 72 byte(s) in 1 object(s) allocated from: #0 0x2090ef2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:92:3 #1 0xafc297b in make_unique<base::SequenceCheckerImpl::Core> buildtools/third_party/libc++/trunk/include/memory:3079:28 #2 0xafc297b in base::SequenceCheckerImpl::CalledOnValidSequence() const base/sequence_checker_impl.cc:60 #3 0xaf3c037 in IsValid base/memory/weak_ptr.cc:26:3 #4 0xaf3c037 in base::internal::WeakReference::is_valid() const base/memory/weak_ptr.cc:44 #5 0xa2d36f9 in get base/memory/weak_ptr.h:243:17 #6 0xa2d36f9 in operator-> base/memory/weak_ptr.h:251 #7 0xa2d36f9 in disk_cache::EntryImpl::CreateEntry(disk_cache::Addr, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int) net/disk_cache/blockfile/entry_impl.cc:423 #8 0xa29eb97 in disk_cache::BackendImpl::CreateEntryImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) net/disk_cache/blockfile/backend_impl.cc:611:21 #9 0xa29e2ec in disk_cache::BackendImpl::SyncCreateEntry(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, scoped_refptr<disk_cache::EntryImpl>*) net/disk_cache/blockfile/backend_impl.cc:380:12 #10 0xa2f68eb in disk_cache::BackendIO::ExecuteBackendOperation() net/disk_cache/blockfile/in_flight_backend_io.cc:257:27 #11 0xa2fe292 in Invoke<const scoped_refptr<disk_cache::BackendIO> &> base/bind_internal.h:211:12 #12 0xa2fe292 in MakeItSo<void (disk_cache::BackendIO::*const &)(), const scoped_refptr<disk_cache::BackendIO> &> base/bind_internal.h:294 #13 0xa2fe292 in RunImpl<void (disk_cache::BackendIO::*const &)(), const std::__1::tuple<scoped_refptr<disk_cache::BackendIO> > &, 0> base/bind_internal.h:368 #14 0xa2fe292 in base::internal::Invoker<base::internal::BindState<void (disk_cache::BackendIO::*)(), scoped_refptr<disk_cache::BackendIO> >, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:350 #15 0xaf53cdf in Run base/callback.h:65:12 #16 0xaf53cdf in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55 #17 0xaf4c7f1 in base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19 #18 0xaf43ecc in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:395:25 #19 0xaf45118 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:407:5 #20 0xaf45a56 in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:451:16 #21 0xaf5a4f0 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_libevent.cc:220:31 #22 0xaf427e8 in base::MessageLoop::Run(bool) base/message_loop/message_loop.cc:346:12 #23 0xafba43a in base::RunLoop::Run() base/run_loop.cc:133:14 #24 0xb05bf44 in base::Thread::Run(base::RunLoop*) base/threading/thread.cc:255:13 #25 0xb05ca7d in base::Thread::ThreadMain() base/threading/thread.cc:338:3 #26 0xb0405e2 in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:75:13 #27 0x7f1f5e816183 in start_thread /build/eglibc-ripdx6/eglibc-2.19/nptl/pthread_create.c:312 Indirect leak of 72 byte(s) in 1 object(s) allocated from: #0 0x2090ef2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:92:3 #1 0xaf3c3b6 in base::internal::WeakReferenceOwner::GetRef() const base/memory/weak_ptr.cc:56:13 #2 0xa2ab251 in base::WeakPtrFactory<disk_cache::BackendImpl>::GetWeakPtr() base/memory/weak_ptr.h:311:45 #3 0xa2ab094 in disk_cache::BackendImpl::GetWeakPtr() net/disk_cache/blockfile/backend_impl.cc:994:23 #4 0xa2cc3ea in disk_cache::EntryImpl::EntryImpl(disk_cache::BackendImpl*, disk_cache::Addr, bool) net/disk_cache/blockfile/entry_impl.cc:307:25 #5 0xa29eae9 in disk_cache::BackendImpl::CreateEntryImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) net/disk_cache/blockfile/backend_impl.cc:608:11 #6 0xa29e2ec in disk_cache::BackendImpl::SyncCreateEntry(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, scoped_refptr<disk_cache::EntryImpl>*) net/disk_cache/blockfile/backend_impl.cc:380:12 #7 0xa2f68eb in disk_cache::BackendIO::ExecuteBackendOperation() net/disk_cache/blockfile/in_flight_backend_io.cc:257:27 #8 0xa2fe292 in Invoke<const scoped_refptr<disk_cache::BackendIO> &> base/bind_internal.h:211:12 #9 0xa2fe292 in MakeItSo<void (disk_cache::BackendIO::*const &)(), const scoped_refptr<disk_cache::BackendIO> &> base/bind_internal.h:294 #10 0xa2fe292 in RunImpl<void (disk_cache::BackendIO::*const &)(), const std::__1::tuple<scoped_refptr<disk_cache::BackendIO> > &, 0> base/bind_internal.h:368 #11 0xa2fe292 in base::internal::Invoker<base::internal::BindState<void (disk_cache::BackendIO::*)(), scoped_refptr<disk_cache::BackendIO> >, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:350 #12 0xaf53cdf in Run base/callback.h:65:12 #13 0xaf53cdf in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55 #14 0xaf4c7f1 in base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19 #15 0xaf43ecc in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:395:25 #16 0xaf45118 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:407:5 #17 0xaf45a56 in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:451:16 #18 0xaf5a4f0 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_libevent.cc:220:31 #19 0xaf427e8 in base::MessageLoop::Run(bool) base/message_loop/message_loop.cc:346:12 #20 0xafba43a in base::RunLoop::Run() base/run_loop.cc:133:14 #21 0xb05bf44 in base::Thread::Run(base::RunLoop*) base/threading/thread.cc:255:13 #22 0xb05ca7d in base::Thread::ThreadMain() base/threading/thread.cc:338:3 #23 0xb0405e2 in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:75:13 #24 0x7f1f5e816183 in start_thread /build/eglibc-ripdx6/eglibc-2.19/nptl/pthread_create.c:312 Indirect leak of 72 byte(s) in 1 object(s) allocated from: #0 0x2090ef2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:92:3 #1 0xaf3c3b6 in base::internal::WeakReferenceOwner::GetRef() const base/memory/weak_ptr.cc:56:13 #2 0xa2fdc51 in base::WeakPtrFactory<disk_cache::InFlightBackendIO>::GetWeakPtr() base/memory/weak_ptr.h:311:45 #3 0xa2fda91 in disk_cache::InFlightBackendIO::GetWeakPtr() net/disk_cache/blockfile/in_flight_backend_io.cc:560:23 #4 0xa2a6621 in disk_cache::BackendImpl::GetBackgroundQueue() net/disk_cache/blockfile/backend_impl.cc:753:28 #5 0xa2dba01 in disk_cache::EntryImpl::OnEntryCreated(disk_cache::BackendImpl*) net/disk_cache/blockfile/entry_impl.cc:695:32 #6 0xa2f7a5a in disk_cache::BackendIO::OnDone(bool) net/disk_cache/blockfile/in_flight_backend_io.cc:81:43 #7 0xa2fd7f3 in disk_cache::InFlightBackendIO::OnOperationComplete(disk_cache::BackgroundIO*, bool) net/disk_cache/blockfile/in_flight_backend_io.cc:546:7 #8 0xa2fea5e in disk_cache::InFlightIO::InvokeCallback(disk_cache::BackgroundIO*, bool) net/disk_cache/blockfile/in_flight_io.cc:101:3 #9 0xa300a02 in Invoke<const scoped_refptr<disk_cache::BackgroundIO> &> base/bind_internal.h:211:12 #10 0xa300a02 in MakeItSo<void (disk_cache::BackgroundIO::*const &)(), const scoped_refptr<disk_cache::BackgroundIO> &> base/bind_internal.h:294 #11 0xa300a02 in RunImpl<void (disk_cache::BackgroundIO::*const &)(), const std::__1::tuple<scoped_refptr<disk_cache::BackgroundIO> > &, 0> base/bind_internal.h:368 #12 0xa300a02 in base::internal::Invoker<base::internal::BindState<void (disk_cache::BackgroundIO::*)(), scoped_refptr<disk_cache::BackgroundIO> >, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:350 #13 0xaf53cdf in Run base/callback.h:65:12 #14 0xaf53cdf in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55 #15 0xaf4c7f1 in base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19 #16 0xaf43ecc in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:395:25 #17 0xaf45118 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:407:5 #18 0xaf45a56 in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:451:16 #19 0xaf5a4f0 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_libevent.cc:220:31 #20 0xaf427e8 in base::MessageLoop::Run(bool) base/message_loop/message_loop.cc:346:12 #21 0xafba43a in base::RunLoop::Run() base/run_loop.cc:133:14 #22 0xad2b716 in net::internal::TestCompletionCallbackBaseInternal::WaitForResult() net/base/test_completion_callback.cc:27:16 #23 0xad43496 in WaitForResult net/base/test_completion_callback.h:68:41 #24 0xad43496 in GetResult net/base/test_completion_callback.h:75 #25 0xad43496 in DiskCacheTestWithCache::CreateEntry(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, disk_cache::Entry**) net/disk_cache/disk_cache_test_base.cc:153 #26 0x32c8a9b in DiskCacheEntryTest::UseAfterBackendDestruction() net/disk_cache/entry_unittest.cc:4170:3 #27 0x814f07c in testing::Test::Run() third_party/googletest/src/googletest/src/gtest-internal-inl.h #28 0x8151174 in testing::TestInfo::Run() third_party/googletest/src/googletest/src/gtest.cc:2651:11 #29 0x8152526 in testing::TestCase::Run() third_party/googletest/src/googletest/src/gtest.cc:2769:28 #30 0x816b0f6 in testing::internal::UnitTestImpl::RunAllTests() third_party/googletest/src/googletest/src/gtest.cc:4644:43 #31 0x816a628 in testing::UnitTest::Run() third_party/googletest/src/googletest/src/gtest.cc #32 0xb8a0f98 in RUN_ALL_TESTS third_party/googletest/src/googletest/include/gtest/gtest.h:2300:46 #33 0xb8a0f98 in base::TestSuite::Run() base/test/test_suite.cc:272 #34 0xb8acb18 in Run base/callback.h:94:12 #35 0xb8acb18 in base::(anonymous namespace)::LaunchUnitTestsInternal(base::RepeatingCallback<int ()> const&, unsigned long, int, bool, base::RepeatingCallback<void ()> const&) base/test/launcher/unit_test_launcher.cc:220 #36 0xb8ac5ed in base::LaunchUnitTests(int, char**, base::RepeatingCallback<int ()> const&) base/test/launcher/unit_test_launcher.cc:558:10 #37 0x7237b64 in main net/test/run_all_unittests.cc:64:10 Indirect leak of 36 byte(s) in 1 object(s) allocated from: #0 0x2090ef2 in operator new(unsigned long) /b/build/slave/linux_upload_clang/build/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cc:92:3 #1 0x316c5e7 in disk_cache::StorageBlock<disk_cache::RankingsNode>::AllocateData() net/disk_cache/blockfile/storage_block-inl.h:182:13 #2 0xa2d3651 in Data net/disk_cache/blockfile/storage_block-inl.h:100:5 #3 0xa2d3651 in disk_cache::EntryImpl::CreateEntry(disk_cache::Addr, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned int) net/disk_cache/blockfile/entry_impl.cc:420 #4 0xa29eb97 in disk_cache::BackendImpl::CreateEntryImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) net/disk_cache/blockfile/backend_impl.cc:611:21 #5 0xa29e2ec in disk_cache::BackendImpl::SyncCreateEntry(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, scoped_refptr<disk_cache::EntryImpl>*) net/disk_cache/blockfile/backend_impl.cc:380:12 #6 0xa2f68eb in disk_cache::BackendIO::ExecuteBackendOperation() net/disk_cache/blockfile/in_flight_backend_io.cc:257:27 #7 0xa2fe292 in Invoke<const scoped_refptr<disk_cache::BackendIO> &> base/bind_internal.h:211:12 #8 0xa2fe292 in MakeItSo<void (disk_cache::BackendIO::*const &)(), const scoped_refptr<disk_cache::BackendIO> &> base/bind_internal.h:294 #9 0xa2fe292 in RunImpl<void (disk_cache::BackendIO::*const &)(), const std::__1::tuple<scoped_refptr<disk_cache::BackendIO> > &, 0> base/bind_internal.h:368 #10 0xa2fe292 in base::internal::Invoker<base::internal::BindState<void (disk_cache::BackendIO::*)(), scoped_refptr<disk_cache::BackendIO> >, void ()>::Run(base::internal::BindStateBase*) base/bind_internal.h:350 #11 0xaf53cdf in Run base/callback.h:65:12 #12 0xaf53cdf in base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) base/debug/task_annotator.cc:55 #13 0xaf4c7f1 in base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) base/message_loop/incoming_task_queue.cc:124:19 #14 0xaf43ecc in base::MessageLoop::RunTask(base::PendingTask*) base/message_loop/message_loop.cc:395:25 #15 0xaf45118 in base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) base/message_loop/message_loop.cc:407:5 #16 0xaf45a56 in base::MessageLoop::DoWork() base/message_loop/message_loop.cc:451:16 #17 0xaf5a4f0 in base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) base/message_loop/message_pump_libevent.cc:220:31 #18 0xaf427e8 in base::MessageLoop::Run(bool) base/message_loop/message_loop.cc:346:12 #19 0xafba43a in base::RunLoop::Run() base/run_loop.cc:133:14 #20 0xb05bf44 in base::Thread::Run(base::RunLoop*) base/threading/thread.cc:255:13 #21 0xb05ca7d in base::Thread::ThreadMain() base/threading/thread.cc:338:3 #22 0xb0405e2 in base::(anonymous namespace)::ThreadFunc(void*) base/threading/platform_thread_posix.cc:75:13 #23 0x7f1f5e816183 in start_thread /build/eglibc-ripdx6/eglibc-2.19/nptl/pthread_create.c:312 SUMMARY: AddressSanitizer: 876 byte(s) leaked in 7 allocation(s).
,
Feb 12 2018
,
Feb 12 2018
,
Feb 12 2018
To record conversation, from context: I've added this test last week in: https://chromium-review.googlesource.com/c/chromium/src/+/908908/3/net/disk_cache/entry_unittest.cc so I suspect it's just imperfection of leak detection + your CL getting unlucky. My suggestion would be to disable UseAfterBackendDestruction only (but not the other 2 variants) to let you move on, and let me worry about it.
,
Feb 12 2018
I temporarily disable the test in https://chromium-review.googlesource.com/c/chromium/src/+/911952. Thanks.
,
Feb 12 2018
,
Mar 1 2018
@morlovich can you ptal as this disable reduces test coverage?
,
Mar 1 2018
I couldn't reproduce it, but may be worth another try. The test was also enabled all of 3 days (short 3 seconds).
,
Mar 15 2018
@morlovich Thanks for checking. Is the plan to just leave this test disabled?
,
Mar 27 2018
Probably, yes, since I still can't reproduce it, though I've had tough luck with getting lsan to do stuff, so maybe I am holding it wrong. This test was added for to all 3 cache backends after fixing a bug in one of them, and the disabled version isn't the one that had the bug, so I am not that stressed out over it being disabled.
,
Apr 10 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f2fdef49323d59e06d759c242edd93fb9a861885 commit f2fdef49323d59e06d759c242edd93fb9a861885 Author: Maks Orlovich <morlovich@chromium.org> Date: Tue Apr 10 19:05:25 2018 Remove disabled DiskCacheEntryTest.UseAfterBackendDestruction ... And make comments in disk_cache.h on ~Backend somewhat reflect the semantic drift of that API. It turns out that Blockfile isn't structured in a way that cleanly permits Close to run after backend destruction --- ~EntryImpl currently wants to be destroyed on the background thread (due to using a weak pointer from there), but access to that thread is owned by backend. Bug: 811276 Change-Id: Iab92fad91a33dc3d924139bc699671fd21d7a72f Reviewed-on: https://chromium-review.googlesource.com/999794 Reviewed-by: Josh Karlin <jkarlin@chromium.org> Commit-Queue: Maks Orlovich <morlovich@chromium.org> Cr-Commit-Position: refs/heads/master@{#549604} [modify] https://crrev.com/f2fdef49323d59e06d759c242edd93fb9a861885/net/disk_cache/disk_cache.h [modify] https://crrev.com/f2fdef49323d59e06d759c242edd93fb9a861885/net/disk_cache/entry_unittest.cc
,
Apr 10 2018
.. Or maybe WontFix --- the particular impl can't cleanly support some usage, but thankfully it doesn't matter (the other two sister tests do). |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by fayang@chromium.org
, Feb 12 2018