test, ci: Fix threadsanitizer errors in mptest - #222
Conversation
mptest thread sanitizer checks that were failing in bitcoin core CI were not
failing in libmultiprocess CI, and this change instruments libcxx so the same
checks should happen both places.
Credit to MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> for pointing this out
bitcoin/bitcoin#33518 (comment)
This avoids thread sanitizer errors like:
Read of size 8 at 0x7ffff7c81cb8 by thread T8:
#0 std::__1::ios_base::width[abi:ne210101]() const /nix/store/71bq4557fksv43c9lf9j5ywrj6zk17hl-libcxx-21.1.1-dev/include/c++/v1/ios:497 (mptest+0x13e737)
bitcoin-core#1 std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output[abi:ne210101]<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) /nix/store/71bq4557fksv43c9lf9j5ywrj6zk17hl-libcxx-21.1.1-dev/include/c++/v1/__locale_dir/pad_and_output.h:54 (mptest+0x13e737)
bitcoin-core#2 std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence[abi:ne210101]<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) /nix/store/71bq4557fksv43c9lf9j5ywrj6zk17hl-libcxx-21.1.1-dev/include/c++/v1/__ostream/put_character_sequence.h:37 (mptest+0x13e5e0)
bitcoin-core#3 std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<[abi:ne210101]<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) /nix/store/71bq4557fksv43c9lf9j5ywrj6zk17hl-libcxx-21.1.1-dev/include/c++/v1/__ostream/basic_ostream.h:438 (mptest+0x13e0ee)
Previous write of size 8 at 0x7ffff7c81cb8 by main thread (mutexes: write M0):
#0 std::__1::ios_base::width[abi:ne210101](long) /nix/store/71bq4557fksv43c9lf9j5ywrj6zk17hl-libcxx-21.1.1-dev/include/c++/v1/ios:501 (mptest+0x13e8bc)
bitcoin-core#1 std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> > std::__1::__pad_and_output[abi:ne210101]<char, std::__1::char_traits<char> >(std::__1::ostreambuf_iterator<char, std::__1::char_traits<char> >, char const*, char const*, char const*, std::__1::ios_base&, char) /nix/store/71bq4557fksv43c9lf9j5ywrj6zk17hl-libcxx-21.1.1-dev/include/c++/v1/__locale_dir/pad_and_output.h:80 (mptest+0x13e8bc)
bitcoin-core#2 std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::__put_character_sequence[abi:ne210101]<char, std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*, unsigned long) /nix/store/71bq4557fksv43c9lf9j5ywrj6zk17hl-libcxx-21.1.1-dev/include/c++/v1/__ostream/put_character_sequence.h:37 (mptest+0x13e5e0)
bitcoin-core#3 std::__1::basic_ostream<char, std::__1::char_traits<char> >& std::__1::operator<<[abi:ne210101]<std::__1::char_traits<char> >(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, char const*) /nix/store/71bq4557fksv43c9lf9j5ywrj6zk17hl-libcxx-21.1.1-dev/include/c++/v1/__ostream/basic_ostream.h:438 (mptest+0x13e0ee)
bitcoin-core#4 mp::test::TestSetup::TestSetup(bool)::{lambda()bitcoin-core#1}::operator()() const::{lambda(mp::LogMessage)bitcoin-core#1}::operator()(mp::LogMessage) const test/mp/test/test.cpp:71 (mptest+0x13e0ee)
New thread busy test from 1238170 (bitcoin-core#214) is checking for "Future already retrieved" error with string match which is fragile and does not work on all platforms, resulting in error: test/mp/test/test.cpp:339: error: failed: expected e.what() == std::string("Future already retrieved") [std::future_error: Future already retrieved == Future already retrieved] This change fixes the test to check for an error code instead. Separately there seems to be a problem with this KJ_EXPECT call because it prints error output without causing the test to fail. This may be happening because it is not called on the main test thread. That issue is not addressed by this change and requires more followup.
This makes libmultiprocess CI output match bitcoin core CI output and catches a race in the new thread busy test from 1238170 (bitcoin-core#214).
New thread busy test from 1238170 (bitcoin-core#214) was triggering tsan race errors that happen in bitcoin ci and libmultiprocess CI (after previous commit) reported by maflcko in bitcoin/bitcoin#33518 (comment) The errors just happen because callback_thread and request_thread objects in the test are accessed by two different threads: the main test thread, and the EventLoop thread, and it is only actually safe to reference them from the EventLoop thread. The errors look like: WARNING: ThreadSanitizer: data race (pid=13288) Write of size 4 at 0x725000000c10 by thread T13: #0 kj::Refcounted::disposeImpl(void*) const <null> (mptest+0x6ee095) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#1 kj::Disposer::Dispose_<capnp::ClientHook, true>::dispose(capnp::ClientHook*, kj::Disposer const&) <null> (mptest+0x2da681) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#2 void kj::Disposer::dispose<capnp::ClientHook>(capnp::ClientHook*) const <null> (mptest+0x2da5d5) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#3 kj::Own<capnp::ClientHook, std::nullptr_t>::dispose() <null> (mptest+0x2da57e) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#4 kj::Own<capnp::ClientHook, std::nullptr_t>::~Own() <null> (mptest+0x2cf135) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#5 capnp::_::(anonymous namespace)::RpcConnectionState::Export::~Export() rpc.c++ (mptest+0x32a4cc) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#6 capnp::_::(anonymous namespace)::RpcConnectionState::releaseExport(unsigned int, unsigned int) rpc.c++ (mptest+0x332ba9) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#7 capnp::_::(anonymous namespace)::RpcConnectionState::handleRelease(capnp::rpc::Release::Reader const&) rpc.c++ (mptest+0x3321ab) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#8 capnp::_::(anonymous namespace)::RpcConnectionState::handleMessage(kj::Own<capnp::IncomingRpcMessage, std::nullptr_t>) rpc.c++ (mptest+0x32eb75) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#9 capnp::_::(anonymous namespace)::RpcConnectionState::messageLoop()::'lambda'(kj::Maybe<kj::Own<capnp::IncomingRpcMessage, std::nullptr_t>>&&)::operator()(kj::Maybe<kj::Own<capnp::IncomingRpcMessage, std::nullptr_t>>&&) const rpc.c++ (mptest+0x32e75b) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#10 bool kj::_::MaybeVoidCaller<kj::Maybe<kj::Own<capnp::IncomingRpcMessage, std::nullptr_t>>, bool>::apply<capnp::_::(anonymous namespace)::RpcConnectionState::messageLoop()::'lambda'(kj::Maybe<kj::Own<capnp::IncomingRpcMessage, std::nullptr_t>>&&)>(capnp::_::(anonymous namespace)::RpcConnectionState::messageLoop()::'lambda'(kj::Maybe<kj::Own<capnp::IncomingRpcMessage, std::nullptr_t>>&&)&, kj::Maybe<kj::Own<capnp::IncomingRpcMessage, std::nullptr_t>>&&) rpc.c++ (mptest+0x393ae5) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#11 kj::_::TransformPromiseNode<bool, kj::Maybe<kj::Own<capnp::IncomingRpcMessage, std::nullptr_t>>, capnp::_::(anonymous namespace)::RpcConnectionState::messageLoop()::'lambda'(kj::Maybe<kj::Own<capnp::IncomingRpcMessage, std::nullptr_t>>&&), capnp::_::(anonymous namespace)::RpcConnectionState::messageLoop()::'lambda'(kj::Exception&&)>::getImpl(kj::_::ExceptionOrValue&) rpc.c++ (mptest+0x3936f1) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#12 kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::$_0::operator()() const async.c++ (mptest+0x515123) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#13 kj::Maybe<kj::Exception> kj::runCatchingExceptions<kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::$_0>(kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::$_0&&) async.c++ (mptest+0x5055e7) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#14 kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&) <null> (mptest+0x5054db) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#15 kj::_::TransformPromiseNodeBase::getDepResult(kj::_::ExceptionOrValue&) <null> (mptest+0x505892) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#16 kj::_::TransformPromiseNode<kj::_::Void, bool, capnp::_::(anonymous namespace)::RpcConnectionState::messageLoop()::'lambda'(bool), kj::_::PropagateException>::getImpl(kj::_::ExceptionOrValue&) rpc.c++ (mptest+0x395a83) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#17 kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::$_0::operator()() const async.c++ (mptest+0x515123) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#18 kj::Maybe<kj::Exception> kj::runCatchingExceptions<kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::$_0>(kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&)::$_0&&) async.c++ (mptest+0x5055e7) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#19 kj::_::TransformPromiseNodeBase::get(kj::_::ExceptionOrValue&) <null> (mptest+0x5054db) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#20 kj::TaskSet::Task::fire() <null> (mptest+0x52f703) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#21 non-virtual thunk to kj::TaskSet::Task::fire() <null> (mptest+0x52fc39) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#22 kj::EventLoop::turn() <null> (mptest+0x500065) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#23 kj::_::waitImpl(kj::Own<kj::_::PromiseNode, kj::_::PromiseDisposer>&&, kj::_::ExceptionOrValue&, kj::WaitScope&, kj::SourceLocation)::$_2::operator()() const async.c++ (mptest+0x513eb4) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#24 void kj::WaitScope::runOnStackPool<kj::_::waitImpl(kj::Own<kj::_::PromiseNode, kj::_::PromiseDisposer>&&, kj::_::ExceptionOrValue&, kj::WaitScope&, kj::SourceLocation)::$_2>(kj::_::waitImpl(kj::Own<kj::_::PromiseNode, kj::_::PromiseDisposer>&&, kj::_::ExceptionOrValue&, kj::WaitScope&, kj::SourceLocation)::$_2&&) async.c++ (mptest+0x501fd7) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#25 kj::_::waitImpl(kj::Own<kj::_::PromiseNode, kj::_::PromiseDisposer>&&, kj::_::ExceptionOrValue&, kj::WaitScope&, kj::SourceLocation) <null> (mptest+0x501b51) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#26 kj::Promise<unsigned long>::wait(kj::WaitScope&, kj::SourceLocation) /home/admin/actions-runner/_work/_temp/depends/x86_64-pc-linux-gnu/include/kj/async-inl.h:1357:3 (mptest+0x2ad447) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#27 mp::EventLoop::loop() /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/./ipc/libmultiprocess/src/mp/proxy.cpp:239:68 (mptest+0x2a836e) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#28 mp::test::TestSetup::TestSetup(bool)::'lambda'()::operator()() const /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/test/mp/test/test.cpp:99:20 (mptest+0x13f6d7) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#29 std::__1::__invoke_result_impl<void, mp::test::TestSetup::TestSetup(bool)::'lambda'()>::type std::__1::__invoke[abi:de210101]<mp::test::TestSetup::TestSetup(bool)::'lambda'()>(mp::test::TestSetup::TestSetup(bool)::'lambda'()&&) /cxx_build/include/c++/v1/__type_traits/invoke.h:87:27 (mptest+0x13edee) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#30 void std::__1::__thread_execute[abi:de210101]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, mp::test::TestSetup::TestSetup(bool)::'lambda'()>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, mp::test::TestSetup::TestSetup(bool)::'lambda'()>&, std::__1::__tuple_indices<...>) /cxx_build/include/c++/v1/__thread/thread.h:159:3 (mptest+0x13edee) bitcoin-core#31 void* std::__1::__thread_proxy[abi:de210101]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, mp::test::TestSetup::TestSetup(bool)::'lambda'()>>(void*) /cxx_build/include/c++/v1/__thread/thread.h:168:3 (mptest+0x13edee) Previous write of size 4 at 0x725000000c10 by main thread (mutexes: write M0): #0 kj::Own<capnp::LocalClient, std::nullptr_t> kj::Refcounted::addRefInternal<capnp::LocalClient>(capnp::LocalClient*) <null> (mptest+0x303e41) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#1 kj::Own<capnp::LocalClient, std::nullptr_t> kj::addRef<capnp::LocalClient>(capnp::LocalClient&) <null> (mptest+0x30d7e2) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#2 capnp::LocalClient::addRef() <null> (mptest+0x3059f9) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#3 capnp::Capability::Client::Client(capnp::Capability::Client&) /home/admin/actions-runner/_work/_temp/depends/x86_64-pc-linux-gnu/include/capnp/capability.h:1096:68 (mptest+0x13e526) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#4 mp::Thread::Client::Client(mp::Thread::Client&) /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/include/mp/proxy.capnp.h:393:3 (mptest+0x13e526) bitcoin-core#5 mp::Thread::Client* std::__1::construct_at[abi:de210101]<mp::Thread::Client, mp::Thread::Client&, mp::Thread::Client*>(mp::Thread::Client*, mp::Thread::Client&) /cxx_build/include/c++/v1/__memory/construct_at.h:38:49 (mptest+0x13e526) bitcoin-core#6 mp::Thread::Client* std::__1::__construct_at[abi:de210101]<mp::Thread::Client, mp::Thread::Client&, mp::Thread::Client*>(mp::Thread::Client*, mp::Thread::Client&) /cxx_build/include/c++/v1/__memory/construct_at.h:46:10 (mptest+0x13e526) bitcoin-core#7 void std::__1::__optional_storage_base<mp::Thread::Client, false>::__construct[abi:de210101]<mp::Thread::Client&>(mp::Thread::Client&) /cxx_build/include/c++/v1/optional:371:5 (mptest+0x13e526) bitcoin-core#8 _ZNSt3__18optionalIN2mp6Thread6ClientEEaSB8de210101IRS3_TnNS_9enable_ifIXsr4_AndINS_17integral_constantIbXntu9__is_sameu14__remove_cvrefIT_ES4_EEEENS_7_OrImplIXaantcvbsr10_IsNotSameISA_S3_EE5valuenesZT1_Li0EEE7_ResultINS8_IbXntu9__is_sameSA_S3_EEEENS_4_NotINS_9is_scalarIS3_EEEEEENS_16is_constructibleIS3_JS9_EEENS_13is_assignableIS6_S9_EEEE5valueEiE4typeELi0EEERS4_OS9_ /cxx_build/include/c++/v1/optional:744:13 (mptest+0x13e526) bitcoin-core#9 mp::test::TestCase312::run() /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/test/mp/test/test.cpp:327:25 (mptest+0x136eb6) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#10 kj::TestRunner::run()::'lambda'()::operator()() const <null> (mptest+0x2bc628) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#11 kj::Maybe<kj::Exception> kj::runCatchingExceptions<kj::TestRunner::run()::'lambda'()>(kj::TestRunner::run()::'lambda'()&&) <null> (mptest+0x2b9ab7) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#12 kj::TestRunner::run() <null> (mptest+0x2b88c3) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#13 auto kj::TestRunner::getMain()::'lambda5'(auto&, auto&&...)::operator()<kj::TestRunner>(auto&, auto&&...) <null> (mptest+0x2b8161) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#14 auto kj::_::BoundMethod<kj::TestRunner&, kj::TestRunner::getMain()::'lambda5'(auto&, auto&&...), kj::TestRunner::getMain()::'lambda6'(auto&, auto&&...)>::operator()<>() <null> (mptest+0x2b80f8) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#15 kj::Function<kj::MainBuilder::Validity ()>::Impl<kj::_::BoundMethod<kj::TestRunner&, kj::TestRunner::getMain()::'lambda5'(auto&, auto&&...), kj::TestRunner::getMain()::'lambda6'(auto&, auto&&...)>>::operator()() <null> (mptest+0x2b8079) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#16 kj::Function<kj::MainBuilder::Validity ()>::operator()() <null> (mptest+0x6c9204) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#17 kj::MainBuilder::MainImpl::operator()(kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>) <null> (mptest+0x6c368d) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#18 kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>::Impl<kj::MainBuilder::MainImpl>::operator()(kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>) <null> (mptest+0x6d5e63) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#19 kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>::operator()(kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>) <null> (mptest+0x6ca206) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#20 kj::runMainAndExit(kj::ProcessContext&, kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>&&, int, char**)::$_0::operator()() const main.c++ (mptest+0x6c52d7) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#21 kj::Maybe<kj::Exception> kj::runCatchingExceptions<kj::runMainAndExit(kj::ProcessContext&, kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>&&, int, char**)::$_0>(kj::runMainAndExit(kj::ProcessContext&, kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>&&, int, char**)::$_0&&) main.c++ (mptest+0x6be577) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#22 kj::runMainAndExit(kj::ProcessContext&, kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>&&, int, char**) <null> (mptest+0x6be2db) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#23 main <null> (mptest+0x2b20d1) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) Location is heap block of size 512 at 0x725000000c00 allocated by thread T13: #0 operator new(unsigned long) <null> (mptest+0x132166) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#1 kj::Own<capnp::LocalClient, std::nullptr_t> kj::refcounted<capnp::LocalClient, kj::Own<capnp::Capability::Server, std::nullptr_t>, capnp::_::CapabilityServerSetBase&, void*&>(kj::Own<capnp::Capability::Server, std::nullptr_t>&&, capnp::_::CapabilityServerSetBase&, void*&) <null> (mptest+0x2d1a11) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#2 capnp::_::CapabilityServerSetBase::addInternal(kj::Own<capnp::Capability::Server, std::nullptr_t>&&, void*) <null> (mptest+0x2c382c) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#3 capnp::CapabilityServerSet<mp::Thread>::add(kj::Own<mp::Thread::Server, std::nullptr_t>&&) /home/admin/actions-runner/_work/_temp/depends/x86_64-pc-linux-gnu/include/capnp/capability.h:1268:10 (mptest+0x18142f) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#4 void mp::CustomBuildField<mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>>(mp::TypeList<>, mp::Priority<1>, mp::ClientInvokeContext&, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>&&, std::__1::enable_if<std::is_same<decltype(fp2.get()), mp::Context::Builder>::value, void>::type*)::'lambda'()::operator()() const /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/include/mp/type-context.h:29:43 (mptest+0x1c1e51) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#5 std::__1::__invoke_result_impl<void, void mp::CustomBuildField<mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>>(mp::TypeList<>, mp::Priority<1>, mp::ClientInvokeContext&, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>&&, std::__1::enable_if<std::is_same<decltype(fp2.get()), mp::Context::Builder>::value, void>::type*)::'lambda'()&>::type std::__1::__invoke[abi:de210101]<void mp::CustomBuildField<mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>>(mp::TypeList<>, mp::Priority<1>, mp::ClientInvokeContext&, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>&&, std::__1::enable_if<std::is_same<decltype(fp2.get()), mp::Context::Builder>::value, void>::type*)::'lambda'()&>(void mp::CustomBuildField<mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>>(mp::TypeList<>, mp::Priority<1>, mp::ClientInvokeContext&, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>&&, std::__1::enable_if<std::is_same<decltype(fp2.get()), mp::Context::Builder>::value, void>::type*)::'lambda'()&) /cxx_build/include/c++/v1/__type_traits/invoke.h:87:27 (mptest+0x1c1cb3) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#6 mp::Thread::Client std::__1::__invoke_void_return_wrapper<mp::Thread::Client, false>::__call[abi:de210101]<void mp::CustomBuildField<mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>>(mp::TypeList<>, mp::Priority<1>, mp::ClientInvokeContext&, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>&&, std::__1::enable_if<std::is_same<decltype(fp2.get()), mp::Context::Builder>::value, void>::type*)::'lambda'()&>(void mp::CustomBuildField<mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>>(mp::TypeList<>, mp::Priority<1>, mp::ClientInvokeContext&, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>&&, std::__1::enable_if<std::is_same<decltype(fp2.get()), mp::Context::Builder>::value, void>::type*)::'lambda'()&) /cxx_build/include/c++/v1/__type_traits/invoke.h:334:12 (mptest+0x1c1cb3) bitcoin-core#7 mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>> std::__1::__invoke_r[abi:de210101]<mp::Thread::Client, void mp::CustomBuildField<mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>>(mp::TypeList<>, mp::Priority<1>, mp::ClientInvokeContext&, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>&&, std::__1::enable_if<std::is_same<decltype(fp2.get()), mp::Context::Builder>::value, void>::type*)::'lambda'()&>(void mp::CustomBuildField<mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>>(mp::TypeList<>, mp::Priority<1>, mp::ClientInvokeContext&, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>&&, std::__1::enable_if<std::is_same<decltype(fp2.get()), mp::Context::Builder>::value, void>::type*)::'lambda'()&) /cxx_build/include/c++/v1/__type_traits/invoke.h:348:10 (mptest+0x1c1cb3) bitcoin-core#8 std::__1::__function::__func<void mp::CustomBuildField<mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>>(mp::TypeList<>, mp::Priority<1>, mp::ClientInvokeContext&, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>&&, std::__1::enable_if<std::is_same<decltype(fp2.get()), mp::Context::Builder>::value, void>::type*)::'lambda'(), mp::Thread::Client ()>::operator()() /cxx_build/include/c++/v1/__functional/function.h:174:12 (mptest+0x1c1cb3) bitcoin-core#9 std::__1::__function::__value_func<mp::Thread::Client ()>::operator()[abi:de210101]() const /cxx_build/include/c++/v1/__functional/function.h:274:12 (mptest+0x2a961f) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#10 std::__1::function<mp::Thread::Client ()>::operator()() const /cxx_build/include/c++/v1/__functional/function.h:772:10 (mptest+0x2a961f) bitcoin-core#11 mp::SetThread(mp::GuardedRef<std::__1::map<mp::Connection*, std::__1::optional<mp::ProxyClient<mp::Thread>>, std::__1::less<mp::Connection*>, std::__1::allocator<std::__1::pair<mp::Connection* const, std::__1::optional<mp::ProxyClient<mp::Thread>>>>>>, mp::Connection*, std::__1::function<mp::Thread::Client ()> const&) /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/./ipc/libmultiprocess/src/mp/proxy.cpp:326:32 (mptest+0x2a961f) bitcoin-core#12 void mp::CustomBuildField<mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>>(mp::TypeList<>, mp::Priority<1>, mp::ClientInvokeContext&, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>&&, std::__1::enable_if<std::is_same<decltype(fp2.get()), mp::Context::Builder>::value, void>::type*) /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/include/mp/type-context.h:27:31 (mptest+0x1c1554) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#13 void mp::BuildField<mp::ClientInvokeContext, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>>(mp::TypeList<>, mp::ClientInvokeContext&, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>&&) /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/include/mp/proxy-types.h:203:9 (mptest+0x1c0768) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#14 void mp::MaybeBuildField<mp::TypeList<>, mp::ClientInvokeContext&, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>>(std::__1::integral_constant<bool, true>, mp::TypeList<>&&, mp::ClientInvokeContext&, mp::StructField<mp::Accessor<mp::foo_fields::Context, 17>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>>&&) /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/include/mp/proxy-types.h:260:5 (mptest+0x1c0768) bitcoin-core#15 auto void mp::ClientParam<mp::Accessor<mp::foo_fields::Context, 17>>::BuildParams::handleField<capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>, mp::TypeList<>>(mp::ClientInvokeContext&, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>&, mp::TypeList<>)::'lambda'<typename ...$T>($T&&...)::operator()<>($T&&...) const /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/include/mp/proxy-types.h:398:17 (mptest+0x1c0768) bitcoin-core#16 std::__1::__invoke_result_impl<void, $T...>::type std::__1::__invoke[abi:de210101]<void mp::ClientParam<mp::Accessor<mp::foo_fields::Context, 17>>::BuildParams::handleField<capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>, mp::TypeList<>>(mp::ClientInvokeContext&, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>&, mp::TypeList<>)::'lambda'<typename ...$T>($T&&...) const&>($T&&...) /cxx_build/include/c++/v1/__type_traits/invoke.h:87:27 (mptest+0x1c0768) bitcoin-core#17 decltype(auto) std::__1::__apply_tuple_impl[abi:de210101]<void mp::ClientParam<mp::Accessor<mp::foo_fields::Context, 17>>::BuildParams::handleField<capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>, mp::TypeList<>>(mp::ClientInvokeContext&, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>&, mp::TypeList<>)::'lambda'<typename ...$T>($T&&...) const&, std::__1::tuple<>>(capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>&&, mp::TypeList<>&&, std::__1::__tuple_indices<...>) /cxx_build/include/c++/v1/tuple:1380:5 (mptest+0x1c0768) bitcoin-core#18 decltype(auto) std::__1::apply[abi:de210101]<void mp::ClientParam<mp::Accessor<mp::foo_fields::Context, 17>>::BuildParams::handleField<capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>, mp::TypeList<>>(mp::ClientInvokeContext&, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>&, mp::TypeList<>)::'lambda'<typename ...$T>($T&&...) const&, std::__1::tuple<>>(capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>&&, mp::TypeList<>&&) /cxx_build/include/c++/v1/tuple:1384:5 (mptest+0x1c0768) bitcoin-core#19 void mp::ClientParam<mp::Accessor<mp::foo_fields::Context, 17>>::BuildParams::handleField<capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>, mp::TypeList<>>(mp::ClientInvokeContext&, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>&, mp::TypeList<>) /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/include/mp/proxy-types.h:409:13 (mptest+0x1c0768) bitcoin-core#20 void mp::IterateFieldsHelper<mp::ClientParam<mp::Accessor<mp::foo_fields::Context, 17>>::BuildParams, 0ul>::handleChain<mp::ClientInvokeContext, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>, mp::TypeList<>>(mp::ClientInvokeContext&, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>&, mp::TypeList<>) /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/include/mp/proxy-types.h:340:38 (mptest+0x1c0768) bitcoin-core#21 void mp::IterateFieldsHelper<mp::IterateFields, 0ul>::handleChain<mp::ClientInvokeContext, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>, mp::TypeList<>, mp::ClientParam<mp::Accessor<mp::foo_fields::Context, 17>>::BuildParams>(mp::ClientInvokeContext&, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults>&, mp::TypeList<>, mp::ClientParam<mp::Accessor<mp::foo_fields::Context, 17>>::BuildParams&&) /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/include/mp/proxy-types.h:333:17 (mptest+0x1c0768) bitcoin-core#22 void mp::clientInvoke<mp::ProxyClient<mp::test::messages::FooInterface>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults> (mp::test::messages::FooInterface::Client::*)(kj::Maybe<capnp::MessageSize>), mp::ClientParam<mp::Accessor<mp::foo_fields::Context, 17>>>(mp::ProxyClient<mp::test::messages::FooInterface>&, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults> (mp::test::messages::FooInterface::Client::* const&)(kj::Maybe<capnp::MessageSize>), mp::ClientParam<mp::Accessor<mp::foo_fields::Context, 17>>&&)::'lambda'()::operator()() const /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/include/mp/proxy-types.h:631:25 (mptest+0x1c0768) bitcoin-core#23 kj::Function<void ()>::Impl<void mp::clientInvoke<mp::ProxyClient<mp::test::messages::FooInterface>, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults> (mp::test::messages::FooInterface::Client::*)(kj::Maybe<capnp::MessageSize>), mp::ClientParam<mp::Accessor<mp::foo_fields::Context, 17>>>(mp::ProxyClient<mp::test::messages::FooInterface>&, capnp::Request<mp::test::messages::FooInterface::CallFnAsyncParams, mp::test::messages::FooInterface::CallFnAsyncResults> (mp::test::messages::FooInterface::Client::* const&)(kj::Maybe<capnp::MessageSize>), mp::ClientParam<mp::Accessor<mp::foo_fields::Context, 17>>&&)::'lambda'()>::operator()() /home/admin/actions-runner/_work/_temp/depends/x86_64-pc-linux-gnu/include/kj/function.h:142:14 (mptest+0x1c05cf) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#24 kj::Function<void ()>::operator()() /home/admin/actions-runner/_work/_temp/depends/x86_64-pc-linux-gnu/include/kj/function.h:119:12 (mptest+0x14d537) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#25 void mp::Unlock<mp::Lock, kj::Function<void ()>&>(mp::Lock&, kj::Function<void ()>&) /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/include/mp/util.h:209:5 (mptest+0x14d537) bitcoin-core#26 mp::EventLoop::loop() /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/./ipc/libmultiprocess/src/mp/proxy.cpp:243:13 (mptest+0x2a8425) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#27 mp::test::TestSetup::TestSetup(bool)::'lambda'()::operator()() const /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/test/mp/test/test.cpp:99:20 (mptest+0x13f6d7) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#28 std::__1::__invoke_result_impl<void, mp::test::TestSetup::TestSetup(bool)::'lambda'()>::type std::__1::__invoke[abi:de210101]<mp::test::TestSetup::TestSetup(bool)::'lambda'()>(mp::test::TestSetup::TestSetup(bool)::'lambda'()&&) /cxx_build/include/c++/v1/__type_traits/invoke.h:87:27 (mptest+0x13edee) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#29 void std::__1::__thread_execute[abi:de210101]<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, mp::test::TestSetup::TestSetup(bool)::'lambda'()>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, mp::test::TestSetup::TestSetup(bool)::'lambda'()>&, std::__1::__tuple_indices<...>) /cxx_build/include/c++/v1/__thread/thread.h:159:3 (mptest+0x13edee) bitcoin-core#30 void* std::__1::__thread_proxy[abi:de210101]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, mp::test::TestSetup::TestSetup(bool)::'lambda'()>>(void*) /cxx_build/include/c++/v1/__thread/thread.h:168:3 (mptest+0x13edee) Mutex M0 (0x721c00003800) created at: #0 pthread_mutex_lock <null> (mptest+0xaee6b) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#1 __libcpp_mutex_lock /llvm-project/libcxx/include/__thread/support/pthread.h:95:10 (libc++.so.1+0x8d059) (BuildId: 41d4816981cf4a619bef1925c75c1c35d01dfd39) bitcoin-core#2 std::__1::mutex::lock() /llvm-project/libcxx/src/mutex.cpp:30:12 (libc++.so.1+0x8d059) bitcoin-core#3 std::__1::unique_lock<std::__1::mutex>::unique_lock[abi:de210101](std::__1::mutex&) /cxx_build/include/c++/v1/__mutex/unique_lock.h:40:11 (mptest+0x154acc) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#4 mp::Lock::Lock(mp::Mutex&) /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/include/mp/util.h:172:45 (mptest+0x154acc) bitcoin-core#5 void mp::clientInvoke<mp::ProxyClient<mp::test::messages::FooInterface>, capnp::Request<mp::test::messages::FooInterface::AddParams, mp::test::messages::FooInterface::AddResults> (mp::test::messages::FooInterface::Client::*)(kj::Maybe<capnp::MessageSize>), mp::ClientParam<mp::Accessor<mp::foo_fields::A, 1>, int>, mp::ClientParam<mp::Accessor<mp::foo_fields::B, 1>, int>, mp::ClientParam<mp::Accessor<mp::foo_fields::Result, 2>, int&>>(mp::ProxyClient<mp::test::messages::FooInterface>&, capnp::Request<mp::test::messages::FooInterface::AddParams, mp::test::messages::FooInterface::AddResults> (mp::test::messages::FooInterface::Client::* const&)(kj::Maybe<capnp::MessageSize>), mp::ClientParam<mp::Accessor<mp::foo_fields::A, 1>, int>&&, mp::ClientParam<mp::Accessor<mp::foo_fields::B, 1>, int>&&, mp::ClientParam<mp::Accessor<mp::foo_fields::Result, 2>, int&>&&) /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/include/mp/proxy-types.h:669:10 (mptest+0x154acc) bitcoin-core#6 mp::ProxyClient<mp::test::messages::FooInterface>::add(int, int) /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/mp/test/foo.capnp.proxy-client.c++:20:5 (mptest+0x152b1f) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#7 mp::test::TestCase117::run() /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/test/mp/test/test.cpp:122:5 (mptest+0x13335b) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#8 kj::TestRunner::run()::'lambda'()::operator()() const <null> (mptest+0x2bc628) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#9 kj::Maybe<kj::Exception> kj::runCatchingExceptions<kj::TestRunner::run()::'lambda'()>(kj::TestRunner::run()::'lambda'()&&) <null> (mptest+0x2b9ab7) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#10 kj::TestRunner::run() <null> (mptest+0x2b88c3) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#11 auto kj::TestRunner::getMain()::'lambda5'(auto&, auto&&...)::operator()<kj::TestRunner>(auto&, auto&&...) <null> (mptest+0x2b8161) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#12 auto kj::_::BoundMethod<kj::TestRunner&, kj::TestRunner::getMain()::'lambda5'(auto&, auto&&...), kj::TestRunner::getMain()::'lambda6'(auto&, auto&&...)>::operator()<>() <null> (mptest+0x2b80f8) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#13 kj::Function<kj::MainBuilder::Validity ()>::Impl<kj::_::BoundMethod<kj::TestRunner&, kj::TestRunner::getMain()::'lambda5'(auto&, auto&&...), kj::TestRunner::getMain()::'lambda6'(auto&, auto&&...)>>::operator()() <null> (mptest+0x2b8079) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#14 kj::Function<kj::MainBuilder::Validity ()>::operator()() <null> (mptest+0x6c9204) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#15 kj::MainBuilder::MainImpl::operator()(kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>) <null> (mptest+0x6c368d) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#16 kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>::Impl<kj::MainBuilder::MainImpl>::operator()(kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>) <null> (mptest+0x6d5e63) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#17 kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>::operator()(kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>) <null> (mptest+0x6ca206) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#18 kj::runMainAndExit(kj::ProcessContext&, kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>&&, int, char**)::$_0::operator()() const main.c++ (mptest+0x6c52d7) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#19 kj::Maybe<kj::Exception> kj::runCatchingExceptions<kj::runMainAndExit(kj::ProcessContext&, kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>&&, int, char**)::$_0>(kj::runMainAndExit(kj::ProcessContext&, kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>&&, int, char**)::$_0&&) main.c++ (mptest+0x6be577) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#20 kj::runMainAndExit(kj::ProcessContext&, kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>&&, int, char**) <null> (mptest+0x6be2db) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#21 main <null> (mptest+0x2b20d1) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) Thread T13 (tid=13312, running) created by main thread at: #0 pthread_create <null> (mptest+0xad15e) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#1 std::__1::__libcpp_thread_create[abi:de210101](unsigned long*, void* (*)(void*), void*) /cxx_build/include/c++/v1/__thread/support/pthread.h:182:10 (mptest+0x13e8f0) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#2 std::__1::thread::thread[abi:de210101]<mp::test::TestSetup::TestSetup(bool)::'lambda'(), 0>(mp::test::TestSetup::TestSetup(bool)::'lambda'()&&) /cxx_build/include/c++/v1/__thread/thread.h:213:16 (mptest+0x13e8f0) bitcoin-core#3 mp::test::TestSetup::TestSetup(bool) /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/test/mp/test/test.cpp:69:11 (mptest+0x139f37) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#4 mp::test::TestCase312::run() /home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/./ipc/libmultiprocess/test/mp/test/test.cpp:314:15 (mptest+0x136ca4) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#5 kj::TestRunner::run()::'lambda'()::operator()() const <null> (mptest+0x2bc628) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#6 kj::Maybe<kj::Exception> kj::runCatchingExceptions<kj::TestRunner::run()::'lambda'()>(kj::TestRunner::run()::'lambda'()&&) <null> (mptest+0x2b9ab7) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#7 kj::TestRunner::run() <null> (mptest+0x2b88c3) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#8 auto kj::TestRunner::getMain()::'lambda5'(auto&, auto&&...)::operator()<kj::TestRunner>(auto&, auto&&...) <null> (mptest+0x2b8161) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#9 auto kj::_::BoundMethod<kj::TestRunner&, kj::TestRunner::getMain()::'lambda5'(auto&, auto&&...), kj::TestRunner::getMain()::'lambda6'(auto&, auto&&...)>::operator()<>() <null> (mptest+0x2b80f8) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#10 kj::Function<kj::MainBuilder::Validity ()>::Impl<kj::_::BoundMethod<kj::TestRunner&, kj::TestRunner::getMain()::'lambda5'(auto&, auto&&...), kj::TestRunner::getMain()::'lambda6'(auto&, auto&&...)>>::operator()() <null> (mptest+0x2b8079) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#11 kj::Function<kj::MainBuilder::Validity ()>::operator()() <null> (mptest+0x6c9204) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#12 kj::MainBuilder::MainImpl::operator()(kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>) <null> (mptest+0x6c368d) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#13 kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>::Impl<kj::MainBuilder::MainImpl>::operator()(kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>) <null> (mptest+0x6d5e63) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#14 kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>::operator()(kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>) <null> (mptest+0x6ca206) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#15 kj::runMainAndExit(kj::ProcessContext&, kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>&&, int, char**)::$_0::operator()() const main.c++ (mptest+0x6c52d7) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#16 kj::Maybe<kj::Exception> kj::runCatchingExceptions<kj::runMainAndExit(kj::ProcessContext&, kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>&&, int, char**)::$_0>(kj::runMainAndExit(kj::ProcessContext&, kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>&&, int, char**)::$_0&&) main.c++ (mptest+0x6be577) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#17 kj::runMainAndExit(kj::ProcessContext&, kj::Function<void (kj::StringPtr, kj::ArrayPtr<kj::StringPtr const>)>&&, int, char**) <null> (mptest+0x6be2db) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) bitcoin-core#18 main <null> (mptest+0x2b20d1) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) SUMMARY: ThreadSanitizer: data race (/home/admin/actions-runner/_work/_temp/build/src/ipc/libmultiprocess/test/mptest+0x6ee095) (BuildId: 0a10180b43648715b83845ce52ff1702609db59d) in kj::Refcounted::disposeImpl(void*) const
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
Would it be possible to add threading annotations to enforce this contract? For ex, adding a private dummy mutex, guarding the vulnerable variables with it, and holding that mutex for the duration of the EventLoop thread? We use that trick ( (Technically clang doesn't require a real mutex, only a capability, so the dummy could just be an |
| TestSetup(bool client_owns_connection = true) | ||
| : thread{[&] { | ||
| EventLoop loop("mptest", [](mp::LogMessage log_data) { | ||
| std::cout << "LOG" << (int)log_data.level << ": " << log_data.message << "\n"; |
There was a problem hiding this comment.
Thanks for fixing this. This was a placeholder that I forgot to revisit.
I think that trick might not apply exactly because the state here is internal to cap'nproto, and cap'nproto is single threaded and doesn't use any thread synchronization or mutexes itself. The requirement that needs to be enforced is that any capnproto function which might trigger IO (including some capnproto object destructors in this case) need to be called from the I imagine there could be compile time checks to enforce this (maybe using a pointer-like object overloading |
Cherry-picking 73d22ba from bitcoin-core#222
|
re: #222 (comment)
Was thinking about this a little more, and I think an approach that could work could be to have a Concretely then if the ProxyClientBase::m_client variable were declared with |
|
@Sjors @theuni @Eunovo, or others it would be helpful to have at least one ACK to be able to merge this PR. This PR is directly blocking bitcoin/bitcoin#33518, bitcoin/bitcoin#33519, and bitcoin/bitcoin#33517, and indirectly blocking backport of bitcoin/bitcoin#33229 according to bitcoin/bitcoin#33473 (comment). Except for a new stringify function, this PR is just test and CI changes and I think even a partial review (for example excluding CI changes) would be helpful. |
|
Will try to review this today or tomorrow. |
There was a problem hiding this comment.
Tested ACK 73d22ba
I first reproduced the tsan errors by running ci_native_tsan locally, then I pulled this branch into my local Bitcoin repo with the git subtree pull command, and ran ci_native_tsan locally to see that the errors have been resolved.
I left comments as I was reviewing, mostly explaining the code as I understood it.
| let | ||
| lib = pkgs.lib; | ||
| llvm = crossPkgs.llvmPackages_20; | ||
| llvmBase = crossPkgs.llvmPackages_21; |
There was a problem hiding this comment.
LLVM version 21 correctly matches bitcoin-core's tsan ci llvm version https://github.com/bitcoin/bitcoin/blob/master/ci/test/00_setup_env_native_tsan.sh#L11-L14
| lib = pkgs.lib; | ||
| llvm = crossPkgs.llvmPackages_20; | ||
| llvmBase = crossPkgs.llvmPackages_21; | ||
| llvm = llvmBase // lib.optionalAttrs (libcxxSanitizers != null) { |
There was a problem hiding this comment.
Applies LLVM_USE_SANITIZER if specified. This will apply the "Thread" sanitizer specified in NIX_ARGS above.
| return g_thread_context.thread_name.empty() ? ThreadName(exe_name) : g_thread_context.thread_name; | ||
| } | ||
|
|
||
| kj::StringPtr KJ_STRINGIFY(Log v) |
There was a problem hiding this comment.
This function is required by KJ for it to stringify Log objects https://github.com/capnproto/capnproto/blob/master/kjdoc/tour.md#stringification
| catch (const std::future_error& e) | ||
| { | ||
| KJ_EXPECT(e.what() == std::string("Future already retrieved")); | ||
| KJ_EXPECT(e.code() == std::make_error_code(std::future_errc::future_already_retrieved)); |
There was a problem hiding this comment.
Not important, but I think the following is worth mentioning:
Maybe we don't need the KJ_EXPECT here at all? The signal itself is a prop for testing, and the catch block already catches the error we expect. I don't think it will be detrimental to the test to remove the KJ_EXPECT call.
There was a problem hiding this comment.
Yes I KJ_EXPECT checking for the right error code is pretty inessential to the test and would be ok to drop. I don't think I see any downsides of keeping it though, assuming it still passes and correctly describes what's expected to happen during the test.
There was a problem hiding this comment.
Let's keep the error code check unless it causes problems later. It makes the test easier to understand too.
| env = { }; # Drop -std=c++20 flag forced by nixpkgs | ||
| })); | ||
| capnproto = capnprotoBase.override (lib.optionalAttrs enableLibcxx { clangStdenv = llvm.libcxxStdenv; }); | ||
| capnproto = (capnprotoBase.overrideAttrs (old: lib.optionalAttrs (capnprotoSanitizers != null) { |
There was a problem hiding this comment.
Adds capnprotoSanitizers if specified. This apply the "Thread" sanitizer specified in sanitize.bash.
The flags -fno-omit-frame-pointer and -g help with producing better stack traces and showing file names and line numbers in warning messages. For example see https://clang.llvm.org/docs/ThreadSanitizer.html#usage
| let | ||
| lib = pkgs.lib; | ||
| llvm = crossPkgs.llvmPackages_20; | ||
| llvmBase = crossPkgs.llvmPackages_21; |
There was a problem hiding this comment.
In 7eb1da1 ci: Use tsan-instrumented libcxx in sanitizers job: not sure if the llvm version bump is worth mentioning, but 21 is also the version we use in the Bitcoin Core TSan job.
| lib.concatStringsSep " " [ | ||
| (old.env.CXXFLAGS or "") | ||
| "-fsanitize=${capnprotoSanitizers}" | ||
| "-fno-omit-frame-pointer" |
There was a problem hiding this comment.
In b74e1bb ci: Use tsan-instrumented cap'n proto in sanitizers job: in Bitcoin Core -fno-omit-frame-pointer is only used with MSan, but I guess it's fine to use with TSan too?
There was a problem hiding this comment.
AddressSanitizer also uses it, https://clang.llvm.org/docs/AddressSanitizer.html#usage. It should be fine to leave it in, since it's good for sanitizers
There was a problem hiding this comment.
In b74e1bb ci: Use tsan-instrumented cap'n proto in sanitizers job: in Bitcoin Core
-fno-omit-frame-pointeris only used with MSan, but I guess it's fine to use with TSan too?
Yes my understanding is it just helps provide better debug information in general, so maybe also be useful with GDB. This suggestion just came from chatgpt though, so it is good to know different sanitizer docs also recommend it. Thanks for the links!
There was a problem hiding this comment.
Yeah, this is one of the first things I do when debugging. Also necessary for anything that needs traces, like generating flamegraphs. It forces the compiler to use the frame-pointer register as-intended, rather than as a general purpose register. Abuse of that extra register is necessary in certain places (like our sha2 impl, IIRC), and useful in others to avoid stack spilling, but is generally just an optimization that's in conflict with debugging.
ryanofsky
left a comment
There was a problem hiding this comment.
Thanks for the reviews!
| catch (const std::future_error& e) | ||
| { | ||
| KJ_EXPECT(e.what() == std::string("Future already retrieved")); | ||
| KJ_EXPECT(e.code() == std::make_error_code(std::future_errc::future_already_retrieved)); |
There was a problem hiding this comment.
Yes I KJ_EXPECT checking for the right error code is pretty inessential to the test and would be ok to drop. I don't think I see any downsides of keeping it though, assuming it still passes and correctly describes what's expected to happen during the test.
| lib.concatStringsSep " " [ | ||
| (old.env.CXXFLAGS or "") | ||
| "-fsanitize=${capnprotoSanitizers}" | ||
| "-fno-omit-frame-pointer" |
There was a problem hiding this comment.
In b74e1bb ci: Use tsan-instrumented cap'n proto in sanitizers job: in Bitcoin Core
-fno-omit-frame-pointeris only used with MSan, but I guess it's fine to use with TSan too?
Yes my understanding is it just helps provide better debug information in general, so maybe also be useful with GDB. This suggestion just came from chatgpt though, so it is good to know different sanitizer docs also recommend it. Thanks for the links!
f4344ae Merge bitcoin-core/libmultiprocess#222: test, ci: Fix threadsanitizer errors in mptest 73d22ba test: Fix tsan race in thread busy test b74e1bb ci: Use tsan-instrumented cap'n proto in sanitizers job c332774 test: Fix failing exception check in new thread busy test ca3c05d test: Use KJ_LOG instead of std::cout for logging 7eb1da1 ci: Use tsan-instrumented libcxx in sanitizers job ec86e43 Merge bitcoin-core/libmultiprocess#220: Add log levels and advertise them to users via logging callback 515ce93 Logging: Pass LogData struct to logging callback 213574c Logging: reclassify remaining log messages e4de041 Logging: Break out expensive log messages and classify them as Trace 408874a Logging: Use new logging macros 67b092d Logging: Disable logging if messsage level is less than the requested level d0a1ba7 Logging: add log levels to mirror Core's 463a829 Logging: Disable moving or copying Logger 83a2e10 Logging: Add an EventLoop constructor to allow for user-specified log options 58cf47a Merge bitcoin-core/libmultiprocess#221: test default PassField impl handles output parameters db03a66 Merge bitcoin-core/libmultiprocess#214: Fix crash on simultaneous IPC calls using the same thread afcc40b Merge bitcoin-core/libmultiprocess#213: util+doc: Clearer errors when attempting to run examples + polished docs 6db6696 test In|Out parameter 29cf2ad test default PassField impl handles output parameters 1238170 test: simultaneous IPC calls using same thread eb069ab Fix crash on simultaneous IPC calls using the same thread ec03a96 doc: Precision and typos 2b43481 doc: Where possible, remove links to ryanofsky/bitcoin/ 286fe46 util: Add helpful error message when failing to execute file git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: f4344ae
a4f9296 Merge bitcoin-core/libmultiprocess#224: doc: fix typos f4344ae Merge bitcoin-core/libmultiprocess#222: test, ci: Fix threadsanitizer errors in mptest 1434642 doc: fix typos 73d22ba test: Fix tsan race in thread busy test b74e1bb ci: Use tsan-instrumented cap'n proto in sanitizers job c332774 test: Fix failing exception check in new thread busy test ca3c05d test: Use KJ_LOG instead of std::cout for logging 7eb1da1 ci: Use tsan-instrumented libcxx in sanitizers job ec86e43 Merge bitcoin-core/libmultiprocess#220: Add log levels and advertise them to users via logging callback 515ce93 Logging: Pass LogData struct to logging callback 213574c Logging: reclassify remaining log messages e4de041 Logging: Break out expensive log messages and classify them as Trace 408874a Logging: Use new logging macros 67b092d Logging: Disable logging if messsage level is less than the requested level d0a1ba7 Logging: add log levels to mirror Core's 463a829 Logging: Disable moving or copying Logger 83a2e10 Logging: Add an EventLoop constructor to allow for user-specified log options 58cf47a Merge bitcoin-core/libmultiprocess#221: test default PassField impl handles output parameters db03a66 Merge bitcoin-core/libmultiprocess#214: Fix crash on simultaneous IPC calls using the same thread afcc40b Merge bitcoin-core/libmultiprocess#213: util+doc: Clearer errors when attempting to run examples + polished docs 6db6696 test In|Out parameter 29cf2ad test default PassField impl handles output parameters 1238170 test: simultaneous IPC calls using same thread eb069ab Fix crash on simultaneous IPC calls using the same thread ec03a96 doc: Precision and typos 2b43481 doc: Where possible, remove links to ryanofsky/bitcoin/ 286fe46 util: Add helpful error message when failing to execute file git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: a4f9296
a4f9296 Merge bitcoin-core/libmultiprocess#224: doc: fix typos f4344ae Merge bitcoin-core/libmultiprocess#222: test, ci: Fix threadsanitizer errors in mptest 1434642 doc: fix typos 73d22ba test: Fix tsan race in thread busy test b74e1bb ci: Use tsan-instrumented cap'n proto in sanitizers job c332774 test: Fix failing exception check in new thread busy test ca3c05d test: Use KJ_LOG instead of std::cout for logging 7eb1da1 ci: Use tsan-instrumented libcxx in sanitizers job ec86e43 Merge bitcoin-core/libmultiprocess#220: Add log levels and advertise them to users via logging callback 515ce93 Logging: Pass LogData struct to logging callback 213574c Logging: reclassify remaining log messages e4de041 Logging: Break out expensive log messages and classify them as Trace 408874a Logging: Use new logging macros 67b092d Logging: Disable logging if messsage level is less than the requested level d0a1ba7 Logging: add log levels to mirror Core's 463a829 Logging: Disable moving or copying Logger 83a2e10 Logging: Add an EventLoop constructor to allow for user-specified log options 58cf47a Merge bitcoin-core/libmultiprocess#221: test default PassField impl handles output parameters db03a66 Merge bitcoin-core/libmultiprocess#214: Fix crash on simultaneous IPC calls using the same thread afcc40b Merge bitcoin-core/libmultiprocess#213: util+doc: Clearer errors when attempting to run examples + polished docs 6db6696 test In|Out parameter 29cf2ad test default PassField impl handles output parameters 1238170 test: simultaneous IPC calls using same thread eb069ab Fix crash on simultaneous IPC calls using the same thread ec03a96 doc: Precision and typos 2b43481 doc: Where possible, remove links to ryanofsky/bitcoin/ 286fe46 util: Add helpful error message when failing to execute file 47d79db Merge bitcoin-core/libmultiprocess#201: bug: fix mptest hang, ProxyClient<Thread> deadlock in disconnect handler f15ae9c Merge bitcoin-core/libmultiprocess#211: Add .gitignore 4a269b2 bug: fix ProxyClient<Thread> deadlock if disconnected as IPC call is returning 85df964 Use try_emplace in SetThread instead of threads.find ca9b380 Use std::optional in ConnThreads to allow shortening locks 9b07991 doc: describe ThreadContext struct and synchronization requirements d60db60 proxy-io.h: add Waiter::m_mutex thread safety annotations 4e365b0 ci: Use -Wthread-safety not -Wthread-safety-analysis 15d7baf Add .gitignore fe1cd8c Merge bitcoin-core/libmultiprocess#208: ci: Test minimum cmake version in olddeps job b713a0b Merge bitcoin-core/libmultiprocess#207: ci: output CMake version in CI script 0f58039 ci: Test minimum cmake version in olddeps job d603dcc ci: output CMake version in CI script git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: a4f9296
|
Post-merge ACK 73d22ba. Reviewed the test changes, and the c-i changes make sense to me, but I didn't repro before or after. |
a4f9296964 Merge bitcoin-core/libmultiprocess#224: doc: fix typos f4344ae87d Merge bitcoin-core/libmultiprocess#222: test, ci: Fix threadsanitizer errors in mptest 1434642b38 doc: fix typos 73d22ba2e9 test: Fix tsan race in thread busy test b74e1bba01 ci: Use tsan-instrumented cap'n proto in sanitizers job c332774409 test: Fix failing exception check in new thread busy test ca3c05d567 test: Use KJ_LOG instead of std::cout for logging 7eb1da120a ci: Use tsan-instrumented libcxx in sanitizers job ec86e4336e Merge bitcoin-core/libmultiprocess#220: Add log levels and advertise them to users via logging callback 515ce93ad3 Logging: Pass LogData struct to logging callback 213574ccc4 Logging: reclassify remaining log messages e4de0412b4 Logging: Break out expensive log messages and classify them as Trace 408874a78f Logging: Use new logging macros 67b092d835 Logging: Disable logging if messsage level is less than the requested level d0a1ba7ebf Logging: add log levels to mirror Core's 463a8296d1 Logging: Disable moving or copying Logger 83a2e10c0b Logging: Add an EventLoop constructor to allow for user-specified log options 58cf47a7fc Merge bitcoin-core/libmultiprocess#221: test default PassField impl handles output parameters db03a663f5 Merge bitcoin-core/libmultiprocess#214: Fix crash on simultaneous IPC calls using the same thread afcc40b0f1 Merge bitcoin-core/libmultiprocess#213: util+doc: Clearer errors when attempting to run examples + polished docs 6db6696283 test In|Out parameter 29cf2ada75 test default PassField impl handles output parameters 1238170f68 test: simultaneous IPC calls using same thread eb069ab75d Fix crash on simultaneous IPC calls using the same thread ec03a9639a doc: Precision and typos 2b43481935 doc: Where possible, remove links to ryanofsky/bitcoin/ 286fe469c9 util: Add helpful error message when failing to execute file git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: a4f92969649018ca70f949a09148bccfeaecd99a
0f01e15 Squashed 'src/ipc/libmultiprocess/' changes from 47d79db..a4f9296 (Ryan Ofsky) Pull request description: Includes: - bitcoin-core/libmultiprocess#213 - bitcoin-core/libmultiprocess#214 - bitcoin-core/libmultiprocess#221 - bitcoin-core/libmultiprocess#220 - bitcoin-core/libmultiprocess#222 - bitcoin-core/libmultiprocess#224 The change bitcoin-core/libmultiprocess#220 is needed to support #33517 and fix poor performance in some cases caused by slow logging. The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh) ACKs for top commit: Sjors: utACK eda91b0 theuni: utACK eda91b0. Tree-SHA512: 43c2f47bb95f56181f3ce8cf41380e83b1c00b363a7c732d735a9115ed251fa2c2c9bd096d9be011e47503047a740b2e05c9a79d7e4170a4de9c20ad0de3e501
a4f9296964 Merge bitcoin-core/libmultiprocess#224: doc: fix typos f4344ae87d Merge bitcoin-core/libmultiprocess#222: test, ci: Fix threadsanitizer errors in mptest 1434642b38 doc: fix typos 73d22ba2e9 test: Fix tsan race in thread busy test b74e1bba01 ci: Use tsan-instrumented cap'n proto in sanitizers job c332774409 test: Fix failing exception check in new thread busy test ca3c05d567 test: Use KJ_LOG instead of std::cout for logging 7eb1da120a ci: Use tsan-instrumented libcxx in sanitizers job ec86e4336e Merge bitcoin-core/libmultiprocess#220: Add log levels and advertise them to users via logging callback 515ce93ad3 Logging: Pass LogData struct to logging callback 213574ccc4 Logging: reclassify remaining log messages e4de0412b4 Logging: Break out expensive log messages and classify them as Trace 408874a78f Logging: Use new logging macros 67b092d835 Logging: Disable logging if messsage level is less than the requested level d0a1ba7ebf Logging: add log levels to mirror Core's 463a8296d1 Logging: Disable moving or copying Logger 83a2e10c0b Logging: Add an EventLoop constructor to allow for user-specified log options 58cf47a7fc Merge bitcoin-core/libmultiprocess#221: test default PassField impl handles output parameters db03a663f5 Merge bitcoin-core/libmultiprocess#214: Fix crash on simultaneous IPC calls using the same thread afcc40b0f1 Merge bitcoin-core/libmultiprocess#213: util+doc: Clearer errors when attempting to run examples + polished docs 6db6696283 test In|Out parameter 29cf2ada75 test default PassField impl handles output parameters 1238170f68 test: simultaneous IPC calls using same thread eb069ab75d Fix crash on simultaneous IPC calls using the same thread ec03a9639a doc: Precision and typos 2b43481935 doc: Where possible, remove links to ryanofsky/bitcoin/ 286fe469c9 util: Add helpful error message when failing to execute file git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: a4f92969649018ca70f949a09148bccfeaecd99a
abcd4c4 Squashed 'src/ipc/libmultiprocess/' changes from 13424cf..a4f9296 (Ryan Ofsky) Pull request description: Includes: - bitcoin-core/libmultiprocess#207 - bitcoin-core/libmultiprocess#208 - bitcoin-core/libmultiprocess#211 - bitcoin-core/libmultiprocess#201 - bitcoin-core/libmultiprocess#213 - bitcoin-core/libmultiprocess#214 - bitcoin-core/libmultiprocess#221 - bitcoin-core/libmultiprocess#220 - bitcoin-core/libmultiprocess#222 - bitcoin-core/libmultiprocess#224 Corresponding to #32641 and #33518 in master. The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh) They can also be verified by checking `src/ipc/libmultiprocess/` contents are the same in master. (See also #33439). ACKs for top commit: Sjors: ACK ae63cc4 theuni: ACK ae63cc4 . Verified that it's the same as what's in master. Tree-SHA512: 6c9462d5fb9201ee8ace900d7d02bfb6d0c7aa3d2f22475dc55e55e0239e2d20ed69f572c0df233da7910375e9d8ccaf3e84bf949ae92df27b88f16adb26dd7a
4e3f8fa doc: add instructions for using act (Sjors Provoost) 81712ff ci: disable KVM and sandbox inside act containers (Sjors Provoost) Pull request description: Facilitate using [act](https://github.com/nektos/act) with Docker / Podman as an alternative for using nix directly. I found this very useful for testing the sanitizer job against individual commits in #222. That is, once I finally got it to work... This disables `sandbox` and `filter-syscalls` (but not in the CI environment), which seems fine given that anyone building this code on their own machine has to trust it anyway. ACKs for top commit: ryanofsky: Code review ACK 4e3f8fa. Nice changes, and sorry for not reviewing this earlier. This seems like a useful feature and I plan to use it myself to test githuba ctions changes. Setting up the `/nix` subvolume in the instructions is also really nice since it should enable builds to run really quickly. Tree-SHA512: 0f18f1ce5662003c042099d2804af8c3b1867940c5db96fad63bad79c42d0c47503dd6c7a1e9b30092051e6fdd574b9e650f0ee0161dcca076b4819540876975
abcd4c4 Squashed 'src/ipc/libmultiprocess/' changes from 13424cf..a4f9296 (Ryan Ofsky) Pull request description: Includes: - bitcoin-core/libmultiprocess#207 - bitcoin-core/libmultiprocess#208 - bitcoin-core/libmultiprocess#211 - bitcoin-core/libmultiprocess#201 - bitcoin-core/libmultiprocess#213 - bitcoin-core/libmultiprocess#214 - bitcoin-core/libmultiprocess#221 - bitcoin-core/libmultiprocess#220 - bitcoin-core/libmultiprocess#222 - bitcoin-core/libmultiprocess#224 Corresponding to bitcoin#32641 and bitcoin#33518 in master. The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh) They can also be verified by checking `src/ipc/libmultiprocess/` contents are the same in master. (See also bitcoin#33439). ACKs for top commit: Sjors: ACK 7788449 theuni: ACK 7788449 . Verified that it's the same as what's in master. Tree-SHA512: 6c9462d5fb9201ee8ace900d7d02bfb6d0c7aa3d2f22475dc55e55e0239e2d20ed69f572c0df233da7910375e9d8ccaf3e84bf949ae92df27b88f16adb26dd7a
27ada40809 build: move library sources under lib/ for subtree split REVERT: 3c69d12 Merge bitcoin-core/libmultiprocess#260: event loop: tolerate unexpected exceptions in `post()` callbacks REVERT: b8a48c6 event loop: tolerate unexpected exceptions in `post()` callbacks REVERT: f787863 Merge bitcoin-core/libmultiprocess#270: doc: Bump version 10 > 11 REVERT: a22f602 doc: Bump version 10 > 11 REVERT: 3edbe8f Merge bitcoin-core/libmultiprocess#268: Use throwRecoverableException instead of raw throw for stored exceptions REVERT: 23be44b Use throwRecoverableException instead of raw throw for stored exceptions REVERT: 75c2a27 Merge bitcoin-core/libmultiprocess#266: test: increase spawn test child timeout to 30 seconds REVERT: 8b5f805 Merge bitcoin-core/libmultiprocess#267: doc: Bump version 9 > 10 REVERT: cc0b23f test: increase spawn test child timeout to 30 seconds REVERT: 050f878 doc: Improve versions.md descriptions and formatting REVERT: c6a288a doc: Bump version 9 > 10 REVERT: 70f632b Merge bitcoin-core/libmultiprocess#265: ci: set LC_ALL in shell scripts REVERT: 8e8e564 Merge bitcoin-core/libmultiprocess#249: fixes for race conditions on disconnects REVERT: 05d34cc ci: set LC_ALL in shell scripts REVERT: e606fd8 Merge bitcoin-core/libmultiprocess#264: ci: reduce nproc multipliers REVERT: ff0eed1 refactor: Use loop variable in type-context.h REVERT: ff1d8ba refactor: Move type-context.h getParams() call closer to use REVERT: 1dbc59a race fix: m_on_cancel called after request finishes REVERT: 1643d05 test: m_on_cancel called after request finishes REVERT: f5509a3 race fix: getParams() called after request cancel REVERT: 4a60c39 test: getParams() called after request cancel REVERT: f11ec29 race fix: worker thread destroyed before it is initialized REVERT: a1d6433 test: worker thread destroyed before it is initialized REVERT: 3360233 ci: reduce nproc multipliers REVERT: b090beb Merge bitcoin-core/libmultiprocess#256: ci: cache gnu32 nix store REVERT: be86228 ci: cache gnu32 nix store REVERT: 975270b Merge bitcoin-core/libmultiprocess#263: ci: bump timeout factor to 40 REVERT: 09f10e5 ci: bump timeout factor to 40 REVERT: db8f76a Merge bitcoin-core/libmultiprocess#253: ci: run some Bitcoin Core CI jobs REVERT: 55a9b55 ci: set Bitcoin Core CI test repetition REVERT: fb0fc84 ci: add TSan job with instrumented libc++ REVERT: 0f29c38 ci: add Bitcoin Core IPC tests (ASan + macOS) REVERT: 3f64320 Merge bitcoin-core/libmultiprocess#262: ci: enable clang-tidy in macOS job, use nullptr REVERT: cd9f8bd Merge bitcoin-core/libmultiprocess#258: log: add socket connected info message and demote destroy logs to debug REVERT: b5d6258 Merge bitcoin-core/libmultiprocess#255: fix: use unsigned char cast and sizeof in LogEscape escape sequence REVERT: d94688e Merge bitcoin-core/libmultiprocess#251: Improved CustomBuildField for std::optional in IPC/libmultiprocess REVERT: a9499fa mp: use nullptr with pthread_threadid_np REVERT: f499e37 ci: enable clang-tidy in macOS job REVERT: 98f1352 log: add socket connected info message and demote destroy logs to debug REVERT: 554a481 fix: use unsigned char cast and sizeof in LogEscape escape sequence REVERT: 1977b9f Use std::forward in CustomBuildField for std::optional to allow move semantics, resolves FIXME REVERT: 22bec91 Merge bitcoin-core/libmultiprocess#247: type-map: Work around LLVM 22 "out of bounds index" error REVERT: 8a5e3ae Merge bitcoin-core/libmultiprocess#242: proxy-types: add CustomHasField hook to map Cap'n Proto values to null C++ values REVERT: e8d3524 Merge bitcoin-core/libmultiprocess#246: doc: Bump version 8 > 9 REVERT: 97d8770 proxy-types: add CustomHasField hook for nullable decode paths REVERT: 8c2f102 refactor: add missing includes to mp/type-data.h REVERT: b1638ac doc: Bump version 8 > 9 REVERT: f61af48 type-map: Work around LLVM 22 "out of bounds index" error REVERT: 1868a84 Merge bitcoin-core/libmultiprocess#245: type-context.h: Extent cancel_mutex lock to prevent theoretical race REVERT: fd4a90d Merge bitcoin-core/libmultiprocess#244: ci: suppress two tidy lint issues REVERT: 16dfc36 ci: avoid bugprone-unused-return-value lint in test REVERT: dacd5ed ci: suppress nontrivial-threadlocal lint in proxy.cpp REVERT: ef96a5b doc: Comment cleanups after bitcoin#240 REVERT: e0f1cd7 type-context.h: Extent cancel_mutex lock to prevent theoretical race REVERT: 290702c Merge bitcoin-core/libmultiprocess#240: Avoid errors from asynchronous (non-c++) clients REVERT: 3a69d47 Merge bitcoin-core/libmultiprocess#241: doc: Bump version number v7 -> v8 REVERT: 0174450 Prevent crash on unclean disconnect if abandoned IPC call returns interface pointer REVERT: ddb5f74 Allow simultaneous calls on same Context.thread REVERT: c4762c7 refactor: Add ProxyServer<Thread>::post() method REVERT: 0ade1b4 doc: Bump version number REVERT: 1fc6500 Merge bitcoin-core/libmultiprocess#237: Made SpawnProcess() behavior safe post fork() REVERT: 5205a87 test: check SpawnProcess post-fork safety REVERT: 69652f0 Precompute argv before fork in SpawnProcess REVERT: 30a8681 SpawnProcess: avoid fd leak on close failure REVERT: d0fc108 Merge bitcoin-core/libmultiprocess#196: ci: Add NetBSD job REVERT: 7b171f4 Merge bitcoin-core/libmultiprocess#234: doc: Fix typos and grammar in documentation and comments REVERT: 861da39 ci: Add NetBSD job REVERT: 458745e Fix various typos, spelling mistakes, and grammatical errors in design.md and source code comments. REVERT: 585decc Merge bitcoin-core/libmultiprocess#236: ci: Install binary package `capnproto` on OpenBSD instead of building it REVERT: 14e926a refactor: extract MakeArgv helper REVERT: 1ee9093 ci: Install binary package `capnproto` on OpenBSD instead of building it REVERT: 470fc51 Merge bitcoin-core/libmultiprocess#230: cmake: add ONLY_CAPNP target_capnp_sources option REVERT: 2d8886f Merge bitcoin-core/libmultiprocess#228: Add versions.md and version.h files describing version branches and tags REVERT: c1838be Merge bitcoin-core/libmultiprocess#225: Improve and document act support REVERT: a173f17 Merge bitcoin-core/libmultiprocess#223: ci: Replace nix-shell with equivalent nix develop command REVERT: 625eaca Merge bitcoin-core/libmultiprocess#229: Design Documentation Update REVERT: cc234be Design doc update REVERT: 81c6526 cmake: add ONLY_CAPNP target_capnp_sources option REVERT: 6e01d2d Add versions.md and version.h files describing version branches and tags REVERT: a4f9296 Merge bitcoin-core/libmultiprocess#224: doc: fix typos REVERT: f4344ae Merge bitcoin-core/libmultiprocess#222: test, ci: Fix threadsanitizer errors in mptest REVERT: 4e3f8fa doc: add instructions for using act REVERT: 81712ff ci: disable KVM and sandbox inside act containers REVERT: 1434642 doc: fix typos REVERT: 73d22ba test: Fix tsan race in thread busy test REVERT: b74e1bb ci: Use tsan-instrumented cap'n proto in sanitizers job REVERT: c332774 test: Fix failing exception check in new thread busy test REVERT: ca3c05d test: Use KJ_LOG instead of std::cout for logging REVERT: 7eb1da1 ci: Use tsan-instrumented libcxx in sanitizers job REVERT: 18a2237 ci: Replace nix-shell with equivalent nix develop command REVERT: ec86e43 Merge bitcoin-core/libmultiprocess#220: Add log levels and advertise them to users via logging callback REVERT: 515ce93 Logging: Pass LogData struct to logging callback REVERT: 213574c Logging: reclassify remaining log messages REVERT: e4de041 Logging: Break out expensive log messages and classify them as Trace REVERT: 408874a Logging: Use new logging macros REVERT: 67b092d Logging: Disable logging if messsage level is less than the requested level REVERT: d0a1ba7 Logging: add log levels to mirror Core's REVERT: 463a829 Logging: Disable moving or copying Logger REVERT: 83a2e10 Logging: Add an EventLoop constructor to allow for user-specified log options REVERT: 58cf47a Merge bitcoin-core/libmultiprocess#221: test default PassField impl handles output parameters REVERT: db03a66 Merge bitcoin-core/libmultiprocess#214: Fix crash on simultaneous IPC calls using the same thread REVERT: afcc40b Merge bitcoin-core/libmultiprocess#213: util+doc: Clearer errors when attempting to run examples + polished docs REVERT: 6db6696 test In|Out parameter REVERT: 29cf2ad test default PassField impl handles output parameters REVERT: 1238170 test: simultaneous IPC calls using same thread REVERT: eb069ab Fix crash on simultaneous IPC calls using the same thread REVERT: ec03a96 doc: Precision and typos REVERT: 2b43481 doc: Where possible, remove links to ryanofsky/bitcoin/ REVERT: 286fe46 util: Add helpful error message when failing to execute file REVERT: 47d79db Merge bitcoin-core/libmultiprocess#201: bug: fix mptest hang, ProxyClient<Thread> deadlock in disconnect handler REVERT: f15ae9c Merge bitcoin-core/libmultiprocess#211: Add .gitignore REVERT: 4a269b2 bug: fix ProxyClient<Thread> deadlock if disconnected as IPC call is returning REVERT: 85df964 Use try_emplace in SetThread instead of threads.find REVERT: ca9b380 Use std::optional in ConnThreads to allow shortening locks REVERT: 9b07991 doc: describe ThreadContext struct and synchronization requirements REVERT: d60db60 proxy-io.h: add Waiter::m_mutex thread safety annotations REVERT: 4e365b0 ci: Use -Wthread-safety not -Wthread-safety-analysis REVERT: 15d7baf Add .gitignore REVERT: fe1cd8c Merge bitcoin-core/libmultiprocess#208: ci: Test minimum cmake version in olddeps job REVERT: b713a0b Merge bitcoin-core/libmultiprocess#207: ci: output CMake version in CI script REVERT: 0f58039 ci: Test minimum cmake version in olddeps job REVERT: d603dcc ci: output CMake version in CI script REVERT: 13424cf Merge bitcoin-core/libmultiprocess#205: cmake: check for Cap'n Proto / Clang / C++20 incompatibility REVERT: 72dce11 Merge bitcoin-core/libmultiprocess#200: event loop: add LogOptions struct and reduce the log size REVERT: 8500340 eventloop: add `LogOptions` struct REVERT: 657d806 cmake: capnproto pkg missing helpful error REVERT: d314057 cmake: check for Cap'n Proto / Clang / C++20 incompatibility REVERT: 878e84d Merge bitcoin-core/libmultiprocess#203: cmake: search capnproto in package mode only REVERT: 1a85da5 Merge bitcoin-core/libmultiprocess#202: doc: correct the build instructions for the example REVERT: df01873 Merge bitcoin-core/libmultiprocess#197: ci: Add freebsd and macos build REVERT: 3bee07a cmake: search capnproto in package mode only REVERT: b6d3dc4 doc: correct the build instructions for example REVERT: fa1ac30 ci: Add macos and freebsd task REVERT: 1b8d4a6 Merge bitcoin-core/libmultiprocess#194: mpgen: Work around c++20 / capnproto 0.8 incompatibility REVERT: f1fad39 Merge bitcoin-core/libmultiprocess#195: ci: Add openbsd REVERT: eed42f2 ci: Bump all tasks to actions/checkout@v5 REVERT: 486a510 ci: Remove ancient and problematic -lstdc++fs in mpexample REVERT: dd40897 Add missing thread include REVERT: 98414e7 ci: Add openbsd REVERT: dc3ba22 cmake, doc: Add check for CVE-2022-46149 REVERT: cb170d4 Merge bitcoin-core/libmultiprocess#193: build: require CapnProto 0.7.0 or better REVERT: 8ceeaa6 ci: Add olddeps job to test old dependencies versions REVERT: c4cb758 mpgen: Work around c++20 / capnproto 0.8 incompatibility REVERT: 30930df build: require CapnProto 0.7.0 or better REVERT: b4120d3 Merge bitcoin-core/libmultiprocess#192: doc: fix typos REVERT: 6ecbdcd doc: fix typos REVERT: a11e690 Merge bitcoin-core/libmultiprocess#186: Fix mptest failures in bitcoin CI REVERT: 6f340a5 doc: fix DrahtBot LLM Linter error REVERT: c6f7fdf type-context: revert client disconnect workaround REVERT: e09143d proxy-types: fix UndefinedBehaviorSanitizer: null-pointer-use REVERT: 84b292f mptest: fix MemorySanitizer: use-of-uninitialized-value REVERT: fe4a188 proxy-io: fix race conditions in disconnect callback code REVERT: d8011c8 proxy-io: fix race conditions in ProxyClientBase cleanup handler REVERT: 97e82ce doc: Add note about Waiter::m_mutex and interaction with the EventLoop::m_mutex REVERT: 81d58f5 refactor: Rename ProxyClient cleanup_it variable REVERT: 07230f2 refactor: rename ProxyClient<Thread>::m_cleanup_it REVERT: c0efaa5 Merge bitcoin-core/libmultiprocess#187: ci: have bash scripts explicitly opt out of locale dependence. REVERT: 0d986ff mptest: fix race condition in TestSetup constructor REVERT: d2f6aa2 ci: add thread sanitizer job REVERT: 3a6db38 ci: rename configs to .bash REVERT: 401e0ce ci: add copyright to bash scripts REVERT: e956467 ci: export LC_ALL REVERT: 8954cc0 Merge bitcoin-core/libmultiprocess#184: Add CI jobs and fix clang-tidy and iwyu errors REVERT: 757e13a ci: add gnu32 cross-compiled 32-bit build REVERT: 15bf349 doc: fix typo found by DrahtBot REVERT: 1a598d5 clang-tidy: drop 'bitcoin-*' check REVERT: cbb1e43 ci: test libc++ instead of libstdc++ in one job REVERT: 7631345 type-context: disable clang-tidy UndefinedBinaryOperatorResult error REVERT: 4896e7f proxy-types: fix clang-tidy EnumCastOutOfRange error REVERT: 060a739 proxy-types: fix clang-tidy StackAddressEscape error REVERT: 977d721 ci: add github actions jobs testing gcc, clang-20, clang-tidy, and iwyu REVERT: 0d5f1fa iwyu: fix add/remove include errors REVERT: 753d2b1 util: fix clang-tidy modernize-use-equals-default error REVERT: ae4f1dc type-number: fix clang-tidy modernize-use-nullptr error REVERT: 07a741b proxy-types: fix clang-tidy bugprone-use-after-move error REVERT: 3673114 proxy-types: fix clang-tidy bugprone-use-after-move error REVERT: 422923f proxy-types: fix clang-tidy bugprone-use-after-move error REVERT: c6784c6 mpgen: disable clang-tidy misc-no-recursion error REVERT: c5498aa tidy: copy clang-tidy file from bitcoin core REVERT: 258a617 Merge bitcoin-core/libmultiprocess#160: refactor: EventLoop locking cleanups + client disconnect exception REVERT: 84cf56a test: Test disconnects during IPC calls REVERT: 949573d Prevent IPC server crash if disconnected during IPC call REVERT: 0198397 Merge bitcoin-core/libmultiprocess#179: scripted-diff: Remove copyright year (ranges) REVERT: ea38392 Prevent EventLoop async cleanup thread early exit during shutdown REVERT: 616d9a7 doc: Document ProxyClientBase destroy_connection option REVERT: 56fff76 Improve IPC client disconnected exceptions REVERT: 9b8ed3d refactor: Add clang thread safety annotations to EventLoop REVERT: 52256e7 refactor: Remove DestructorCatcher and AsyncCallable REVERT: f248947 refactor: Drop addClient/removeClient methods REVERT: 2b830e5 refactor: Use EventLoopRef instead of addClient/removeClient REVERT: 315ff53 refactor: Add ProxyContext EventLoop* member REVERT: 9aaeec3 proxy-io.h: Add EventLoopRef RAII class handle addClient/removeClient refcounting REVERT: f58c8d8 proxy-io.h: Add more detailed EventLoop comment REVERT: 5108445 test: Add test coverage for client & server disconnections REVERT: 59030c6 Merge bitcoin-core/libmultiprocess#181: type-function.h: Fix CustomBuildField overload REVERT: 688140b test: Add coverage for type-function.h REVERT: 8b96229 type-function.h: Fix CustomBuildField overload REVERT: fa2ff9a scripted-diff: Remove copyright year (ranges) REVERT: 27c7e8e Merge bitcoin-core/libmultiprocess#172: refactor: fix warnings from clang-tidy-20 and bitcoin-tidy REVERT: 2fe87d0 Merge bitcoin-core/libmultiprocess#173: doc: Fix error string typo REVERT: 57a65b8 clang-tidy: Suppress bitcoin-nontrivial-threadlocal error REVERT: 0d8012f Merge bitcoin-core/libmultiprocess#165: clang-tidy: fix warnings introduced in version 19 REVERT: 3a96cdc clang-tidy: Fix bugprone-move-forwarding-reference error REVERT: c1e8c1a clang-tidy: Fix bugprone-move-forwarding-reference errors REVERT: aa19285 use ranges transform REVERT: a78137c make member function const REVERT: ca3226e replace custom tuple unpacking code with `std::apply` REVERT: 949fe85 replace SFINAE trick with `if constexpr` REVERT: 44ee4b4 doc: Fix error string typo REVERT: 35944ff Merge bitcoin-core/libmultiprocess#168: Switch `MP_INCLUDE_DIR` to global property REVERT: a77c8e1 Switch `MP_INCLUDE_DIR` to global property REVERT: f35df6b Merge bitcoin-core/libmultiprocess#166: doc: rename from chaincodelabs to bitcoin-core REVERT: 2e11997 doc: rename from chaincodelabs to bitcoin-core REVERT: 1954f7f Merge bitcoin-core/libmultiprocess#164: Bump minimum required cmake to 3.12 REVERT: 729ff16 Bump minimum required cmake to 3.12 REVERT: 011fc53 Merge bitcoin-core/libmultiprocess#161: cmake: Avoid including CTest if not top level project REVERT: 26b9f3d Merge bitcoin-core/libmultiprocess#159: bugfix: Do not lock EventLoop::mutex after EventLoop is done REVERT: a7f0669 cmake: Avoid including CTest if not top level project REVERT: 48d01bc bugfix: Do not lock EventLoop::mutex after EventLoop is done REVERT: 4089907 Merge bitcoin-core/libmultiprocess#157: refactor: Avoid using std::format REVERT: eca8fd3 refactor: Avoid using std::format REVERT: 9ba88dc Merge bitcoin-core/libmultiprocess#156: refactor: Remove locale-dependent function calls REVERT: 9119300 Merge bitcoin-core/libmultiprocess#155: scripted-diff: s/Libmultiprocess_EXTERNAL_MPGEN/MPGEN_EXECUTABLE/g REVERT: c8351c5 refactor: Remove locale-dependent function calls REVERT: 250c2ea scripted-diff: s/Libmultiprocess_EXTERNAL_MPGEN/MPGEN_EXECUTABLE/g REVERT: 9558ceb Merge bitcoin-core/libmultiprocess#152: refactor: Fix compiler and clang-tidy warnings REVERT: c6a61d8 Merge bitcoin-core/libmultiprocess#149: Avoid `-Wundef` compiler warnings REVERT: 0b8b7f9 refactor: Fix `-Wsign-compare` compiler warning REVERT: a02c079 clang-tidy: Suppress `performance-enum-size` check warning REVERT: 593807a clang-tidy: Fix `readability-container-size-empty` check REVERT: 68c1c6c clang-tidy: Fix `readability-avoid-return-with-void-value` check REVERT: 4abaa98 clang-tidy: Fix `readability-avoid-nested-conditional-operator` check REVERT: 01ef094 clang-tidy: Fix `performance-unnecessary-value-param` check REVERT: c665a43 clang-tidy: Fix `misc-use-internal-linkage` check REVERT: 15c77e9 clang-tidy: Fix `misc-include-cleaner` check REVERT: 848c902 clang-tidy: Fix `misc-const-correctness` check REVERT: 4a2508c clang-tidy: Fix `modernize-type-traits` check REVERT: 8170d3d clang-tidy: Suppress `bugprone-empty-catch` check warning REVERT: c068596 clang-tidy: Fix `bugprone-crtp-constructor-accessibility` check REVERT: 00036c0 clang-tidy: Disable `performance-avoid-endl` check REVERT: 359a615 clang-tidy: Disable `misc-use-anonymous-namespace` check REVERT: c978878 Merge bitcoin-core/libmultiprocess#145: CTest: Module must be included at the top level REVERT: 63ac092 CTest: Module must be included at the top level REVERT: d450fbf Avoid `-Wundef` compiler warnings REVERT: 477405e Merge bitcoin-core/libmultiprocess#148: util: fix -Wpessimizing-move warning REVERT: 3bce9d0 util: fix -Wpessimizing-move warning REVERT: f09c501 Merge bitcoin-core/libmultiprocess#147: cmake: EXTERNAL_MPGEN cleanups REVERT: 3d83c7a Merge bitcoin-core/libmultiprocess#146: cmake: Suppress compiler warnings from capnproto headers REVERT: 21b92b6 cmake: EXTERNAL_MPGEN cleanups REVERT: 2fdd920 Merge bitcoin-core/libmultiprocess#143: cleanup: initialize vars in the EventLoop constructor in the correct order REVERT: 0c2ac4d Merge bitcoin-core/libmultiprocess#142: build: add option for external mpgen binary REVERT: f52d08c cleanup: initialize vars in the EventLoop constructor in the correct order REVERT: 75cf04a build: add option for external mpgen binary REVERT: 72326b5 cmake: Simplify capnp include handling REVERT: 1e06ff0 Merge bitcoin-core/libmultiprocess#140: build: don't clobber user/superproject c++ version REVERT: 65c7048 cmake: Suppress compiler warnings from capnproto headers REVERT: df21535 build: don't clobber user/superproject c++ version REVERT: 07c917f Merge bitcoin-core/libmultiprocess#137: doc: Fix broken markdown links REVERT: e15816a doc: Fix broken markdown links REVERT: e89b2c6 Merge bitcoin-core/libmultiprocess#136: cmake: Support being included with add_subdirectory REVERT: 3dea1d5 Merge bitcoin-core/libmultiprocess#135: refactor: proxy-types.h API cleanup REVERT: 6adbb1d cmake: Support being included with add_subdirectory REVERT: 10bb7e4 Merge bitcoin-core/libmultiprocess#94: c++ 20 cleanups REVERT: 7d59b8d move: add mp/type-data.h REVERT: 1103f86 cmake: Define and use MP_INCLUDE_DIR variable REVERT: 798f4b5 moveonly: add mp/type-chrono.h REVERT: a595a0b moveonly: add mp/type-threadmap.h REVERT: e834ebd moveonly: add mp/type-decay.h REVERT: 5ee6cd4 moveonly: add mp/type-exception.h REVERT: 3946512 moveonly: add mp/type-void.h REVERT: 8969d5a moveonly: add mp/type-message.h REVERT: 11b418f moveonly: add mp/type-struct.h REVERT: 5df55a3 moveonly: add mp/type-function.h REVERT: 0d2f939 moveonly: add mp/type-interface.h REVERT: 5417716 moveonly: add mp/type-char.h REVERT: 83c444d moveonly: add mp/type-string.h REVERT: df1375b moveonly: add mp/type-number.h REVERT: 6d831eb moveonly: add mp/type-tuple.h REVERT: c999100 moveonly: add mp/type-pair.h REVERT: 079277f moveonly: add mp/type-map.h REVERT: 6a68472 moveonly: add mp/type-set.h REVERT: c6246c9 moveonly: add mp/type-vector.h REVERT: 619d2c7 moveonly: add mp/type-pointer.h REVERT: 3cb9d9f moveonly: add mp/type-optional.h REVERT: b32e2b0 moveonly: add mp/type-context.h REVERT: f18a1cc refactor: Rename ReadDestValue to ReadDestUpdate REVERT: 3dc1d42 Merge bitcoin-core/libmultiprocess#133: Fix debian "libatomic not found" error in downstream builds REVERT: eb27f59 Merge bitcoin-core/libmultiprocess#131: doc: fix startAsyncThread comment REVERT: caf01fa Merge bitcoin-core/libmultiprocess#130: refactor: Add CleanupRun function to dedup clean list code REVERT: 72f6669 Merge bitcoin-core/libmultiprocess#129: Fix "disconnected: write(m_post_fd, &buffer, 1): Broken pipe" EventLoop shutdown races. REVERT: 67afc23 Fix debian "libatomic not found" error in downstream builds REVERT: 0e4f88d Fix "disconnected: write(m_post_fd, &buffer, 1): Broken pipe" EventLoop shutdown races. REVERT: 063ff18 fix startAsyncThread comment REVERT: 3b2617b Merge bitcoin-core/libmultiprocess#127: ProxyClientBase: avoid static_cast to partially destructed object REVERT: 63a39d4 ProxyClientBase: avoid static_cast to partially destructed object REVERT: 700085f refactor: Add CleanupRun function to dedup clean list code REVERT: 621a04a Merge bitcoin-core/libmultiprocess#120: proxy-types.h: add static_assert to detect int/enum size mismatch REVERT: 110349f test: Add coverage for enum/int conversions REVERT: 350067f Merge bitcoin-core/libmultiprocess#121: ProxyClientBase: avoid static_cast to partially constructed object REVERT: 5b81192 ProxyClientBase: avoid static_cast to partially constructed object REVERT: bbc80ab proxy-types.h: add static_assert to detect when an int fields is too small to hold an enum value REVERT: abe254b Merge bitcoin-core/libmultiprocess#119: cmake: avoid libatomic not found error on debian REVERT: 245581d Merge bitcoin-core/libmultiprocess#118: shutdown bugfix: Prevent segfault in server if connection is broken during long function call REVERT: 196e6fc bugfix: prevent null pointer dereference in server if client disconnects during method call REVERT: 296c380 cmake: avoid libatomic not found error on debian REVERT: 9d11042 bugfix: prevent double delete segfault in server if client disconnects during method call REVERT: 181837b Merge bitcoin-core/libmultiprocess#116: shutdown bugfix: destroy RPC system before running cleanup callbacks REVERT: 2350843 shutdown bugfix: destroy RPC system before running cleanup callbacks REVERT: a4ac424 Merge bitcoin-core/libmultiprocess#113: Add missing include to util.h REVERT: 6929c40 Add missing include to util.h REVERT: f5a4957 Merge bitcoin-core/libmultiprocess#111: doc: Add internal design section REVERT: 1fa2ca7 doc: Add internal design section REVERT: 015e95f Merge bitcoin-core/libmultiprocess#110: cmake: add target_capnp_sources headers target REVERT: 66e12f1 cmake: add target_capnp_sources headers target REVERT: f67cae8 Merge bitcoin-core/libmultiprocess#109: example: Add missing thread.join() call so example can exit cleanly REVERT: 70b2d87 example: Add missing thread.join() call so example can exit cleanly REVERT: 8bb6eab Merge bitcoin-core/libmultiprocess#108: doc: Add comments for socket descriptor handling when forking REVERT: 17a2399 Merge bitcoin-core/libmultiprocess#107: example: Remove manual client adding REVERT: b56bf21 doc: Add comments for socket descriptor handling when forking REVERT: 3499810 example: Remove manual client adding REVERT: c1b4ab4 Merge bitcoin-core/libmultiprocess#106: Bugfix: Clean up ThreadContext pointers when Connection is destroyed REVERT: 8ba0d03 Bugfix: Clean up ThreadContext pointers when Connection is destroyed REVERT: a9e16da Merge bitcoin-core/libmultiprocess#105: types: Add Custom{Build,Read,Pass}Message hooks REVERT: ca2cfed types: Add Custom{Build,Read,Pass}Message hooks REVERT: 6aca5f3 Merge bitcoin-core/libmultiprocess#104: Fix $Proxy.wrap mapping for empty structs with no fields REVERT: e454072 Merge bitcoin-core/libmultiprocess#103: cmake: Fix package configuration file REVERT: 90f8b37 Fix $Proxy.wrap mapping for empty structs with no fields REVERT: c373a94 cmake: Fix package configuration file REVERT: 8b8a476 Merge bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better REVERT: 2c66dd5 doc: Document shutdown sequences better REVERT: 6cbe56e refactor, moveonly: order lambda move captures first REVERT: 8da0524 Merge bitcoin-core/libmultiprocess#101: connection: run async cleanups in LIFO not FIFO order REVERT: 1f76880 util: Get rid of unused Discard struct REVERT: c92e90c proxy-types Drop JoinPromises function REVERT: 53ee9fa Merge bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation REVERT: e45c482 Merge bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print REVERT: 6825523 connection: run async cleanups in LIFO not FIFO order REVERT: 537c645 doc: Improve ProxyServerCustom class documentation REVERT: 0c70a0f proxy-types: Fix missing space in server destroy log print REVERT: e29f74e Merge bitcoin-core/libmultiprocess#98: cmake: Combine installed packages REVERT: d4d9f93 doc: Document FunctionTraits/ProxyMethodTraits classes REVERT: 78c7dd0 doc: Document ProxyClient construct/destroy methods REVERT: e99c0b7 doc: Document clientInvoke/serverInvoke functions REVERT: 2098ae1 doc: Add comment on serverInvoke ReplaceVoid usage REVERT: a1dfb0b doc: Add comments to mp.Context PassField function on updating g_thread_context REVERT: e49a925 doc: Add comments to mp.Context PassField function on mp.Context.thread lookup REVERT: dc9b4e6 cmake: Combine installed packages REVERT: 2ed1e9a cmake: CMakeLists.txt cleanup REVERT: 3f8483b Merge bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in #95 and #96 REVERT: c6a1d7f cmake: rename new packages and module introduced in #95 and #96 REVERT: 003eb04 Merge bitcoin-core/libmultiprocess#96: cmake: Introduce packages REVERT: 19dea85 Merge bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module REVERT: 4e70ad4 cmake, refactor: Rename target export files REVERT: 694b6b1 cmake: Configure `LibmultiprocessGen` package REVERT: 3b20e35 cmake: Configure `Libmultiprocess` package REVERT: 66643d8 cmake, refactor: Use `target_capnp_sources` for examples REVERT: bd2dfe2 cmake, refactor: Use `target_capnp_sources` for `mptest` target REVERT: d9ec22f cmake: Add `LibmultiprocessMacros` module REVERT: 8da797c Merge bitcoin-core/libmultiprocess#93: Fix support for vector<bool> serialization with libc++ REVERT: 10fc3ed Fix support for vector<bool> serialization with libc++ REVERT: 7d1fee0 Merge bitcoin-core/libmultiprocess#91: util: Drop Bind, BindTuple, ComposeFn, GetFn, and ThrowFn helpers REVERT: 65260d1 util: Drop Bind, BindTuple, ComposeFn, GetFn, and ThrowFn helpers REVERT: 2cbbd09 Merge bitcoin-core/libmultiprocess#90: pkgconfig: Use @CMAKE_INSTALL_LIBDIR@ variable REVERT: 0271195 Merge bitcoin-core/libmultiprocess#89: pkgconfig: Drop -std=c++17 compile flag REVERT: 0f9605b pkgconfig: Use @CMAKE_INSTALL_LIBDIR@ variable REVERT: 590d1e7 pkgconfig: Drop -std=c++17 compile flag REVERT: 414542f Merge bitcoin-core/libmultiprocess#88: Fix current deprecation warnings as of capnproto-1.0.1 REVERT: 962e681 mpgen: Avoid deprecated SchemaParser::parseDiskFile call REVERT: e8e89df Remove deprecated kj::mvCapture calls to avoid warnings REVERT: 61d5a0e Merge bitcoin-core/libmultiprocess#86: Add support for vector<bool> serialization REVERT: 1c6fb04 Add support for vector<bool> serialization REVERT: aea56f0 Merge bitcoin-core/libmultiprocess#85: Remove naming requirement for std::pair/std::tuple REVERT: 3df4974 Remove naming requirement for std::pair/std::tuple REVERT: fc28a48 Merge #83: Introduce `clang-tidy` and optimize code REVERT: 594466a clang-tidy: Fix `readability-make-member-function-const` check REVERT: 037fec4 clang-tidy: Fix `performance-unnecessary-value-param` check REVERT: 463bead clang-tidy: Fix `performance-inefficient-vector-operation` check REVERT: a435b24 clang-tidy: Fix `performance-faster-string-find` check REVERT: ae416f9 clang-tidy: Fix `modernize-use-nullptr` check REVERT: 9f86c9a clang-tidy: Fix `modernize-use-equals-default` check REVERT: 18b52c1 clang-tidy: Fix `modernize-use-emplace` check REVERT: 1a33c35 clang-tidy: Fix `modernize-return-braced-init-list` check REVERT: 8dd83bb clang-tidy: Suppress `bugprone-suspicious-semicolon` check warning REVERT: 5e787bf Add option to run `clang-tidy` with compiler REVERT: 74e25d2 Merge #84: Avoid passing some function arguments by value REVERT: 8ef94d2 Avoid passing some function arguments by value REVERT: 917877a Merge #79: Install Exports for custom `install-{lib,bin}` targets REVERT: 2dda753 Install Exports for custom `install-{lib,bin}` targets REVERT: 54bd57f Use `GNUInstallDirs` module REVERT: 1af83d1 Merge #81: Add ReadDestTemp function to make it easier to call ReadField with less boilerplate REVERT: e66e6e8 Merge #82: build: Fix missing Cap'n Proto include directories REVERT: c753623 build: Fix missing Cap'n Proto include directories REVERT: 70d108b Add ReadDestTemp function to make it easier to call ReadField with less boilerplate REVERT: 7441069 Merge #80: doc: Fix mpgen usage string REVERT: fcad5fb doc: Fix mpgen usage string REVERT: ddd2cee Merge #78: refactor: Do not shadow `InvokeContext::connection` member REVERT: f999694 refactor: Do not shadow `InvokeContext::connection` member REVERT: 4992b52 Merge #74: Add `install-lib` and `install-bin` build targets REVERT: fa130db Add `install-bin` target REVERT: c4d26d2 Add `install-lib` target REVERT: bc3d166 Install `proxy.capnp` with `mpgen` target REVERT: f85feff Merge #73: Drop unneeded include directory REVERT: 80dc922 Merge #72: Make `mpgen` target independent from `multiprocess` one REVERT: d321ef8 Merge #71: Use defined `CXX_STANDARD` for environment introspection REVERT: 331b5a6 Merge #70: Fix check for `pthread_threadid_np` REVERT: d36ebb9 Drop unneeded include directory REVERT: 665d1fd Make `mpgen` target independent from `multiprocess` one REVERT: 2eff5da Use defined `CXX_STANDARD` for environment introspection REVERT: 373d0d7 Fix check for `pthread_threadid_np` REVERT: c6849de Merge #69: Fix CMake minimum required version REVERT: 6902bfd Fix CMake minimum required version REVERT: 49dc279 Merge bitcoin-core/libmultiprocess#66: Fix typos REVERT: 9f4dac6 Fix typos REVERT: 7d10f3b Merge bitcoin-core/libmultiprocess#65: Fix clang "unknown warning group" errors REVERT: 680776f Fix clang "unknown warning group" errors REVERT: bc6624a Merge bitcoin-core/libmultiprocess#64: cleanup: Remove AUTORET macro and clean up PassField overrides REVERT: d2a9db9 Merge bitcoin-core/libmultiprocess#63: Fix mptest link error caused by missing kj-async dependency REVERT: cf7ebfe Replace ThreadMap Passfield override with generic count(0) override REVERT: 3f388cf Inline last AUTO_RETURN uses and remove macro REVERT: 41db49c Consolidate PassField function to remove AUTO_RETURN uses REVERT: 1d00505 Replace output.init AUTO_RETURN uses with decltype(auto) REVERT: ea1a77b Replace AUTO_RETURN uses with decltype(auto) REVERT: 029d84f Fix mptest link error caused by missing kj-async dependency REVERT: 306c8b1 Merge bitcoin-core/libmultiprocess#62: Fix clang compiler warnings REVERT: 1b638d6 Avoid delete-non-abstract-non-virtual-dtor warnings for mp::ProxyCallbackImpl REVERT: 5738b8a Avoid delete-non-abstract-non-virtual-dtor warnings REVERT: 921e23e Disable clang suggest-override warnings for proxy clients REVERT: 34ce921 Merge bitcoin-core/libmultiprocess#58: Fix std::move compiler warning REVERT: 49004c8 Merge bitcoin-core/libmultiprocess#57: doc/install.md: add cmake to brew install command REVERT: e386cfa Fix std::move compiler warning REVERT: 424d635 doc/install.md: add cmake to brew install command REVERT: 8abd3da Merge #55: Add doc/ folder, split up readme and add more usage documentation REVERT: 1a3dc8d Add documentation about interface definitions REVERT: 5539208 Split up README.md REVERT: 805eb73 Merge #49: Add standalone example with 3 processes REVERT: 4b45e14 Add standalone example with 3 processes REVERT: 17bfda9 Merge #48: Move test/src/ files one level up REVERT: b648f2a Merge #47: gen.cpp: Check local includes before install includes REVERT: 8b5259c Move test/src/ files one level up REVERT: c2f866f Merge #45: Comments and LogEscape REVERT: 1007bd7 gen.cpp: Check local includes before install includes REVERT: 22afe27 util: fix LogEscape bug REVERT: 89ababd doc: add note on vats REVERT: 6e36f0f doc: fix various typos REVERT: b6e060a README: add kj explainer REVERT: d576d97 Merge #43: Drop hardcoded #include lines in generated files REVERT: 35d2091 Merge #42: Support attaching custom cleanup functions to proxy client and server classes REVERT: 2ccc479 Drop hardcoded #include lines in generated files REVERT: ce8e8b6 Add ProxyTypeRegister typeid map REVERT: fbdaaa7 Add cleanup callbacks to ProxyContext REVERT: 34e9b78 refactor: Move connection field to ProxyContext struct REVERT: 39ad0f5 Generate ProxyType traits for interface types REVERT: 1b4012c Merge #41: Avoid depending on argument default constructors REVERT: 0e97be3 Avoid depending on argument default constructors REVERT: 4dcd807 Merge #40: Disable GCC suggest-override warnings for proxy clients REVERT: 05f9817 Disable GCC suggest-override warnings for proxy clients REVERT: 4c59977 Merge #38: Add "extends" inherited method support REVERT: de748be Add "extends" inherited method support REVERT: 9f5b835 Merge #37: Add "make check" target to build and run tests REVERT: 0378353 Add "make check" target to build and run tests REVERT: 9d23fdd Merge #35: Fix README.md markdown REVERT: 4d946aa Fix README.md markdown REVERT: 5741d75 Merge #34: Add shared_ptr callback support REVERT: 9ce0335 Add comment saying how to fix clientInvoke missing Proxy.Context assert REVERT: 31b4f1b Add shared_ptr ownership and lifetime support REVERT: 27f8a35 Add saveCallback / callbackSaved test setup REVERT: 5390a1b Add support for passing shared_ptrs without extending lifetime REVERT: 39bbf74 Add CustomReadField priority param for more flexibility and consistency with CustomBuildField REVERT: da489be Fix bugs in PassField overload for callback objects passed by reference REVERT: ab4568b Add test coverage for thread map and callbacks REVERT: 1d630f5 Merge #33: Fix empty exception values from bad ThrowFn declaration REVERT: c3efcae Fix empty exception values from bad ThrowFn declaration REVERT: 78f2f75 Merge #31: Unify ReadFieldNew / ReadFieldUpdate REVERT: 112f364 Unify ReadFieldNew / ReadFieldUpdate REVERT: c0e3a50 Merge #25: Obliterate Boost REVERT: 10b5c69 Obliterate Boost REVERT: f4112b7 Switch from C++14 to C++17 REVERT: f2ea4b9 Merge #30: proxy-io.h: fix missing assert.h include REVERT: e2ad13a Merge #29: Update make test command in readme REVERT: fad36ab proxy-io.h: fix missing assert.h include REVERT: 4d78645 Merge #28: CMake workarounds for ubuntu capnproto 0.6.1 compatibility REVERT: c8923eb Update make test command in readme REVERT: 097bce2 Merge #24: Don't print a dash if thread name is not known REVERT: a440eda Merge #23: Tell std::system_error() which function failed REVERT: b09973b CMake workarounds for ubuntu capnproto 0.6.1 compatibility REVERT: 570db83 Don't print a dash if thread name is not known REVERT: d6dac63 Tell std::system_error() which function failed REVERT: 49a9637 Merge #22: Handle fork(2) failures REVERT: 50b6a7f Merge #21: Refactor ThreadName() to improve its portability REVERT: 16ebae8 Handle fork(2) failures REVERT: f1857e3 Refactor ThreadName() to improve its portability REVERT: fe76b28 Merge #19: Fix compilation of foo.h: include <string> REVERT: 829741c Merge #18: A followup to a616312: remove unnecessary call REVERT: c92112a Fix compilation of foo.h: include <string> REVERT: 3b5da8f A followup to a616312: remove unnecessary call REVERT: d3388da Merge #17: Avoid using boost::optional in PassField() REVERT: a616312 Avoid using boost::optional in PassField() REVERT: abb3ae9 Merge #16: Reduce boost usage REVERT: fb73b81 Change EventLoop::m_task_set to not use boost REVERT: 138ad67 Change Field::(param and result) to not use boost REVERT: 5724a2c Remove boost usage from GetAnnotation() REVERT: cab9c51 Remove unnecessary boost include REVERT: e0319f4 Merge #15: Add ListenConnections function REVERT: d519e18 Add ListenConnections function REVERT: d24cae6 Merge #14: Add simpler ServeStream function REVERT: 710238c Add simpler ServeStream function REVERT: 5f42547 Merge #13: Add mpgen.mk makefile rules REVERT: b72ec47 Add mpgen.mk makefile rules REVERT: 86d5a45 Merge #12: Add Eventloop void* context pointer REVERT: 2a2549c Merge #11: Replace ProxyServer connection pointer with reference REVERT: 4907c5d Add Eventloop void* context pointer REVERT: e7687db Replace ProxyServer connection pointer with reference REVERT: bd8ee26 Merge #10: Remove #include <syscall.h> to avoid mac os build error REVERT: 4e452e9 Remove #include <syscall.h> to avoid mac os build error REVERT: 9cd1a5a Merge #9: Invoke capnp compile from mpgen REVERT: f89e4b3 Invoke capnp compile from mpgen REVERT: dee0711 Merge #8: Add Connnect/Serve/Spawn/Wait functions REVERT: 8125688 Merge #7: Add ProxyClientBase destroy_connection option REVERT: f324c66 Add Connnect/Serve/Spawn/Wait functions REVERT: da73a67 Merge #6: Explicitly request C++14 compiler REVERT: c685fa9 Add ProxyClientBase destroy_connection option REVERT: 409fe97 Explicitly request C++14 compiler REVERT: 45785e7 Merge #3: Limit LogEscape string size REVERT: 99bc4c5 Merge #2: Set mpgen rpath REVERT: 724d2f7 Limit LogEscape string size REVERT: 4dcf39f Set mpgen rpath REVERT: cf5afd6 Merge #1: Fix libmultiprocess.pc install path REVERT: 1bc076f Fix libmultiprocess.pc install path REVERT: 06e1045 libmultiprocess initial commit git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 27ada4080964d26fed43d1c7329ba54b4c86199f
…t reduced logging 0f01e15 Squashed 'src/ipc/libmultiprocess/' changes from 47d79db8a552..a4f929696490 (Ryan Ofsky) Pull request description: Includes: - bitcoin-core/libmultiprocess#213 - bitcoin-core/libmultiprocess#214 - bitcoin-core/libmultiprocess#221 - bitcoin-core/libmultiprocess#220 - bitcoin-core/libmultiprocess#222 - bitcoin-core/libmultiprocess#224 The change bitcoin-core/libmultiprocess#220 is needed to support #33517 and fix poor performance in some cases caused by slow logging. The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh) ACKs for top commit: Sjors: utACK 641a64b theuni: utACK 641a64b. Tree-SHA512: 43c2f47bb95f56181f3ce8cf41380e83b1c00b363a7c732d735a9115ed251fa2c2c9bd096d9be011e47503047a740b2e05c9a79d7e4170a4de9c20ad0de3e501
…t reduced logging 0f01e15 Squashed 'src/ipc/libmultiprocess/' changes from 47d79db8a552..a4f929696490 (Ryan Ofsky) Pull request description: Includes: - bitcoin-core/libmultiprocess#213 - bitcoin-core/libmultiprocess#214 - bitcoin-core/libmultiprocess#221 - bitcoin-core/libmultiprocess#220 - bitcoin-core/libmultiprocess#222 - bitcoin-core/libmultiprocess#224 The change bitcoin-core/libmultiprocess#220 is needed to support #33517 and fix poor performance in some cases caused by slow logging. The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh) ACKs for top commit: Sjors: utACK a3bc09a theuni: utACK a3bc09a. Tree-SHA512: 43c2f47bb95f56181f3ce8cf41380e83b1c00b363a7c732d735a9115ed251fa2c2c9bd096d9be011e47503047a740b2e05c9a79d7e4170a4de9c20ad0de3e501
…t reduced logging 0f01e15 Squashed 'src/ipc/libmultiprocess/' changes from 47d79db8a552..a4f929696490 (Ryan Ofsky) Pull request description: Includes: - bitcoin-core/libmultiprocess#213 - bitcoin-core/libmultiprocess#214 - bitcoin-core/libmultiprocess#221 - bitcoin-core/libmultiprocess#220 - bitcoin-core/libmultiprocess#222 - bitcoin-core/libmultiprocess#224 The change bitcoin-core/libmultiprocess#220 is needed to support #33517 and fix poor performance in some cases caused by slow logging. The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh) ACKs for top commit: Sjors: utACK eda91b07fd9f2a6af3c31659d51f51aacf8989c4 theuni: utACK eda91b07fd9f2a6af3c31659d51f51aacf8989c4. Tree-SHA512: 43c2f47bb95f56181f3ce8cf41380e83b1c00b363a7c732d735a9115ed251fa2c2c9bd096d9be011e47503047a740b2e05c9a79d7e4170a4de9c20ad0de3e501
This PR fixes threadsanitizer errors that were found in bitcoin CI and reported by maflcko in bitcoin/bitcoin#33518 (comment). It also extends the libmultiprocess sanitize CI job to report the same errors.
Before this PR, libmultiprocess was built with threadsanitzer in CI, but cap'n proto and libc++ dependencies were built without it, so races in these libraries could be undetected.
Building libc++ with threadsanitzer triggered threadsanitzer errors about accessing
std::coutfrom multiple threads. Those errors are suppressed in bitcoin CI, but there is not really a reason to suppress there here, so they are just fixed by replacingstd::coutwithKJ_LOGin the test. This change also cleans upmptestoutput, which is nice. Full output can be seen by runningmptest --verbose.Building cap'nproto with threadsanitzer triggered threadsanitzer errors in the new "thread busy" test added in #214. These were just caused by accessing some test variables from two different threads and are fixed in the last commit here.