================== WARNING: ThreadSanitizer: data race (pid=59095) Read of size 8 at 0x7b54000108b8 by thread T4: #0 std::__1::shared_ptr::get() const memory:3826 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x57b4f2) #1 std::__1::shared_ptr::operator bool() const memory:3837 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x57b498) #2 couchbase::operations::http_command::cancel() http_command.hxx:83 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x5843f5) #3 couchbase::operations::http_command::start(cxx_function::unique_function&&)::'lambda'(std::__1::error_code)::operator()(std::__1::error_code) const http_command.hxx:77 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x584381) #4 asio::detail::binder1::start(cxx_function::unique_function&&)::'lambda'(std::__1::error_code), std::__1::error_code>::operator()() bind_handler.hpp:170 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x5842cb) #5 void asio::asio_handler_invoke::start(cxx_function::unique_function&&)::'lambda'(std::__1::error_code), std::__1::error_code> >(couchbase::operations::http_noop_request&, ...) handler_invoke_hook.hpp:87 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x584238) #6 void asio_handler_invoke_helpers::invoke::start(cxx_function::unique_function&&)::'lambda'(std::__1::error_code), std::__1::error_code>, couchbase::operations::http_command::start(cxx_function::unique_function&&)::'lambda'(std::__1::error_code)>(couchbase::operations::http_noop_request&, asio::detail::binder1::start(cxx_function::unique_function&&)::'lambda'(std::__1::error_code), std::__1::error_code>&) handler_invoke_helpers.hpp:54 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x5840c1) #7 void asio::detail::handler_work::start(cxx_function::unique_function&&)::'lambda'(std::__1::error_code), asio::any_io_executor, void>::complete::start(cxx_function::unique_function&&)::'lambda'(std::__1::error_code), std::__1::error_code> >(asio::detail::binder1::start(cxx_function::unique_function&&)::'lambda'(std::__1::error_code), std::__1::error_code>&, couchbase::operations::http_command::start(cxx_function::unique_function&&)::'lambda'(std::__1::error_code)&) handler_work.hpp:511 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x583ccc) #8 asio::detail::wait_handler::start(cxx_function::unique_function&&)::'lambda'(std::__1::error_code), asio::any_io_executor>::do_complete(void*, asio::detail::scheduler_operation*, std::__1::error_code const&, unsigned long) wait_handler.hpp:75 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x5838b1) #9 asio::detail::scheduler_operation::complete(void*, std::__1::error_code const&, unsigned long) scheduler_operation.hpp:39 (client_tests:x86_64+0x10006a194) Previous write of size 8 at 0x7b54000108b8 by thread T1 (mutexes: write M1190): #0 std::__1::enable_if<(is_move_constructible::value) && (is_move_assignable::value), void>::type std::__1::swap(couchbase::io::http_session*&, couchbase::io::http_session*&) type_traits:3723 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x55a919) #1 std::__1::shared_ptr::swap(std::__1::shared_ptr&) memory:4338 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x562bef) #2 std::__1::shared_ptr::operator=(std::__1::shared_ptr&&) memory:4245 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x541315) #3 couchbase::operations::http_command::send_to(std::__1::shared_ptr) http_command.hxx:156 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x541d3c) #4 void couchbase::io::http_session_manager::ping(std::__1::set, std::__1::allocator >, std::__1::shared_ptr, couchbase::cluster_credentials const&) http_session_manager.hxx:146 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50ca60) #5 couchbase::cluster::ping(std::__1::optional, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0::operator()() cluster.cxx:92 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50b3ff) #6 std::__1::result_of, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0 ()>::type asio::executor_binder, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> >::operator()<>() bind_executor.hpp:406 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50b07f) #7 asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >::operator()() bind_handler.hpp:59 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50b018) #8 void asio::asio_handler_invoke, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > > >(asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&, ...) handler_invoke_hook.hpp:87 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50af78) #9 void asio_handler_invoke_helpers::invoke, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >, asio::executor_binder, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >(asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&, asio::executor_binder, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> >&) handler_invoke_helpers.hpp:54 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50af21) #10 void asio::detail::asio_handler_invoke, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >, asio::executor_binder, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >(asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&, asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >*) bind_handler.hpp:110 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50ae58) #11 void asio_handler_invoke_helpers::invoke, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >, asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > > >(asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&, asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&) handler_invoke_helpers.hpp:54 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x509e5b) #12 asio::detail::executor_op, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >, std::__1::allocator, asio::detail::scheduler_operation>::do_complete(void*, asio::detail::scheduler_operation*, std::__1::error_code const&, unsigned long) executor_op.hpp:69 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x5947d8) #13 asio::detail::scheduler_operation::complete(void*, std::__1::error_code const&, unsigned long) scheduler_operation.hpp:39 (client_tests:x86_64+0x10006a194) Location is heap block of size 624 at 0x7b5400010680 allocated by thread T1: #0 operator new(unsigned long) :3 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x7831b) #1 std::__1::__libcpp_allocate(unsigned long, unsigned long) new:253 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50d525) #2 std::__1::allocator, std::__1::allocator > > >::allocate(unsigned long, void const*) memory:1869 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x57f05d) #3 std::__1::enable_if >::value), std::__1::shared_ptr > >::type std::__1::make_shared, asio::io_context&, couchbase::operations::http_noop_request&, std::__1::shared_ptr&, couchbase::metrics::meter*&>(asio::io_context&, couchbase::operations::http_noop_request&, std::__1::shared_ptr&, couchbase::metrics::meter*&) memory:4404 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x54155e) #4 void couchbase::io::http_session_manager::ping(std::__1::set, std::__1::allocator >, std::__1::shared_ptr, couchbase::cluster_credentials const&) http_session_manager.hxx:123 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50c8ef) #5 couchbase::cluster::ping(std::__1::optional, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0::operator()() cluster.cxx:92 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50b3ff) #6 std::__1::result_of, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0 ()>::type asio::executor_binder, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> >::operator()<>() bind_executor.hpp:406 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50b07f) #7 asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >::operator()() bind_handler.hpp:59 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50b018) #8 void asio::asio_handler_invoke, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > > >(asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&, ...) handler_invoke_hook.hpp:87 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50af78) #9 void asio_handler_invoke_helpers::invoke, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >, asio::executor_binder, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >(asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&, asio::executor_binder, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> >&) handler_invoke_helpers.hpp:54 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50af21) #10 void asio::detail::asio_handler_invoke, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >, asio::executor_binder, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >(asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&, asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >*) bind_handler.hpp:110 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50ae58) #11 void asio_handler_invoke_helpers::invoke, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >, asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > > >(asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&, asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&) handler_invoke_helpers.hpp:54 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x509e5b) #12 asio::detail::executor_op, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >, std::__1::allocator, asio::detail::scheduler_operation>::do_complete(void*, asio::detail::scheduler_operation*, std::__1::error_code const&, unsigned long) executor_op.hpp:69 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x5947d8) #13 asio::detail::scheduler_operation::complete(void*, std::__1::error_code const&, unsigned long) scheduler_operation.hpp:39 (client_tests:x86_64+0x10006a194) Mutex M1190 (0x7b5c000002c8) created at: #0 pthread_mutex_lock :3 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x3d65e) #1 std::__1::mutex::lock() :2 (libc++.1.dylib:x86_64+0x36538) #2 couchbase::cluster::ping(std::__1::optional, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0::operator()() cluster.cxx:92 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50b3ff) #3 std::__1::result_of, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0 ()>::type asio::executor_binder, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> >::operator()<>() bind_executor.hpp:406 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50b07f) #4 asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >::operator()() bind_handler.hpp:59 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50b018) #5 void asio::asio_handler_invoke, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > > >(asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&, ...) handler_invoke_hook.hpp:87 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50af78) #6 void asio_handler_invoke_helpers::invoke, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >, asio::executor_binder, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >(asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&, asio::executor_binder, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> >&) handler_invoke_helpers.hpp:54 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50af21) #7 void asio::detail::asio_handler_invoke, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >, asio::executor_binder, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >(asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&, asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >*) bind_handler.hpp:110 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x50ae58) #8 void asio_handler_invoke_helpers::invoke, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >, asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > > >(asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&, asio::detail::binder0, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >&) handler_invoke_helpers.hpp:54 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x509e5b) #9 asio::detail::executor_op, std::__1::allocator > >, std::__1::optional, std::__1::allocator > >, std::__1::set, std::__1::allocator >, std::__1::function)::$_0, asio::io_context::basic_executor_type, 0u> > >, std::__1::allocator, asio::detail::scheduler_operation>::do_complete(void*, asio::detail::scheduler_operation*, std::__1::error_code const&, unsigned long) executor_op.hpp:69 (libtransactions_cxx.2.0.0.beta.1.dylib:x86_64+0x5947d8) #10 asio::detail::scheduler_operation::complete(void*, std::__1::error_code const&, unsigned long) scheduler_operation.hpp:39 (client_tests:x86_64+0x10006a194) Thread T4 (tid=4264930, running) created by main thread at: #0 pthread_create :3 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x2d8fd) #1 std::__1::__libcpp_thread_create(_opaque_pthread_t**, void* (*)(void*), void*) __threading_support:336 (client_tests:x86_64+0x100077913) Thread T1 (tid=4264927, running) created by main thread at: #0 pthread_create :3 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x2d8fd) #1 std::__1::__libcpp_thread_create(_opaque_pthread_t**, void* (*)(void*), void*) __threading_support:336 (client_tests:x86_64+0x100077913) SUMMARY: ThreadSanitizer: data race memory:3826 in std::__1::shared_ptr::get() const ==================