================================================================= ==70815==ERROR: AddressSanitizer: heap-use-after-free on address 0x60300023d448 at pc 0x000002a0ae59 bp 0x7f992221ef70 sp 0x7f992221ef68 READ of size 8 at 0x60300023d448 thread T35 #0 0x2a0ae58 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/shared_ptr_base.h:665:6 #1 0x2a0ae58 in std::__shared_ptr::~__shared_ptr() /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/shared_ptr_base.h:914 #2 0x2a0ae58 in std::_List_node >::~_List_node() /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_list.h:106 #3 0x2a0ae58 in void __gnu_cxx::new_allocator > >::destroy > >(std::_List_node >*) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/ext/new_allocator.h:124 #4 0x2a0ae58 in std::list, std::allocator > >::_M_erase(std::_List_iterator >) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_list.h:1700 #5 0x2a0ae58 in std::list, std::allocator > >::erase(std::_List_const_iterator >) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/list.tcc:154 #6 0x2a0ae58 in mongo::executor::ThreadPoolTaskExecutor::runCallback(std::shared_ptr) /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:471 #7 0x2a0bfe4 in mongo::executor::ThreadPoolTaskExecutor::scheduleIntoPool_inlock(std::list, std::allocator > >*, std::_List_iterator > const&, std::_List_iterator > const&, std::unique_lock)::$_4::operator()() const /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:454:58 #8 0x2a0bfe4 in std::_Function_handler, std::allocator > >*, std::_List_iterator > const&, std::_List_iterator > const&, std::unique_lock)::$_4>::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2039 #9 0x29f0f3e in std::function::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2439:14 #10 0x29f0f3e in mongo::executor::NetworkInterfaceThreadPool::consumeTasks(std::unique_lock) /data/mci/src/src/mongo/executor/network_interface_thread_pool.cpp:159 #11 0x29f1e15 in mongo::executor::NetworkInterfaceThreadPool::schedule(std::function) /data/mci/src/src/mongo/executor/network_interface_thread_pool.cpp:112:9 #12 0x2a08775 in mongo::executor::ThreadPoolTaskExecutor::scheduleIntoPool_inlock(std::list, std::allocator > >*, std::_List_iterator > const&, std::_List_iterator > const&, std::unique_lock) /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:454:24 #13 0x2a0787b in mongo::executor::ThreadPoolTaskExecutor::scheduleIntoPool_inlock(std::list, std::allocator > >*, std::_List_iterator > const&, std::unique_lock) /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:440:5 #14 0x2a120ae in mongo::executor::ThreadPoolTaskExecutor::scheduleWorkAt(mongo::Date_t, std::function const&)::$_0::operator()() const /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:262:24 #15 0x2a120ae in std::_Function_handler const&)::$_0>::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2039 #16 0x298169d in std::function::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2439:14 #17 0x298169d in mongo::executor::NetworkInterfaceASIO::setAlarm(mongo::Date_t, std::function const&)::$_2::operator()(std::error_code) const /data/mci/src/src/mongo/executor/network_interface_asio.cpp:390 #18 0x298169d in asio::detail::binder1 const&)::$_2, std::error_code>::operator()() /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/bind_handler.hpp:62 #19 0x298169d in void asio::asio_handler_invoke const&)::$_2, std::error_code> >(asio::detail::binder1 const&)::$_2, std::error_code>&, ...) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/handler_invoke_hook.hpp:68 #20 0x298169d in void asio_handler_invoke_helpers::invoke const&)::$_2, std::error_code>, mongo::executor::NetworkInterfaceASIO::setAlarm(mongo::Date_t, std::function const&)::$_2>(asio::detail::binder1 const&)::$_2, std::error_code>&, mongo::executor::NetworkInterfaceASIO::setAlarm(mongo::Date_t, std::function const&)::$_2&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/handler_invoke_helpers.hpp:37 #21 0x298169d in void asio::detail::handler_work const&)::$_2, asio::system_executor>::complete const&)::$_2, std::error_code> >(asio::detail::binder1 const&)::$_2, std::error_code>&, mongo::executor::NetworkInterfaceASIO::setAlarm(mongo::Date_t, std::function const&)::$_2&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/handler_work.hpp:81 #22 0x298169d in asio::detail::wait_handler const&)::$_2>::do_complete(void*, asio::detail::scheduler_operation*, std::error_code const&, unsigned long) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/wait_handler.hpp:71 #23 0x31b0ba2 in asio::detail::scheduler_operation::complete(void*, std::error_code const&, unsigned long) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/scheduler_operation.hpp:39:5 #24 0x31b0ba2 in asio::detail::scheduler::do_run_one(asio::detail::scoped_lock&, asio::detail::scheduler_thread_info&, std::error_code const&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/impl/scheduler.ipp:369 #25 0x31965cd in asio::detail::scheduler::run(std::error_code&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/impl/scheduler.ipp:146:10 #26 0x31962a2 in asio::io_service::run() /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/io_service.ipp:60:19 #27 0x298a89f in mongo::executor::NetworkInterfaceASIO::startup()::$_0::operator()() const /data/mci/src/src/mongo/executor/network_interface_asio.cpp:149:17 #28 0x298a89f in void std::_Bind_simple::_M_invoke<>(std::_Index_tuple<>) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:1699 #29 0x298a89f in std::_Bind_simple::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:1688 #30 0x298a89f in std::thread::_Impl >::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/thread:115 #31 0x7f993dcc8dcf (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbadcf) #32 0x7f993df250a4 in start_thread /build/buildd/glibc-2.19/nptl/pthread_create.c:309 #33 0x7f993d72ccfc in clone /build/buildd/glibc-2.19/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:111 0x60300023d448 is located 24 bytes inside of 32-byte region [0x60300023d430,0x60300023d450) freed by thread T35 here: #0 0xb7358b in operator delete(void*) (/data/mci/src/mongod+0xb7358b) #1 0x2a0a51a in __gnu_cxx::new_allocator > >::deallocate(std::_List_node >*, unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/ext/new_allocator.h:110:9 #2 0x2a0a51a in std::_List_base, std::allocator > >::_M_put_node(std::_List_node >*) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_list.h:347 #3 0x2a0a51a in std::list, std::allocator > >::_M_erase(std::_List_iterator >) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_list.h:1704 #4 0x2a0a51a in std::list, std::allocator > >::erase(std::_List_const_iterator >) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/list.tcc:154 #5 0x2a0a51a in mongo::executor::ThreadPoolTaskExecutor::runCallback(std::shared_ptr) /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:471 #6 0x2a0bfe4 in mongo::executor::ThreadPoolTaskExecutor::scheduleIntoPool_inlock(std::list, std::allocator > >*, std::_List_iterator > const&, std::_List_iterator > const&, std::unique_lock)::$_4::operator()() const /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:454:58 #7 0x2a0bfe4 in std::_Function_handler, std::allocator > >*, std::_List_iterator > const&, std::_List_iterator > const&, std::unique_lock)::$_4>::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2039 #8 0x29f0f3e in std::function::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2439:14 #9 0x29f0f3e in mongo::executor::NetworkInterfaceThreadPool::consumeTasks(std::unique_lock) /data/mci/src/src/mongo/executor/network_interface_thread_pool.cpp:159 #10 0x29f1e15 in mongo::executor::NetworkInterfaceThreadPool::schedule(std::function) /data/mci/src/src/mongo/executor/network_interface_thread_pool.cpp:112:9 #11 0x2a08775 in mongo::executor::ThreadPoolTaskExecutor::scheduleIntoPool_inlock(std::list, std::allocator > >*, std::_List_iterator > const&, std::_List_iterator > const&, std::unique_lock) /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:454:24 #12 0x2a0787b in mongo::executor::ThreadPoolTaskExecutor::scheduleIntoPool_inlock(std::list, std::allocator > >*, std::_List_iterator > const&, std::unique_lock) /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:440:5 #13 0x2a120ae in mongo::executor::ThreadPoolTaskExecutor::scheduleWorkAt(mongo::Date_t, std::function const&)::$_0::operator()() const /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:262:24 #14 0x2a120ae in std::_Function_handler const&)::$_0>::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2039 #15 0x298169d in std::function::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2439:14 #16 0x298169d in mongo::executor::NetworkInterfaceASIO::setAlarm(mongo::Date_t, std::function const&)::$_2::operator()(std::error_code) const /data/mci/src/src/mongo/executor/network_interface_asio.cpp:390 #17 0x298169d in asio::detail::binder1 const&)::$_2, std::error_code>::operator()() /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/bind_handler.hpp:62 #18 0x298169d in void asio::asio_handler_invoke const&)::$_2, std::error_code> >(asio::detail::binder1 const&)::$_2, std::error_code>&, ...) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/handler_invoke_hook.hpp:68 #19 0x298169d in void asio_handler_invoke_helpers::invoke const&)::$_2, std::error_code>, mongo::executor::NetworkInterfaceASIO::setAlarm(mongo::Date_t, std::function const&)::$_2>(asio::detail::binder1 const&)::$_2, std::error_code>&, mongo::executor::NetworkInterfaceASIO::setAlarm(mongo::Date_t, std::function const&)::$_2&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/handler_invoke_helpers.hpp:37 #20 0x298169d in void asio::detail::handler_work const&)::$_2, asio::system_executor>::complete const&)::$_2, std::error_code> >(asio::detail::binder1 const&)::$_2, std::error_code>&, mongo::executor::NetworkInterfaceASIO::setAlarm(mongo::Date_t, std::function const&)::$_2&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/handler_work.hpp:81 #21 0x298169d in asio::detail::wait_handler const&)::$_2>::do_complete(void*, asio::detail::scheduler_operation*, std::error_code const&, unsigned long) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/wait_handler.hpp:71 #22 0x31b0ba2 in asio::detail::scheduler_operation::complete(void*, std::error_code const&, unsigned long) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/scheduler_operation.hpp:39:5 #23 0x31b0ba2 in asio::detail::scheduler::do_run_one(asio::detail::scoped_lock&, asio::detail::scheduler_thread_info&, std::error_code const&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/impl/scheduler.ipp:369 #24 0x31965cd in asio::detail::scheduler::run(std::error_code&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/impl/scheduler.ipp:146:10 #25 0x31962a2 in asio::io_service::run() /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/io_service.ipp:60:19 #26 0x298a89f in mongo::executor::NetworkInterfaceASIO::startup()::$_0::operator()() const /data/mci/src/src/mongo/executor/network_interface_asio.cpp:149:17 #27 0x298a89f in void std::_Bind_simple::_M_invoke<>(std::_Index_tuple<>) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:1699 #28 0x298a89f in std::_Bind_simple::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:1688 #29 0x298a89f in std::thread::_Impl >::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/thread:115 #30 0x7f993dcc8dcf (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbadcf) previously allocated by thread T35 here: #0 0xb7304b in operator new(unsigned long) (/data/mci/src/mongod+0xb7304b) #1 0x29ff586 in __gnu_cxx::new_allocator > >::allocate(unsigned long, void const*) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/ext/new_allocator.h:104:27 #2 0x29ff586 in std::_List_base, std::allocator > >::_M_get_node() /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_list.h:343 #3 0x29ff586 in std::_List_node >* std::list, std::allocator > >::_M_create_node >(std::shared_ptr&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_list.h:511 #4 0x29ff586 in void std::list, std::allocator > >::_M_insert >(std::_List_iterator >, std::shared_ptr&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_list.h:1688 #5 0x29ff586 in void std::list, std::allocator > >::emplace_front >(std::shared_ptr&&) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_list.h:998 #6 0x29ff586 in mongo::executor::ThreadPoolTaskExecutor::makeSingletonWorkQueue(std::function, mongo::Date_t) /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:409 #7 0x2a02692 in mongo::executor::ThreadPoolTaskExecutor::scheduleWorkAt(mongo::Date_t, std::function const&) /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:246:15 #8 0x22de6ca in mongo::repl::Reporter::_processResponseCallback(mongo::executor::TaskExecutor::RemoteCommandCallbackArgs const&) /data/mci/src/src/mongo/db/repl/reporter.cpp:292:17 #9 0x2a0ffa9 in std::function::operator()(mongo::executor::TaskExecutor::RemoteCommandCallbackArgs const&) const /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2439:14 #10 0x2a0ffa9 in mongo::executor::(anonymous namespace)::remoteCommandFinished(mongo::executor::TaskExecutor::CallbackArgs const&, std::function const&, mongo::executor::RemoteCommandRequest const&, mongo::StatusWith const&) /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:280 #11 0x2a0ffa9 in mongo::executor::ThreadPoolTaskExecutor::scheduleRemoteCommand(mongo::executor::RemoteCommandRequest const&, std::function const&)::$_2::operator()(mongo::StatusWith const&) const::{lambda(mongo::executor::TaskExecutor::CallbackArgs const&)#1}::operator()(mongo::executor::TaskExecutor::CallbackArgs const&) const /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:330 #12 0x2a0ffa9 in std::_Function_handler const&)::$_2::operator()(mongo::StatusWith const&) const::{lambda(mongo::executor::TaskExecutor::CallbackArgs const&)#1}>::_M_invoke(std::_Any_data const&, mongo::executor::TaskExecutor::CallbackArgs const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2039 #13 0x2a0a29d in std::function::operator()(mongo::executor::TaskExecutor::CallbackArgs const&) const /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2439:14 #14 0x2a0a29d in mongo::executor::ThreadPoolTaskExecutor::runCallback(std::shared_ptr) /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:468 #15 0x2a0bfe4 in mongo::executor::ThreadPoolTaskExecutor::scheduleIntoPool_inlock(std::list, std::allocator > >*, std::_List_iterator > const&, std::_List_iterator > const&, std::unique_lock)::$_4::operator()() const /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:454:58 #16 0x2a0bfe4 in std::_Function_handler, std::allocator > >*, std::_List_iterator > const&, std::_List_iterator > const&, std::unique_lock)::$_4>::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2039 #17 0x29f0f3e in std::function::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2439:14 #18 0x29f0f3e in mongo::executor::NetworkInterfaceThreadPool::consumeTasks(std::unique_lock) /data/mci/src/src/mongo/executor/network_interface_thread_pool.cpp:159 #19 0x29f1e15 in mongo::executor::NetworkInterfaceThreadPool::schedule(std::function) /data/mci/src/src/mongo/executor/network_interface_thread_pool.cpp:112:9 #20 0x2a08775 in mongo::executor::ThreadPoolTaskExecutor::scheduleIntoPool_inlock(std::list, std::allocator > >*, std::_List_iterator > const&, std::_List_iterator > const&, std::unique_lock) /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:454:24 #21 0x2a0787b in mongo::executor::ThreadPoolTaskExecutor::scheduleIntoPool_inlock(std::list, std::allocator > >*, std::_List_iterator > const&, std::unique_lock) /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:440:5 #22 0x2a0e06a in mongo::executor::ThreadPoolTaskExecutor::scheduleRemoteCommand(mongo::executor::RemoteCommandRequest const&, std::function const&)::$_2::operator()(mongo::StatusWith const&) const /data/mci/src/src/mongo/executor/thread_pool_task_executor.cpp:340:13 #23 0x2a0e06a in std::_Function_handler const&), mongo::executor::ThreadPoolTaskExecutor::scheduleRemoteCommand(mongo::executor::RemoteCommandRequest const&, std::function const&)::$_2>::_M_invoke(std::_Any_data const&, mongo::StatusWith const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2039 #24 0x29da770 in std::function const&)>::operator()(mongo::StatusWith const&) const /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2439:14 #25 0x29da770 in mongo::executor::NetworkInterfaceASIO::AsyncOp::finish(mongo::StatusWith const&) /data/mci/src/src/mongo/executor/network_interface_asio_operation.cpp:247 #26 0x29a9870 in mongo::executor::NetworkInterfaceASIO::_completeOperation(mongo::executor::NetworkInterfaceASIO::AsyncOp*, mongo::StatusWith const&) /data/mci/src/src/mongo/executor/network_interface_asio_command.cpp:297:5 #27 0x29adbdf in mongo::executor::NetworkInterfaceASIO::_completedOpCallback(mongo::executor::NetworkInterfaceASIO::AsyncOp*) /data/mci/src/src/mongo/executor/network_interface_asio_command.cpp:257:5 #28 0x29bd27b in mongo::executor::NetworkInterfaceASIO::_beginCommunication(mongo::executor::NetworkInterfaceASIO::AsyncOp*)::$_3::operator()(std::error_code, unsigned long) const::{lambda()#1}::operator()() const /data/mci/src/src/mongo/executor/network_interface_asio_command.cpp:251:65 #29 0x29bd27b in void mongo::executor::NetworkInterfaceASIO::_validateAndRun(mongo::executor::NetworkInterfaceASIO::AsyncOp*, std::error_code, mongo::executor::NetworkInterfaceASIO::_beginCommunication(mongo::executor::NetworkInterfaceASIO::AsyncOp*)::$_3::operator()(std::error_code, unsigned long) const::{lambda()#1}&&) /data/mci/src/src/mongo/executor/network_interface_asio.h:455 #30 0x29bd27b in mongo::executor::NetworkInterfaceASIO::_beginCommunication(mongo::executor::NetworkInterfaceASIO::AsyncOp*)::$_3::operator()(std::error_code, unsigned long) const /data/mci/src/src/mongo/executor/network_interface_asio_command.cpp:251 #31 0x29bd27b in std::_Function_handler::_M_invoke(std::_Any_data const&, std::error_code, unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:2039 #32 0x2909a5c in void asio_handler_invoke_helpers::invoke&, std::error_code, unsigned long>, std::function >(asio::detail::binder2&, std::error_code, unsigned long>&, std::function&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/handler_invoke_helpers.hpp:37:3 #33 0x2909a5c in void asio::detail::asio_handler_invoke&, std::error_code, unsigned long>, std::function&, std::error_code, unsigned long>(asio::detail::binder2&, std::error_code, unsigned long>&, asio::detail::binder2&, std::error_code, unsigned long>*) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/bind_handler.hpp:203 #34 0x2909a5c in void asio_handler_invoke_helpers::invoke&, std::error_code, unsigned long>, asio::detail::binder2&, std::error_code, unsigned long> >(asio::detail::binder2&, std::error_code, unsigned long>&, asio::detail::binder2&, std::error_code, unsigned long>&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/handler_invoke_helpers.hpp:37 #35 0x2909a5c in void asio::detail::strand_service::dispatch&, std::error_code, unsigned long> >(asio::detail::strand_service::strand_impl*&, asio::detail::binder2&, std::error_code, unsigned long>&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/impl/strand_service.hpp:61 #36 0x2932ea1 in asio::async_result&, std::error_code, unsigned long>, void (), void>::type>::type asio::io_service::strand::dispatch&, std::error_code, unsigned long> >(asio::detail::binder2&, std::error_code, unsigned long>&&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/io_service_strand.hpp:207:5 #37 0x2932ea1 in void asio::detail::wrapped_handler, asio::detail::is_continuation_if_running>::operator()(std::error_code const&, unsigned long const&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/wrapped_handler.hpp:98 #38 0x2932ea1 in asio::detail::read_op >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >::operator()(std::error_code const&, unsigned long, int) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/read.hpp:351 #39 0x2934fdc in void asio_handler_invoke_helpers::invoke >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >, std::function >(asio::detail::rewrapped_handler >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >&, std::function&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/handler_invoke_helpers.hpp:37:3 #40 0x2934fdc in void asio::detail::asio_handler_invoke >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >, asio::detail::binder2 >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >(asio::detail::rewrapped_handler >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >&, asio::detail::rewrapped_handler >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >*) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/wrapped_handler.hpp:274 #41 0x2934fdc in void asio_handler_invoke_helpers::invoke >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >, asio::detail::rewrapped_handler >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function > >(asio::detail::rewrapped_handler >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >&, asio::detail::rewrapped_handler >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/handler_invoke_helpers.hpp:37 #42 0x2934fdc in void asio::detail::handler_work >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >, asio::system_executor>::complete >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function > >(asio::detail::rewrapped_handler >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >&, asio::detail::rewrapped_handler >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/handler_work.hpp:81 #43 0x2934fdc in asio::detail::completion_handler >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function > >::do_complete(void*, asio::detail::scheduler_operation*, std::error_code const&, unsigned long) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/completion_handler.hpp:69 #44 0x29349a4 in void asio::detail::strand_service::dispatch >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function > >(asio::detail::strand_service::strand_impl*&, asio::detail::rewrapped_handler >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/impl/strand_service.hpp:86:5 #45 0x2933c3e in asio::async_result >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >, void (), void>::type>::type asio::io_service::strand::dispatch >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function > >(asio::detail::rewrapped_handler >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, std::function >&&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/io_service_strand.hpp:207:5 #46 0x2933c3e in void asio::detail::asio_handler_invoke >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, asio::io_service::strand, std::function, asio::detail::is_continuation_if_running>(asio::detail::binder2 >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>&, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running>*) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/wrapped_handler.hpp:231 #47 0x29339f7 in void asio_handler_invoke_helpers::invoke >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >(asio::detail::binder2 >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>&, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running>&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/handler_invoke_helpers.hpp:37:3 #48 0x29339f7 in void asio::detail::asio_handler_invoke >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, asio::basic_stream_socket >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >(asio::detail::binder2 >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>&, asio::detail::read_op >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >*) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/read.hpp:571 #49 0x29339f7 in void asio_handler_invoke_helpers::invoke >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>, asio::detail::read_op >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> > >(asio::detail::binder2 >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>&, asio::detail::read_op >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/handler_invoke_helpers.hpp:37 #50 0x29339f7 in void asio::detail::handler_work >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, asio::system_executor>::complete >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long> >(asio::detail::binder2 >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >, std::error_code, unsigned long>&, asio::detail::read_op >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> >&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/handler_work.hpp:81 #51 0x29339f7 in asio::detail::reactive_socket_recv_op >, asio::mutable_buffers_1, asio::detail::transfer_all_t, asio::detail::wrapped_handler, asio::detail::is_continuation_if_running> > >::do_complete(void*, asio::detail::scheduler_operation*, std::error_code const&, unsigned long) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/reactive_socket_recv_op.hpp:111 #52 0x31b0ba2 in asio::detail::scheduler_operation::complete(void*, std::error_code const&, unsigned long) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/scheduler_operation.hpp:39:5 #53 0x31b0ba2 in asio::detail::scheduler::do_run_one(asio::detail::scoped_lock&, asio::detail::scheduler_thread_info&, std::error_code const&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/impl/scheduler.ipp:369 #54 0x31965cd in asio::detail::scheduler::run(std::error_code&) /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/detail/impl/scheduler.ipp:146:10 #55 0x31962a2 in asio::io_service::run() /data/mci/src/src/third_party/asio-asio-1-11-0/asio/include/asio/impl/io_service.ipp:60:19 #56 0x298a89f in mongo::executor::NetworkInterfaceASIO::startup()::$_0::operator()() const /data/mci/src/src/mongo/executor/network_interface_asio.cpp:149:17 #57 0x298a89f in void std::_Bind_simple::_M_invoke<>(std::_Index_tuple<>) /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:1699 #58 0x298a89f in std::_Bind_simple::operator()() /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/functional:1688 #59 0x298a89f in std::thread::_Impl >::_M_run() /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/thread:115 #60 0x7f993dcc8dcf (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbadcf) Thread T35 created by T31 here: #0 0xbc253f in __interceptor_pthread_create (/data/mci/src/mongod+0xbc253f) #1 0x7f993dcc8f08 in std::thread::_M_start_thread(std::shared_ptr) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbaf08) Thread T31 created by T17 here: #0 0xbc253f in __interceptor_pthread_create (/data/mci/src/mongod+0xbc253f) #1 0x7f993dcc8f08 in std::thread::_M_start_thread(std::shared_ptr) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbaf08) Thread T17 created by T12 here: #0 0xbc253f in __interceptor_pthread_create (/data/mci/src/mongod+0xbc253f) #1 0x7f993dcc8f08 in std::thread::_M_start_thread(std::shared_ptr) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbaf08) Thread T12 created by T0 here: #0 0xbc253f in __interceptor_pthread_create (/data/mci/src/mongod+0xbc253f) #1 0x7f993dcc8f08 in std::thread::_M_start_thread(std::shared_ptr) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbaf08) SUMMARY: AddressSanitizer: heap-use-after-free /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/shared_ptr_base.h:665 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() Shadow bytes around the buggy address: 0x0c068003fa30: fa fa fd fd fd fa fa fa fd fd fd fa fa fa fd fd 0x0c068003fa40: fd fd fa fa fd fd fd fa fa fa fd fd fd fa fa fa 0x0c068003fa50: 00 00 00 00 fa fa 00 00 00 fa fa fa fd fd fd fa 0x0c068003fa60: fa fa fd fd fd fa fa fa 00 00 00 06 fa fa fd fd 0x0c068003fa70: fd fa fa fa 00 00 00 fa fa fa 00 00 00 fa fa fa =>0x0c068003fa80: fd fd fd fa fa fa fd fd fd[fd]fa fa 00 00 00 00 0x0c068003fa90: fa fa fd fd fd fd fa fa fd fd fd fd fa fa fd fd 0x0c068003faa0: fd fa fa fa fd fd fd fa fa fa fd fd fd fa fa fa 0x0c068003fab0: fd fd fd fa fa fa fd fd fd fa fa fa fd fd fd fa 0x0c068003fac0: fa fa fd fd fd fa fa fa fd fd fd fa fa fa fd fd 0x0c068003fad0: fd fa fa fa fd fd fd fa fa fa fd fd fd fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc ASan internal: fe ==70815==ABORTING