event loop: tolerate unexpected exceptions in post() callbacks - #260
Conversation
|
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 copy-paste |
| int post_fd{m_post_fd}; | ||
| KJ_DEFER({ | ||
| Lock lock(m_mutex); | ||
| m_cv.wait(lock.m_lock, [this]() MP_REQUIRES(m_mutex) { return m_num_clients == 0; }); |
There was a problem hiding this comment.
In commit "fix: EventLoop::post() deadlocks when posted function throws" (c6ad605)
It seems like waiting for clients to be released here might just replace one deadlock with another deadlock in the general case m_post_fn throws and there is not just a single client.
I tend to think if m_post_fn is going to throws, reasonable things to do might be:
- Abort so this is detected as a bug
- Or keep executing the event loop, but log an error
- Or let the exception immediately propagate to the caller like happens currently.
Trying to propagate the exception, but waiting for resources to be freed and possibly hanging seems like it adds more complexity without providing a reliable benefit
There was a problem hiding this comment.
oh ok, I didn't notice that. thanks for catching it.
I tend to think if m_post_fn is going to throws, reasonable things to do might be:
* Abort so this is detected as a bug * Or keep executing the event loop, but log an error * Or let the exception immediately propagate to the caller like happens currently.
I think the best and simplest solution here is keeping the executing of the event loop and just log an error. what do you think?
There was a problem hiding this comment.
re: #260 (comment)
I think the best and simplest solution here is keeping the executing of the event loop and just log an error. what do you think?
Yes I think logging the exception here would be a simple improvement that should help debugging. Would recommend kj::runCatchingExceptions for that and kj::str() to turn the exception into a string.
Using catch (...) { eptr = std::current_exception(); } to catch the exception in the event loop thread and std::rethrow_exception(eptr); to rethrow it EventLoop::post() could be a different improvement that would help debugging, but I don't know if it would add too much complexity.
Keeping the event loop running after the exception is thrown should also be an improvement.
c6ad605 to
5cf3278
Compare
There was a problem hiding this comment.
Thanks for the logging improvement!
Forgot when I wrote this that this change isn't only a logging improvement, but it also changes execution because EventLoop::post will now return on failure instead of hanging, and other I/O events will now continue to be processed. Would be good to mention these things in the pr/commit description and maybe change title to something like "event loop: tolerate unexpected exceptions in post() callbacks"
EventLoop::post() deadlocks when posted function throwspost() callbacks
5cf3278 to
7b26641
Compare
|
is there anything else that should be added? |
ryanofsky
left a comment
There was a problem hiding this comment.
Code review ACK 7b26641. Thanks for the updates!
I am increasingly thinking the best thing would be for EventLoop::post to throw an exception when the callback throws an exception, instead of not returning like happens currently, or returning without failing like happens with this PR. (std::current_exception std::rethrow_exception could be useful for this.)
But It is probably not worth adding much complexity for this case since it is never expected to happen. And the logging added by this PR should at least be helpful for debugging. Just commenting to suggest possible followups.
|
I was about to merge this but I see IWYU failures when building locally (I didn't notice that CI was skipped for this PR): I think these need to be fixed before this can be merged. |
|
Done! Can you rerun the ci again? |
Sure. Also would recommend squashing commits https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits |
|
Code review 0dfe095. Looks like there is another CI failure https://github.com/bitcoin-core/libmultiprocess/actions/runs/23966308399/job/69937803736?pr=260. Can be fixed with: --- a/src/mp/proxy.cpp
+++ b/src/mp/proxy.cpp
@@ -249,7 +249,7 @@ void EventLoop::loop()
// m_post_fn throwing is never expected. If it does happen, the caller
// of EventLoop::post() will return without any indication of failure,
// which will likely cause other bugs. Log the error and continue.
- KJ_IF_MAYBE(exception, kj::runCatchingExceptions([&]() { Unlock(lock, *m_post_fn); })) {
+ KJ_IF_MAYBE(exception, kj::runCatchingExceptions([&]() MP_REQUIRES(m_mutex) { Unlock(lock, *m_post_fn); })) {
MP_LOG(*this, Log::Error) << "EventLoop: m_post_fn threw: " << kj::str(*exception).cStr();
}
m_post_fn = nullptr; |
0dfe095 to
b8a48c6
Compare
|
Can you rerun the ci again please? |
|
I think the ci failure is not related |
ryanofsky
left a comment
There was a problem hiding this comment.
Code review ACK b8a48c6. Since last review just squashed commits and added missing thread safety annotation. This change is a probably an improvement from a debugging perspective since it will now always log an error when an unexpected exception happens. It is not a clear improvement in behavior since continuing after an unexpected failure could potentially be worse than hanging, but the difference is unlikely to be significant. Probably the best thing would be to catch and rethrow the exception.
Planning to merge this since the logging could be helpful
a1748e2fae proxy: Fix shutdownWrite() exception handling on macOS with dynamic libraries d9fcac6e30 ci: check out bitcoin/bitcoin PR #35084 instead of master 53dc5b9dfc util: Add Windows support 43dfe34943 proxy: Call shutdownWrite() in Connection destructor aff37a9a64 proxy, refactor: Change ConnectStream and ServeStream to accept stream objects 34b0b24584 util: Clear FD_CLOEXEC on child socket before exec 9a0bf73d8f util, refactor: Add SocketPair() and use it in SpawnProcess 921591d16e cmake: Bump minimum required Cap'n Proto version to 0.9 6320da2e1e proxy, refactor: Replace EventLoop wakeup fd integers with KJ stream objects 4f5649d2c0 util, refactor: Add ConnectInfo type alias and use it 2c6eb8ebc3 util, refactor: Add SocketId type alias and use it 088bdafd42 util, refactor: Add ProcessId type alias and use it 540c759014 doc: Bump version 11 > 12 3c69d125a1 Merge bitcoin-core/libmultiprocess#260: event loop: tolerate unexpected exceptions in `post()` callbacks b8a48c65e6 event loop: tolerate unexpected exceptions in `post()` callbacks f787863d2c Merge bitcoin-core/libmultiprocess#270: doc: Bump version 10 > 11 a22f602910 doc: Bump version 10 > 11 git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: a1748e2fae3abf7ba41ffa78db82eae4761f6723
a1748e2fae proxy: Fix shutdownWrite() exception handling on macOS with dynamic libraries d9fcac6e30 ci: check out bitcoin/bitcoin PR #35084 instead of master 53dc5b9dfc util: Add Windows support 43dfe34943 proxy: Call shutdownWrite() in Connection destructor aff37a9a64 proxy, refactor: Change ConnectStream and ServeStream to accept stream objects 34b0b24584 util: Clear FD_CLOEXEC on child socket before exec 9a0bf73d8f util, refactor: Add SocketPair() and use it in SpawnProcess 921591d16e cmake: Bump minimum required Cap'n Proto version to 0.9 6320da2e1e proxy, refactor: Replace EventLoop wakeup fd integers with KJ stream objects 4f5649d2c0 util, refactor: Add ConnectInfo type alias and use it 2c6eb8ebc3 util, refactor: Add SocketId type alias and use it 088bdafd42 util, refactor: Add ProcessId type alias and use it 540c759014 doc: Bump version 11 > 12 3c69d125a1 Merge bitcoin-core/libmultiprocess#260: event loop: tolerate unexpected exceptions in `post()` callbacks b8a48c65e6 event loop: tolerate unexpected exceptions in `post()` callbacks f787863d2c Merge bitcoin-core/libmultiprocess#270: doc: Bump version 10 > 11 a22f602910 doc: Bump version 10 > 11 git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: a1748e2fae3abf7ba41ffa78db82eae4761f6723
7fd5ec40bc util: drop POSIX/pthread dependencies to enable MSVC builds 4f58c8c981 util: Add Windows support 7cb83a5d53 cmake: Fix CapnProto tool paths broken by Ubuntu Noble packaging bug c9aa8060ec cmake: Replace capnp_PREFIX path construction with cmake-provided symbols 7f513a47dc doc: Remove trailing whitespace f6aa627aa4 ipc: Wrap mpgen main() in try-catch to print errors 28e4c7fd2e proxy: Fix shutdownWrite() exception handling on macOS with dynamic libraries 926ae3562e ci: Check out bitcoin/bitcoin PR #35084 instead of master 3fd227ce24 type-interface, refactor: Fix typename decltype() SFINAE in CustomBuildField on MSVC 362d416844 proxy, refactor: Fix C4305 truncation warning in Accessor on MSVC 1060a95de2 util, refactor: Fix PtrOrValue constructor for move-only types on MSVC bfc2db7b51 proxy: Call shutdownWrite() in Connection destructor 091f5e16dc proxy, refactor: Change ConnectStream and ServeStream to accept stream objects 17a1952eb5 cmake: Bump minimum required Cap'n Proto version to 0.9 3c81cf27ea proxy, refactor: Replace EventLoop wakeup fd integers with KJ stream objects 24c5e57fdd util: Clear FD_CLOEXEC on child socket before exec 022b29b776 util, refactor: Add SocketPair() and use it in SpawnProcess b16f8c4b47 util, refactor: Handle forking inside ExecProcess beaa50a046 util, refactor: Add ConnectInfo type alias and use it 94af41bb55 util, refactor: Add SocketId type alias and use it 36c91a0c73 util, refactor: Add ProcessId type alias and use it b15d63e9d8 doc: Bump version 11 > 12 3c69d125a1 Merge bitcoin-core/libmultiprocess#260: event loop: tolerate unexpected exceptions in `post()` callbacks b8a48c65e6 event loop: tolerate unexpected exceptions in `post()` callbacks f787863d2c Merge bitcoin-core/libmultiprocess#270: doc: Bump version 10 > 11 a22f602910 doc: Bump version 10 > 11 git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 7fd5ec40bc8c2a1fa0e2645d2b587ce2c1c3d17d
6de92e1 proxy-client: tolerate exceptions from remote destroy during cleanup 90be835 test: regression for ~ProxyClient destroy after peer disconnect 3c69d12 Merge bitcoin-core/libmultiprocess#260: event loop: tolerate unexpected exceptions in `post()` callbacks b8a48c6 event loop: tolerate unexpected exceptions in `post()` callbacks f787863 Merge bitcoin-core/libmultiprocess#270: doc: Bump version 10 > 11 a22f602 doc: Bump version 10 > 11 git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 6de92e1c7324c4748d05687372256a5051c97bb4
3c69d12 Merge bitcoin-core/libmultiprocess#260: event loop: tolerate unexpected exceptions in `post()` callbacks b8a48c6 event loop: tolerate unexpected exceptions in `post()` callbacks f787863 Merge bitcoin-core/libmultiprocess#270: doc: Bump version 10 > 11 a22f602 doc: Bump version 10 > 11 git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 3c69d12
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
61de697 Merge bitcoin-core/libmultiprocess#273: proxy-client: tolerate exceptions from remote destroy during cleanup 9cec9d6 Merge bitcoin-core/libmultiprocess#243: mpgen: support primitive std::optional struct fields 4aaff11 Merge bitcoin-core/libmultiprocess#238: cmake, ci: updates for recent nixpkgs 2ac55a5 Merge bitcoin-core/libmultiprocess#218: Better error and log messages 6de92e1 proxy-client: tolerate exceptions from remote destroy during cleanup 90be835 test: regression for ~ProxyClient destroy after peer disconnect 3c69d12 Merge bitcoin-core/libmultiprocess#260: event loop: tolerate unexpected exceptions in `post()` callbacks b8a48c6 event loop: tolerate unexpected exceptions in `post()` callbacks f787863 Merge bitcoin-core/libmultiprocess#270: doc: Bump version 10 > 11 a22f602 doc: Bump version 10 > 11 4eae445 debug: Add TypeName() function and log statements for Proxy objects being created and destroyed f326c5b logging: Add better logging on IPC server-side failures 6dbfa56 mpgen: support primitive std::optional struct fields 8d1277d mpgen refactor: add AccessorType function db716bb mpgen refactor: Move field handling code to FieldList class db7acb3 ci: Fix shell.nix compatibility with CMake 4.0 91a7759 cmake: Fix IWYU in nix by adding CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 61de6975362a7070276da47cc2aa2c2b8909ed49
8412fcdc65 Merge bitcoin-core/libmultiprocess#295: Mark Waiter m_cv as guarded by m_mutex 1593ee2d18 Merge bitcoin-core/libmultiprocess#294: test: Add passDouble smoke test 9885d7dd33 Merge bitcoin-core/libmultiprocess#286: proxy-client: fix TSan data race in clientDestroy fa35501c4f Mark Waiter m_cv as guarded by m_mutex faaedb11f8 test: Add passDouble smoke test 733c64318d Merge bitcoin-core/libmultiprocess#292: type-number: fix clang-tidy modernize-use-nullptr 9cc3479ab3 Merge bitcoin-core/libmultiprocess#291: cmake: Add `mp_headers` custom target 201abd9e3a Merge bitcoin-core/libmultiprocess#289: cmake: make target_capnp_sources use CURRENT dirs 99820c8aec Merge bitcoin-core/libmultiprocess#279: doc: Add comments to FIELD_* constants in proxy.h 73b985540c Merge bitcoin-core/libmultiprocess#278: doc: Fix and expand design.md e7e91b2e23 Merge bitcoin-core/libmultiprocess#277: Add std::unordered_set support and a helper BuildList to dedup list build handlers 91a951f59a tidy fix: modernize-use-nullptr 16362f42d0 cmake: Add `mp_headers` custom target 615a94fe3a cmake: document ONLY_CAPNP option in target_capnp_sources 90982f75c6 mpgen: iwyu changes required by previous commit 25bb3e67f3 proxy-client: fix TSan data race in clientDestroy 620f297f31 cmake: make target_capnp_sources use CURRENT dirs 9de4b885aa test: use camelCase + $Proxy.name for FooStruct fields 011b91793d type: add std::unordered_set support 20d19b9644 proxy: add BuildList helper and dedup map/set/vector build handlers e863c6cdf6 doc: Add comments to FIELD_* constants in proxy.h 18db0ab957 doc: Fix and expand design.md 61de697536 Merge bitcoin-core/libmultiprocess#273: proxy-client: tolerate exceptions from remote destroy during cleanup 9cec9d6ca5 Merge bitcoin-core/libmultiprocess#243: mpgen: support primitive std::optional struct fields 4aaff11374 Merge bitcoin-core/libmultiprocess#238: cmake, ci: updates for recent nixpkgs 2ac55a56b5 Merge bitcoin-core/libmultiprocess#218: Better error and log messages 6de92e1c73 proxy-client: tolerate exceptions from remote destroy during cleanup 90be8354d4 test: regression for ~ProxyClient destroy after peer disconnect 3c69d125a1 Merge bitcoin-core/libmultiprocess#260: event loop: tolerate unexpected exceptions in `post()` callbacks b8a48c65e6 event loop: tolerate unexpected exceptions in `post()` callbacks f787863d2c Merge bitcoin-core/libmultiprocess#270: doc: Bump version 10 > 11 a22f602910 doc: Bump version 10 > 11 4eae445d6d debug: Add TypeName() function and log statements for Proxy objects being created and destroyed f326c5b1b7 logging: Add better logging on IPC server-side failures 6dbfa56a04 mpgen: support primitive std::optional struct fields 8d1277deb5 mpgen refactor: add AccessorType function db716bbcba mpgen refactor: Move field handling code to FieldList class db7acb3ce2 ci: Fix shell.nix compatibility with CMake 4.0 91a7759a9a cmake: Fix IWYU in nix by adding CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 8412fcdc659e1379f9b4dea896c26bc1c5f3afa8
16bf05d Merge bitcoin-core/libmultiprocess#302: refactor: rename EventLoop::m_num_clients to m_num_refs dd537da Merge bitcoin-core/libmultiprocess#301: test: recursive async IPC calls and cleanups 400291d Merge bitcoin-core/libmultiprocess#299: ci: remove libevent from Core CIs 092be51 Merge bitcoin-core/libmultiprocess#285: Add ReadList helper 5b61788 Merge bitcoin-core/libmultiprocess#283: Add `makePool` method on `ThreadMap` d499830 refactor: rename EventLoop::m_num_clients to m_num_refs 6450345 type: reserve first when reading std::unordered_set 4d0f8db proxy: add ReadList helper and dedup map/set/vector read handlers 0e49d91 Add `makePool` method on `ThreadMap` 5519f7f test: recursive async IPC calls a29ceff ci: remove libevent from Core CIs 8412fcd Merge bitcoin-core/libmultiprocess#295: Mark Waiter m_cv as guarded by m_mutex 1593ee2 Merge bitcoin-core/libmultiprocess#294: test: Add passDouble smoke test 9885d7d Merge bitcoin-core/libmultiprocess#286: proxy-client: fix TSan data race in clientDestroy fa35501 Mark Waiter m_cv as guarded by m_mutex faaedb1 test: Add passDouble smoke test 733c643 Merge bitcoin-core/libmultiprocess#292: type-number: fix clang-tidy modernize-use-nullptr 9cc3479 Merge bitcoin-core/libmultiprocess#291: cmake: Add `mp_headers` custom target 201abd9 Merge bitcoin-core/libmultiprocess#289: cmake: make target_capnp_sources use CURRENT dirs 99820c8 Merge bitcoin-core/libmultiprocess#279: doc: Add comments to FIELD_* constants in proxy.h 73b9855 Merge bitcoin-core/libmultiprocess#278: doc: Fix and expand design.md e7e91b2 Merge bitcoin-core/libmultiprocess#277: Add std::unordered_set support and a helper BuildList to dedup list build handlers 91a951f tidy fix: modernize-use-nullptr 16362f4 cmake: Add `mp_headers` custom target 615a94f cmake: document ONLY_CAPNP option in target_capnp_sources 90982f7 mpgen: iwyu changes required by previous commit 25bb3e6 proxy-client: fix TSan data race in clientDestroy 620f297 cmake: make target_capnp_sources use CURRENT dirs 9de4b88 test: use camelCase + $Proxy.name for FooStruct fields 011b917 type: add std::unordered_set support 20d19b9 proxy: add BuildList helper and dedup map/set/vector build handlers e863c6c doc: Add comments to FIELD_* constants in proxy.h 18db0ab doc: Fix and expand design.md 61de697 Merge bitcoin-core/libmultiprocess#273: proxy-client: tolerate exceptions from remote destroy during cleanup 9cec9d6 Merge bitcoin-core/libmultiprocess#243: mpgen: support primitive std::optional struct fields 4aaff11 Merge bitcoin-core/libmultiprocess#238: cmake, ci: updates for recent nixpkgs 2ac55a5 Merge bitcoin-core/libmultiprocess#218: Better error and log messages 6de92e1 proxy-client: tolerate exceptions from remote destroy during cleanup 90be835 test: regression for ~ProxyClient destroy after peer disconnect 3c69d12 Merge bitcoin-core/libmultiprocess#260: event loop: tolerate unexpected exceptions in `post()` callbacks b8a48c6 event loop: tolerate unexpected exceptions in `post()` callbacks f787863 Merge bitcoin-core/libmultiprocess#270: doc: Bump version 10 > 11 a22f602 doc: Bump version 10 > 11 4eae445 debug: Add TypeName() function and log statements for Proxy objects being created and destroyed f326c5b logging: Add better logging on IPC server-side failures 6dbfa56 mpgen: support primitive std::optional struct fields 8d1277d mpgen refactor: add AccessorType function db716bb mpgen refactor: Move field handling code to FieldList class db7acb3 ci: Fix shell.nix compatibility with CMake 4.0 91a7759 cmake: Fix IWYU in nix by adding CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 16bf05d
…ol` method 6b0a907 Squashed 'src/ipc/libmultiprocess/' changes from 3edbe8f..16bf05d (Ryan Ofsky) Pull request description: 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). Changes since last subtree update (#34977): - Adds `makePool` method on `ThreadMap` to support thread pool routing, allowing requests without a specific client thread to be dispatched to a pool using a shortest-queue strategy ([#283](bitcoin-core/libmultiprocess#283)). - Adds `std::unordered_set` support, a `BuildList` helper, and a `ReadList` helper to reduce duplication in list build and read handlers ([#277](bitcoin-core/libmultiprocess#277), [#285](bitcoin-core/libmultiprocess#285)). - Adds support for translating C++ `std::optional<T>` struct fields to pairs of `T` + `hasT :Bool` Cap'n Proto struct fields, allowing unset optional primitive fields to be represented ([#243](bitcoin-core/libmultiprocess#243)). - Produces more readable log output for Proxy object lifecycle events and IPC server-side failures ([#218](bitcoin-core/libmultiprocess#218)). - Handles exceptions thrown by `destroy` methods by logging instead of aborting ([#273](bitcoin-core/libmultiprocess#273)). This can prevent server crashes when non-libmultiprocess clients disconnect without destroying objects, in the case where a server object owns client objects and the server destructor tries to call the disconnected client to free them ([#219](bitcoin-core/libmultiprocess#219)). - Handles unexpected exceptions thrown by callbacks (that should never happen) by logging errors instead of deadlocking ([#260](bitcoin-core/libmultiprocess#260)). - Fixes a rare mptest hang on musl builds caused by a lost wakeup bug in `Waiter` ([#295](bitcoin-core/libmultiprocess#295)). - Fixes a race condition in a log print detected by TSan ([#286](bitcoin-core/libmultiprocess#286)). - Build improvements: makes `target_capnp_sources` work correctly when libmultiprocess is used as a CMake subproject ([#289](bitcoin-core/libmultiprocess#289)), adds `mp_headers` target for better lint tool support ([#291](bitcoin-core/libmultiprocess#291)), and fixes compatibility with recent Nix and CMake 4.0 ([#238](bitcoin-core/libmultiprocess#238)). - Test, CI, documentation, and minor code improvements: design document corrections ([#278](bitcoin-core/libmultiprocess#278)), field constant comments ([#279](bitcoin-core/libmultiprocess#279)), clang-tidy fix ([#292](bitcoin-core/libmultiprocess#292)), new smoke test for double-precision float values ([#294](bitcoin-core/libmultiprocess#294)), new test for recursive async IPC calls ([#301](bitcoin-core/libmultiprocess#301)), removal of libevent from Core CI builds ([#299](bitcoin-core/libmultiprocess#299)), and rename of `EventLoop::m_num_clients` to `m_num_refs` ([#302](bitcoin-core/libmultiprocess#302)). ACKs for top commit: fanquake: ACK 02afa66 hebasto: ACK 02afa66. Tree-SHA512: ef81a951c971f328a0a98436030467eeea30925eb6016eafd9bc7a25726c87628a852bbb1d84b88bce340aeea2bed25c65bc55db1168ebcb850628cd18808883
…hreadMap.makePool` method 6b0a907 Squashed 'src/ipc/libmultiprocess/' changes from 3edbe8f67c1..16bf05dea02 (Ryan Ofsky) Pull request description: 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). Changes since last subtree update (#34977): - Adds `makePool` method on `ThreadMap` to support thread pool routing, allowing requests without a specific client thread to be dispatched to a pool using a shortest-queue strategy ([#283](bitcoin-core/libmultiprocess#283)). - Adds `std::unordered_set` support, a `BuildList` helper, and a `ReadList` helper to reduce duplication in list build and read handlers ([#277](bitcoin-core/libmultiprocess#277), [#285](bitcoin-core/libmultiprocess#285)). - Adds support for translating C++ `std::optional<T>` struct fields to pairs of `T` + `hasT :Bool` Cap'n Proto struct fields, allowing unset optional primitive fields to be represented ([#243](bitcoin-core/libmultiprocess#243)). - Produces more readable log output for Proxy object lifecycle events and IPC server-side failures ([#218](bitcoin-core/libmultiprocess#218)). - Handles exceptions thrown by `destroy` methods by logging instead of aborting ([#273](bitcoin-core/libmultiprocess#273)). This can prevent server crashes when non-libmultiprocess clients disconnect without destroying objects, in the case where a server object owns client objects and the server destructor tries to call the disconnected client to free them ([#219](bitcoin-core/libmultiprocess#219)). - Handles unexpected exceptions thrown by callbacks (that should never happen) by logging errors instead of deadlocking ([#260](bitcoin-core/libmultiprocess#260)). - Fixes a rare mptest hang on musl builds caused by a lost wakeup bug in `Waiter` ([#295](bitcoin-core/libmultiprocess#295)). - Fixes a race condition in a log print detected by TSan ([#286](bitcoin-core/libmultiprocess#286)). - Build improvements: makes `target_capnp_sources` work correctly when libmultiprocess is used as a CMake subproject ([#289](bitcoin-core/libmultiprocess#289)), adds `mp_headers` target for better lint tool support ([#291](bitcoin-core/libmultiprocess#291)), and fixes compatibility with recent Nix and CMake 4.0 ([#238](bitcoin-core/libmultiprocess#238)). - Test, CI, documentation, and minor code improvements: design document corrections ([#278](bitcoin-core/libmultiprocess#278)), field constant comments ([#279](bitcoin-core/libmultiprocess#279)), clang-tidy fix ([#292](bitcoin-core/libmultiprocess#292)), new smoke test for double-precision float values ([#294](bitcoin-core/libmultiprocess#294)), new test for recursive async IPC calls ([#301](bitcoin-core/libmultiprocess#301)), removal of libevent from Core CI builds ([#299](bitcoin-core/libmultiprocess#299)), and rename of `EventLoop::m_num_clients` to `m_num_refs` ([#302](bitcoin-core/libmultiprocess#302)). ACKs for top commit: fanquake: ACK cd09e20 hebasto: ACK cd09e20. Tree-SHA512: ef81a951c971f328a0a98436030467eeea30925eb6016eafd9bc7a25726c87628a852bbb1d84b88bce340aeea2bed25c65bc55db1168ebcb850628cd18808883
…hreadMap.makePool` method 6b0a907 Squashed 'src/ipc/libmultiprocess/' changes from 3edbe8f67c1..16bf05dea02 (Ryan Ofsky) Pull request description: 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). Changes since last subtree update (#34977): - Adds `makePool` method on `ThreadMap` to support thread pool routing, allowing requests without a specific client thread to be dispatched to a pool using a shortest-queue strategy ([#283](bitcoin-core/libmultiprocess#283)). - Adds `std::unordered_set` support, a `BuildList` helper, and a `ReadList` helper to reduce duplication in list build and read handlers ([#277](bitcoin-core/libmultiprocess#277), [#285](bitcoin-core/libmultiprocess#285)). - Adds support for translating C++ `std::optional<T>` struct fields to pairs of `T` + `hasT :Bool` Cap'n Proto struct fields, allowing unset optional primitive fields to be represented ([#243](bitcoin-core/libmultiprocess#243)). - Produces more readable log output for Proxy object lifecycle events and IPC server-side failures ([#218](bitcoin-core/libmultiprocess#218)). - Handles exceptions thrown by `destroy` methods by logging instead of aborting ([#273](bitcoin-core/libmultiprocess#273)). This can prevent server crashes when non-libmultiprocess clients disconnect without destroying objects, in the case where a server object owns client objects and the server destructor tries to call the disconnected client to free them ([#219](bitcoin-core/libmultiprocess#219)). - Handles unexpected exceptions thrown by callbacks (that should never happen) by logging errors instead of deadlocking ([#260](bitcoin-core/libmultiprocess#260)). - Fixes a rare mptest hang on musl builds caused by a lost wakeup bug in `Waiter` ([#295](bitcoin-core/libmultiprocess#295)). - Fixes a race condition in a log print detected by TSan ([#286](bitcoin-core/libmultiprocess#286)). - Build improvements: makes `target_capnp_sources` work correctly when libmultiprocess is used as a CMake subproject ([#289](bitcoin-core/libmultiprocess#289)), adds `mp_headers` target for better lint tool support ([#291](bitcoin-core/libmultiprocess#291)), and fixes compatibility with recent Nix and CMake 4.0 ([#238](bitcoin-core/libmultiprocess#238)). - Test, CI, documentation, and minor code improvements: design document corrections ([#278](bitcoin-core/libmultiprocess#278)), field constant comments ([#279](bitcoin-core/libmultiprocess#279)), clang-tidy fix ([#292](bitcoin-core/libmultiprocess#292)), new smoke test for double-precision float values ([#294](bitcoin-core/libmultiprocess#294)), new test for recursive async IPC calls ([#301](bitcoin-core/libmultiprocess#301)), removal of libevent from Core CI builds ([#299](bitcoin-core/libmultiprocess#299)), and rename of `EventLoop::m_num_clients` to `m_num_refs` ([#302](bitcoin-core/libmultiprocess#302)). ACKs for top commit: fanquake: ACK 02afa66169b5dc58d0fc6f608d0c6f4facefd5ec hebasto: ACK 02afa66169b5dc58d0fc6f608d0c6f4facefd5ec. Tree-SHA512: ef81a951c971f328a0a98436030467eeea30925eb6016eafd9bc7a25726c87628a852bbb1d84b88bce340aeea2bed25c65bc55db1168ebcb850628cd18808883
If a function posted via
EventLoop::post()threw an exception, the event loop would exit without resettingm_post_fnor notifying the condition variable, permanently deadlocking the calling thread inpost().This change catches the exception instead, logs it, and keeps the event loop running so the caller is unblocked and other I/O events continue to be processed.
Fix #259