From 1bc22a38a8f613676f1b513cb74f7ad8ed2b7e3e Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 8 Apr 2026 11:17:45 +0800 Subject: [PATCH 1/4] Squashed 'src/ipc/libmultiprocess/' changes from 70f632bda8..3edbe8f67c 3edbe8f67c Merge bitcoin-core/libmultiprocess#268: Use throwRecoverableException instead of raw throw for stored exceptions 23be44b0d3 Use throwRecoverableException instead of raw throw for stored exceptions 75c2a2764c Merge bitcoin-core/libmultiprocess#266: test: increase spawn test child timeout to 30 seconds 8b5f805301 Merge bitcoin-core/libmultiprocess#267: doc: Bump version 9 > 10 cc0b23fc32 test: increase spawn test child timeout to 30 seconds 050f878db8 doc: Improve versions.md descriptions and formatting c6a288a889 doc: Bump version 9 > 10 git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 3edbe8f67c182dde91c0050065d79ae268722489 --- doc/versions.md | 18 +++++++++++------- include/mp/type-context.h | 2 +- include/mp/version.h | 2 +- test/mp/test/spawn_tests.cpp | 6 ++++-- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/doc/versions.md b/doc/versions.md index db5647df807..2c2ec50e7c6 100644 --- a/doc/versions.md +++ b/doc/versions.md @@ -7,33 +7,37 @@ Library versions are tracked with simple Versioning policy is described in the [version.h](../include/mp/version.h) include. -## v9 +## v10 - Current unstable version. +## [v9.0](https://github.com/bitcoin-core/libmultiprocess/commits/v9.0) +- Fixes race conditions where worker thread could be used after destruction, where getParams() could be called after request cancel, and where m_on_cancel could be called after request finishes. +- Adds `CustomHasField` hook to map Cap'n Proto null values to C++ null values. +- Improves `CustomBuildField` for `std::optional` to use move semantics. +- Adds LLVM 22 compatibility fix in type-map. +- Used in Bitcoin Core master branch, pulled in by [#34804](https://github.com/bitcoin/bitcoin/pull/34804). Also pulled into Bitcoin Core 31.x stable branch by [#34952](https://github.com/bitcoin/bitcoin/pull/34952). + ## [v8.0](https://github.com/bitcoin-core/libmultiprocess/commits/v8.0) - Better support for non-libmultiprocess IPC clients: avoiding errors on unclean disconnects, and allowing simultaneous requests to worker threads which previously triggered "thread busy" errors. -- Used in Bitcoin Core, pulled in by [#34422](https://github.com/bitcoin/bitcoin/pull/34422). +- Intermediate version used in Bitcoin Core master branch between 30.x and 31.x branches, pulled in by [#34422](https://github.com/bitcoin/bitcoin/pull/34422). ## [v7.0](https://github.com/bitcoin-core/libmultiprocess/commits/v7.0) - Adds SpawnProcess race fix, cmake `target_capnp_sources` option, ci and documentation improvements. Adds `version.h` header declaring major and minor version numbers. -- Used in Bitcoin Core, pulled in by [#34363](https://github.com/bitcoin/bitcoin/pull/34363). +- Intermediate version used in Bitcoin Core master branch between 30.x and 31.x branches, pulled in by [#34363](https://github.com/bitcoin/bitcoin/pull/34363). ## [v7.0-pre2](https://github.com/bitcoin-core/libmultiprocess/commits/v7.0-pre2) - Fixes intermittent mptest hang and makes other minor improvements. - Used in Bitcoin Core 30.1 and 30.2 releases and 30.x branch, pulled in by [#33518](https://github.com/bitcoin/bitcoin/pull/33518) and [#33519](https://github.com/bitcoin/bitcoin/pull/33519). ## [v7.0-pre1](https://github.com/bitcoin-core/libmultiprocess/commits/v7.0-pre1) - - Adds support for log levels to reduce logging and "thread busy" error to avoid a crash on misuse. -- Minimum required version for Bitcoin Core 30.1 and 30.2 releases and 30.x branch, pulled in by [#33412](https://github.com/bitcoin/bitcoin/pull/33412), [#33518](https://github.com/bitcoin/bitcoin/pull/33518), and [#33519](https://github.com/bitcoin/bitcoin/pull/33519). +- Minimum required version since Bitcoin Core 30.1, pulled in by [#33412](https://github.com/bitcoin/bitcoin/pull/33412), [#33518](https://github.com/bitcoin/bitcoin/pull/33518), and [#33519](https://github.com/bitcoin/bitcoin/pull/33519). ## [v6.0](https://github.com/bitcoin-core/libmultiprocess/commits/v6.0) - - Adds CI scripts and build and test fixes. - Used in Bitcoin Core 30.0 release, pulled in by [#32345](https://github.com/bitcoin/bitcoin/pull/32345), [#33241](https://github.com/bitcoin/bitcoin/pull/33241), and [#33322](https://github.com/bitcoin/bitcoin/pull/33322). ## [v6.0-pre1](https://github.com/bitcoin-core/libmultiprocess/commits/v6.0-pre1) - - Adds fixes for unclean shutdowns and thread sanitizer issues. - Drops `EventLoop::addClient` and `EventLoop::removeClient` methods, requiring clients to use new `EventLoopRef` class instead. diff --git a/include/mp/type-context.h b/include/mp/type-context.h index 8efd4fa767f..46952f49f87 100644 --- a/include/mp/type-context.h +++ b/include/mp/type-context.h @@ -189,7 +189,7 @@ auto PassField(Priority<1>, TypeList<>, ServerContext& server_context, const Fn& } })) { MP_LOG(loop, Log::Error) << "IPC server request #" << req << " uncaught exception (" << kj::str(*exception).cStr() << ")"; - throw kj::mv(*exception); + kj::throwRecoverableException(kj::mv(*exception)); } return call_context; // End of scope: if KJ_DEFER was reached, it runs here diff --git a/include/mp/version.h b/include/mp/version.h index 5c8753cf837..964667a98fb 100644 --- a/include/mp/version.h +++ b/include/mp/version.h @@ -24,7 +24,7 @@ //! pointing at the prior merge commit. The /doc/versions.md file should also be //! updated, noting any significant or incompatible changes made since the //! previous version. -#define MP_MAJOR_VERSION 9 +#define MP_MAJOR_VERSION 10 //! Minor version number. Should be incremented in stable branches after //! backporting changes. The /doc/versions.md file should also be updated to diff --git a/test/mp/test/spawn_tests.cpp b/test/mp/test/spawn_tests.cpp index 4c7edba4830..a14e50e2a30 100644 --- a/test/mp/test/spawn_tests.cpp +++ b/test/mp/test/spawn_tests.cpp @@ -20,6 +20,8 @@ namespace { +constexpr auto FAILURE_TIMEOUT = std::chrono::seconds{30}; + // Poll for child process exit using waitpid(..., WNOHANG) until the child exits // or timeout expires. Returns true if the child exited and status_out was set. // Returns false on timeout or error. @@ -94,9 +96,9 @@ KJ_TEST("SpawnProcess does not run callback in child") ::close(fd); int status{0}; - // Give the child up to 1 second to exit. If it does not, terminate it and + // Give the child some time to exit. If it does not, terminate it and // reap it to avoid leaving a zombie behind. - const bool exited{WaitPidWithTimeout(pid, std::chrono::milliseconds{1000}, status)}; + const bool exited{WaitPidWithTimeout(pid, FAILURE_TIMEOUT, status)}; if (!exited) { ::kill(pid, SIGKILL); ::waitpid(pid, &status, /*options=*/0); From afa8ba04e00029241d361142a801c9a8394d5340 Mon Sep 17 00:00:00 2001 From: Alfonso Roman Zubeldia <19962151+alfonsoromanz@users.noreply.github.com> Date: Tue, 7 Apr 2026 17:40:43 -0300 Subject: [PATCH 2/4] test: remove macOS REDUCE_EXPORTS exception workaround The underlying issue was fixed in bitcoin-core/libmultiprocess#268. Remove the workaround that accepted degraded error messages on Darwin. Github-Pull: #35014 Rebased-From: b555a0b789fa4f21875e4fa356cd9455aef16879 --- test/functional/test_framework/ipc_util.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/test/functional/test_framework/ipc_util.py b/test/functional/test_framework/ipc_util.py index 03e3b5d511b..0e10b90e023 100644 --- a/test/functional/test_framework/ipc_util.py +++ b/test/functional/test_framework/ipc_util.py @@ -10,7 +10,6 @@ from dataclasses import dataclass from io import BytesIO from pathlib import Path import shutil -import platform from typing import Optional from test_framework.messages import CBlock @@ -161,12 +160,5 @@ async def make_mining_ctx(self): return ctx, mining def assert_capnp_failed(e, description_prefix): - if e.description == "remote exception: unknown non-KJ exception of type: kj::Exception": - # macOS + REDUCE_EXPORTS bug: Cap'n Proto fails to recognize - # its own exception type and returns a generic error instead. - # https://github.com/bitcoin/bitcoin/pull/34422#discussion_r2863852691 - # Assert this only occurs on Darwin until fixed. - assert_equal(platform.system(), "Darwin") - else: - assert e.description.startswith(description_prefix), f"Expected description starting with '{description_prefix}', got '{e.description}'" + assert e.description.startswith(description_prefix), f"Expected description starting with '{description_prefix}', got '{e.description}'" assert_equal(e.type, "FAILED") From 275843f2a61cf1c676a12b774157c27aaeccf286 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 8 Apr 2026 11:29:27 +0800 Subject: [PATCH 3/4] build: bump version to v31.0rc3 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 145de0ce501..8517225ab29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ set(CLIENT_NAME "Bitcoin Core") set(CLIENT_VERSION_MAJOR 31) set(CLIENT_VERSION_MINOR 0) set(CLIENT_VERSION_BUILD 0) -set(CLIENT_VERSION_RC 2) +set(CLIENT_VERSION_RC 3) set(CLIENT_VERSION_IS_RELEASE "true") set(COPYRIGHT_YEAR "2026") From c168baec80960a8118bdc553839f7c122e1ce471 Mon Sep 17 00:00:00 2001 From: fanquake Date: Wed, 8 Apr 2026 11:31:14 +0800 Subject: [PATCH 4/4] doc: update manual pages for v31.0rc3 --- doc/man/bitcoin-cli.1 | 6 +++--- doc/man/bitcoin-qt.1 | 6 +++--- doc/man/bitcoin-tx.1 | 6 +++--- doc/man/bitcoin-util.1 | 6 +++--- doc/man/bitcoin-wallet.1 | 6 +++--- doc/man/bitcoin.1 | 4 ++-- doc/man/bitcoind.1 | 6 +++--- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/man/bitcoin-cli.1 b/doc/man/bitcoin-cli.1 index d42203296a4..107a3c1477f 100644 --- a/doc/man/bitcoin-cli.1 +++ b/doc/man/bitcoin-cli.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-CLI "1" "March 2026" "bitcoin-cli v31.0.0rc2" "User Commands" +.TH BITCOIN-CLI "1" "April 2026" "bitcoin-cli v31.0.0rc3" "User Commands" .SH NAME -bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc2 +bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc3 .SH SYNOPSIS .B bitcoin-cli [\fI\,options\/\fR] \fI\, \/\fR[\fI\,params\/\fR] @@ -15,7 +15,7 @@ bitcoin-cli \- manual page for bitcoin-cli v31.0.0rc2 .B bitcoin-cli [\fI\,options\/\fR] \fI\,help \/\fR .SH DESCRIPTION -Bitcoin Core RPC client version v31.0.0rc2 +Bitcoin Core RPC client version v31.0.0rc3 .PP The bitcoin\-cli utility provides a command line interface to interact with a Bitcoin Core RPC server. .PP diff --git a/doc/man/bitcoin-qt.1 b/doc/man/bitcoin-qt.1 index 25f010e0c91..c84eed2f566 100644 --- a/doc/man/bitcoin-qt.1 +++ b/doc/man/bitcoin-qt.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-QT "1" "March 2026" "bitcoin-qt v31.0.0rc2" "User Commands" +.TH BITCOIN-QT "1" "April 2026" "bitcoin-qt v31.0.0rc3" "User Commands" .SH NAME -bitcoin-qt \- manual page for bitcoin-qt v31.0.0rc2 +bitcoin-qt \- manual page for bitcoin-qt v31.0.0rc3 .SH SYNOPSIS .B bitcoin-qt [\fI\,options\/\fR] [\fI\,URI\/\fR] .SH DESCRIPTION -Bitcoin Core version v31.0.0rc2 +Bitcoin Core version v31.0.0rc3 .PP The bitcoin\-qt application provides a graphical interface for interacting with Bitcoin Core. .PP diff --git a/doc/man/bitcoin-tx.1 b/doc/man/bitcoin-tx.1 index 979458ba69b..da1ca1d4638 100644 --- a/doc/man/bitcoin-tx.1 +++ b/doc/man/bitcoin-tx.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-TX "1" "March 2026" "bitcoin-tx v31.0.0rc2" "User Commands" +.TH BITCOIN-TX "1" "April 2026" "bitcoin-tx v31.0.0rc3" "User Commands" .SH NAME -bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc2 +bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc3 .SH SYNOPSIS .B bitcoin-tx [\fI\,options\/\fR] \fI\, \/\fR[\fI\,commands\/\fR] @@ -9,7 +9,7 @@ bitcoin-tx \- manual page for bitcoin-tx v31.0.0rc2 .B bitcoin-tx [\fI\,options\/\fR] \fI\,-create \/\fR[\fI\,commands\/\fR] .SH DESCRIPTION -Bitcoin Core bitcoin\-tx utility version v31.0.0rc2 +Bitcoin Core bitcoin\-tx utility version v31.0.0rc3 .PP The bitcoin\-tx tool is used for creating and modifying bitcoin transactions. .PP diff --git a/doc/man/bitcoin-util.1 b/doc/man/bitcoin-util.1 index 5039389cd64..b755f9a2f64 100644 --- a/doc/man/bitcoin-util.1 +++ b/doc/man/bitcoin-util.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-UTIL "1" "March 2026" "bitcoin-util v31.0.0rc2" "User Commands" +.TH BITCOIN-UTIL "1" "April 2026" "bitcoin-util v31.0.0rc3" "User Commands" .SH NAME -bitcoin-util \- manual page for bitcoin-util v31.0.0rc2 +bitcoin-util \- manual page for bitcoin-util v31.0.0rc3 .SH SYNOPSIS .B bitcoin-util [\fI\,options\/\fR] [\fI\,command\/\fR] @@ -9,7 +9,7 @@ bitcoin-util \- manual page for bitcoin-util v31.0.0rc2 .B bitcoin-util [\fI\,options\/\fR] \fI\,grind \/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-util utility version v31.0.0rc2 +Bitcoin Core bitcoin\-util utility version v31.0.0rc3 .PP The bitcoin\-util tool provides bitcoin related functionality that does not rely on the ability to access a running node. Available [commands] are listed below. .SH OPTIONS diff --git a/doc/man/bitcoin-wallet.1 b/doc/man/bitcoin-wallet.1 index 6cded8cc9d5..571eee950e9 100644 --- a/doc/man/bitcoin-wallet.1 +++ b/doc/man/bitcoin-wallet.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN-WALLET "1" "March 2026" "bitcoin-wallet v31.0.0rc2" "User Commands" +.TH BITCOIN-WALLET "1" "April 2026" "bitcoin-wallet v31.0.0rc3" "User Commands" .SH NAME -bitcoin-wallet \- manual page for bitcoin-wallet v31.0.0rc2 +bitcoin-wallet \- manual page for bitcoin-wallet v31.0.0rc3 .SH SYNOPSIS .B bitcoin-wallet [\fI\,options\/\fR] \fI\,\/\fR .SH DESCRIPTION -Bitcoin Core bitcoin\-wallet utility version v31.0.0rc2 +Bitcoin Core bitcoin\-wallet utility version v31.0.0rc3 .PP bitcoin\-wallet is an offline tool for creating and interacting with Bitcoin Core wallet files. .PP diff --git a/doc/man/bitcoin.1 b/doc/man/bitcoin.1 index 07df353495c..67f676b9703 100644 --- a/doc/man/bitcoin.1 +++ b/doc/man/bitcoin.1 @@ -1,7 +1,7 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIN "1" "March 2026" "bitcoin v31.0.0rc2" "User Commands" +.TH BITCOIN "1" "April 2026" "bitcoin v31.0.0rc3" "User Commands" .SH NAME -bitcoin \- manual page for bitcoin v31.0.0rc2 +bitcoin \- manual page for bitcoin v31.0.0rc3 .SH SYNOPSIS .B bitcoin [\fI\,OPTIONS\/\fR] \fI\,COMMAND\/\fR... diff --git a/doc/man/bitcoind.1 b/doc/man/bitcoind.1 index ec0615e1d5a..210d252155d 100644 --- a/doc/man/bitcoind.1 +++ b/doc/man/bitcoind.1 @@ -1,12 +1,12 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. -.TH BITCOIND "1" "March 2026" "bitcoind v31.0.0rc2" "User Commands" +.TH BITCOIND "1" "April 2026" "bitcoind v31.0.0rc3" "User Commands" .SH NAME -bitcoind \- manual page for bitcoind v31.0.0rc2 +bitcoind \- manual page for bitcoind v31.0.0rc3 .SH SYNOPSIS .B bitcoind [\fI\,options\/\fR] .SH DESCRIPTION -Bitcoin Core daemon version v31.0.0rc2 bitcoind +Bitcoin Core daemon version v31.0.0rc3 bitcoind .PP The Bitcoin Core daemon (bitcoind) is a headless program that connects to the Bitcoin network to validate and relay transactions and blocks, as well as relaying addresses. .PP