Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions depends/packages/native_libmultiprocess.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package=native_libmultiprocess
$(package)_version=abe254b9734f2e2b220d1456de195532d6e6ac1e
$(package)_version=1954f7f65661d49e700c344eae0fc8092decf975

@thepastaclaw thepastaclaw Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Withdrawn at b0829717; see the replies below.

🔴 Blocking: Missing follow-up: bitcoin#33241 fixes mpgen hangs with older system Cap’n Proto

The new pin matches bitcoin#31945, but unlike the base pin it builds standalone mpgen as C++20. Its src/mp/gen.cpp:146 still compares a kj::StringPtr with a string literal before generating any output. With Cap’n Proto 0.8.x and affected GCC versions, that comparison recurses; bitcoin#33176 reproduced the resulting build hang. The WITH_MULTIPROCESS=ON build documented in doc/multiprocess.md:30 invokes the installed generator, so it hits the same bug if that generator was built from 1954f7f against the affected system dependency. The passing depends jobs use Cap’n Proto 1.3.0. Carry the generator fix from libmultiprocess commit c4cb758e, which Bitcoin Core incorporated in bitcoin#33241, and identify the fixed revision in the manual-install instructions: changing the depends pin alone does not update an installed mpgen.

source: gpt-6.2-sol (phase2-reviewer: general, backport-reviewer, dash-core-commit-history)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declining. Neither documented build path can reach this.

  • Depends: depends/packages/native_capnp.mk ships Cap'n Proto 1.3.0. The recursive operator== only exists in kj/string.h before 0.9 (capnproto#1170), so the depends-built mpgen from 1954f7f can't hang. CI, Guix and MULTIPROCESS=1 all build this way.
  • Manual install: doc/multiprocess.md:30 sends readers to libmultiprocess master's doc/install.md. That guide builds master, which already includes c4cb758, and now requires Cap'n Proto 0.9 or newer. The depends pin is never what gets installed system-wide.

bitcoin#33241 updates Bitcoin Core's in-tree libmultiprocess subtree, which builds against the system Cap'n Proto. Dash has no subtree, so there is nothing to backport 1:1. Carrying c4cb758 here would mean a Dash-only patch to the depends package, or moving the pin 72 commits past 1954f7f. That goes beyond fixing the EventLoop shutdown race.


🤖 Posted autonomously by Claude (claude-opus-5-5) on behalf of pasta.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I conflated the two build paths. Depends builds the pinned mpgen against Cap’n Proto 1.3.0, while the manual instructions link to libmultiprocess’s master guide, which requires Cap’n Proto 0.9 or newer and doesn’t tell users to install the depends pin. I don’t see a reason to carry the subtree fix from bitcoin#33241 in this backport.

Withdrawing this finding.

$(package)_download_path=https://github.com/bitcoin-core/libmultiprocess/archive
$(package)_file_name=$($(package)_version).tar.gz
$(package)_sha256_hash=85777073259fdc75d24ac5777a19991ec1156c5f12db50b252b861c95dcb4f46
$(package)_sha256_hash=fc014bd74727c1d5d30b396813685012c965d079244dd07b53bc1c75c610a2cb
$(package)_dependencies=native_capnp

define $(package)_config_cmds
Expand Down
13 changes: 13 additions & 0 deletions src/ipc/capnp/common-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@

#include <cstddef>
#include <mp/proxy-types.h>
#include <mp/type-chrono.h>
#include <mp/type-context.h>
#include <mp/type-data.h>
#include <mp/type-decay.h>
#include <mp/type-interface.h>
#include <mp/type-message.h>
#include <mp/type-number.h>
#include <mp/type-optional.h>
#include <mp/type-pointer.h>
#include <mp/type-string.h>
#include <mp/type-struct.h>
#include <mp/type-threadmap.h>
#include <mp/type-vector.h>
#include <type_traits>
#include <utility>

Expand Down
12 changes: 12 additions & 0 deletions src/ipc/capnp/echo-types.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (c) 2025 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_IPC_CAPNP_ECHO_TYPES_H
#define BITCOIN_IPC_CAPNP_ECHO_TYPES_H

#include <mp/type-context.h>
#include <mp/type-decay.h>
#include <mp/type-string.h>

#endif // BITCOIN_IPC_CAPNP_ECHO_TYPES_H
2 changes: 1 addition & 1 deletion src/ipc/capnp/echo.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $Cxx.namespace("ipc::capnp::messages");

using Proxy = import "/mp/proxy.capnp";
$Proxy.include("interfaces/echo.h");
$Proxy.include("ipc/capnp/echo.capnp.h");
$Proxy.includeTypes("ipc/capnp/echo-types.h");

interface Echo $Proxy.wrap("interfaces::Echo") {
destroy @0 (context :Proxy.Context) -> ();
Expand Down
5 changes: 5 additions & 0 deletions src/ipc/capnp/init-types.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
#define BITCOIN_IPC_CAPNP_INIT_TYPES_H

#include <ipc/capnp/echo.capnp.proxy-types.h>
#include <mp/proxy-types.h>
#include <mp/type-context.h>
#include <mp/type-decay.h>
#include <mp/type-interface.h>
#include <mp/type-threadmap.h>

#endif // BITCOIN_IPC_CAPNP_INIT_TYPES_H
2 changes: 1 addition & 1 deletion src/ipc/capnp/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class CapnpProtocol : public Protocol
}
void addCleanup(std::type_index type, void* iface, std::function<void()> cleanup) override
{
mp::ProxyTypeRegister::types().at(type)(iface).cleanup.emplace_back(std::move(cleanup));
mp::ProxyTypeRegister::types().at(type)(iface).cleanup_fns.emplace_back(std::move(cleanup));
}
Context& context() override { return m_context; }
void startLoop(const char* exe_name)
Expand Down
1 change: 1 addition & 0 deletions src/test/ipc_test.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ interface FooInterface $Proxy.wrap("FooImplementation") {
add @0 (a :Int32, b :Int32) -> (result :Int32);
passOutPoint @1 (arg :Data) -> (result :Data);
passUniValue @2 (arg :Text) -> (result :Text);
passScript @3 (arg :Data) -> (result :Data);
}
5 changes: 5 additions & 0 deletions src/test/ipc_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <test/ipc_test.capnp.h>
#include <test/ipc_test.capnp.proxy.h>
#include <test/ipc_test.h>
#include <util/strencodings.h>

#include <future>
#include <kj/common.h>
Expand Down Expand Up @@ -61,6 +62,10 @@ void IpcTest()
UniValue uni2{foo->passUniValue(uni1)};
BOOST_CHECK_EQUAL(uni1.write(), uni2.write());

auto script1{CScript() << OP_11};
auto script2{foo->passScript(script1)};
BOOST_CHECK_EQUAL(HexStr(script1), HexStr(script2));

// Test cleanup: disconnect pipe and join thread
disconnect_client();
thread.join();
Expand Down
2 changes: 2 additions & 0 deletions src/test/ipc_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define BITCOIN_TEST_IPC_TEST_H

#include <primitives/transaction.h>
#include <script/script.h>
#include <univalue.h>

class FooImplementation
Expand All @@ -14,6 +15,7 @@ class FooImplementation
int add(int a, int b) { return a + b; }
COutPoint passOutPoint(COutPoint o) { return o; }
UniValue passUniValue(UniValue v) { return v; }
CScript passScript(CScript s) { return s; }
};

void IpcTest();
Expand Down
Loading