8000 ci: build multiprocess on most jobs by Sjors · Pull Request #30975 · bitcoin/bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ci: build multiprocess on most jobs #30975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

Sjors
Copy link
Member
@Sjors Sjors commented Sep 26, 2024

This builds most of the CI jobs with multiprocess enabled.

Two jobs run the functional test suite, one with depends and one with the regular build.

The Windows job does not use multiprocess since that's not supported yet.

The previous version of this PR changed the depends system to build libmultiprocess by default as one of the final steps for #31098 - but based discussion here and on IRC it was decided it's too early to ship it. This now happens in the followup #31802.

Based on #31741

@DrahtBot
Copy link
Contributor
DrahtBot commented Sep 26, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/30975.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK ryanofsky
Stale ACK vasild

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #32162 (depends: Switch from multilib to platform-specific toolchains by hebasto)
  • #32054 (cmake, guix: Skip building tests in subtrees for releases by hebasto)
  • #31375 (multiprocess: Add bitcoin wrapper executable by ryanofsky)
  • #31282 (refactor: Make node_id a const& in RemoveBlockRequest by maflcko)
  • #30595 (kernel: Introduce initial C header API by TheCharlatan)
  • #28792 (Embed default ASMap as binary dump header file by fjahr)
  • #28710 (Remove the legacy wallet and BDB dependency by achow101)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@Sjors
Copy link
Member Author
Sjors commented Sep 26, 2024

I'll look into the linter once it's clear if the make MULTIPROCESS=0 behaviour above is intentional.

@fanquake
Copy link
Member
fanquake commented Sep 26, 2024

If multiprocess is (currently) unsupported on Windows, then that should be fixed in depends, i.e (for now) don't even try building the packages/functionality for that platform, not leaked into Guix with a workaround.

More generally, if the project decides to start shipping multiprocess as part of it's releases, then there's a number of other things that need to happen first. We should be switching multiprocess from an opt-in in depends, to being built/used by default, as well as testing all of this, on all relevant platforms in our CIs, not just enabling it for some platforms as part of the release process.

There are also documentation/website/release process updates that will be needed, as this change is going to produce a release tarball, which will contain:

bitcoin-cli
bitcoin-gui
bitcoin-node
bitcoin-qt
bitcoin-tx
bitcoin-util
bitcoin-wallet
bitcoind
test_bitcoin

with no explanation of why there is bitcoind & bitcoin-node, as well as bitcoin-qt & bitcoin-gui, what the difference is betweem them, or which one someone should use. I'd think that even if we started doing multiprocess, we should still only be shipping a bitcoind and bitcoin-qt (which contain the functionality, not multiple different binaries).

and as a result add bitcoin-node, bitcoin-gui and bitcoin-wallet to the release binaries.

bitcoin-wallet already exists in the release binaries:

ls bitcoin-28.0rc2/bin 
bitcoin-cli
bitcoin-qt
bitcoin-tx
bitcoin-util
bitcoin-wallet
bitcoind
test_bitcoin

@DrahtBot
Copy link
Contributor

🚧 At least one of the CI tasks failed.
Debug: https://github.com/bitcoin/bitcoin/runs/30698173359

Hints

Make sure to run all tests locally, according to the documentation.

The failure may happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

@Sjors
Copy link
Member Author
Sjors commented Sep 26, 2024

I would also prefer it if bitcoind (and bitcoin-qt) had multiprocess built in. That way the instruction for miners is "Install Bitcoin Core as you always do, just add ipcbind=unix to you config". cc @ryanofsky

Another approach, if touching the bitcoind and bitcoin-qt binaries is something people are worried about doing too soon, is to move bitcoin-node and bitcoin-qt into an ipc folder. A document explaining all the different binaries would still be needed.

that should be fixed in depends, i.e (for now) don't even try building the packages/functionality for that platform, not leaked into Guix with a workaround.

I'll look into that.

there's a number of other things that need to happen first. We should be switching multiprocess from an opt-in in depends, to being built/used by default, as well as testing all of this, on all relevant platforms in our CIs, not just enabling it for some platforms as part of the release process.

I'll add some commits here to do these things. Those can be split into separate PRs later for a more incremental approach.

bitcoin-wallet already exists in the release binaries:

Ah, I either misremembered or things changed. But in #19460 it's not / no longer the plan to have bitcoin-node spawn a bitcoin-wallet process. Updated the description.

@ryanofsky
Copy link
Contributor

It's good to have this PR open as a draft to see what it looks like but it sounds like there are a number of followups that need to happen for it to be ready. For my part, I need to fix the windows build and also open an issue listing different ways it would be possible to make releases including multiprocess support in short or long term. It would also be good to review and merge #30940 which this is currently based on.

@Sjors Sjors force-pushed the 2024/09/multiprocess-guix branch from 8b2546c to df97390 Compare September 26, 2024 15:40
@Sjors
Copy link
Member Author
Sjors commented Sep 26, 2024

I moved the Windows build skip workaround from Guix to depends. This made me excited about the prospect of moving that bit of Autotools stuff to CMake as well. :-)

Made some minimal documentation changes.

I didn't change the non-depends build (yet).

All CI instances that use depends now use multiprocess, the others don't (yet). Let's see if that breaks anything...

@Sjors Sjors changed the title guix: add multiprocess binaries Add multiprocess binaries to release build Sep 26, 2024
@maflcko
Copy link
Member
maflcko commented Sep 26, 2024

From CI:

SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/src/mp/proxy.cpp:146:25 in mp::Connection::addAsyncCleanup(std::__1::function<void ()>)
8000

@ryanofsky
Copy link
Contributor

For my part, I need to fix the windows build and also open an issue listing different ways it would be possible to make releases including multiprocess support in short or long term.

Update: currently working on getting mingw32 build working, and I created issue #30983 to lay out different multiprocess release options.

@fanquake
Copy link
Member
ci_container_base/src/ipc/capnp/mining.cpp -DARENA_DEBUG -DDEBUG_LOCKORDER -DDEBUG_LOCKCONTENTION -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES 
In file included from /ci_container_base/src/ipc/capnp/mining.cpp:5:
In file included from /ci_container_base/src/ipc/capnp/mining-types.h:9:
In file included from /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/ipc/capnp/common.capnp.proxy-types.h:6:
In file included from /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu/src/ipc/capnp/common.capnp.proxy.h:7:
In file included from /ci_container_base/depends/x86_64-pc-linux-gnu/include/mp/proxy.h:8:
/ci_container_base/depends/x86_64-pc-linux-gnu/include/mp/util.h:207:20: error: no template named 'function' in namespace 'std'; did you mean 'kj::Function'?
  207 | using FdToArgsFn = std::function<std::vector<std::string>(int fd)>;
      |                    ^~~~~
/ci_container_base/depends/x86_64-pc-linux-gnu/include/kj/exception.h:34:29: note: 'kj::Function' declared here
   34 | template <typename T> class Function;
      |                             ^
1 error generated.

TSAN compile failure fixed in bitcoin-core/libmultiprocess#113.

@Sjors Sjors force-pushed the 2024/09/multiprocess-guix branch from df97390 to 9cd4666 Compare September 27, 2024 10:59
@Sjors
Copy link
Member Author
Sjors commented Sep 27, 2024

Rebased after #30940

@Sjors Sjors force-pushed the 2024/09/multiprocess-guix branch from 9cd4666 to 3ef2a7c Compare October 1, 2024 07:33
@Sjors Sjors force-pushed the 2024/09/multiprocess-guix branch from 3ef2a7c to 43c8866 Compare October 1, 2024 07:48
@Sjors
Copy link
Member Author
Sjors commented Oct 1, 2024

Rebased after #30043.

TSAN compile failure fixed in chaincodelabs/libmultiprocess#113.

Added a commit to bump libmultiprocess to include this (can be its own PR later).

@Sjors
Copy link
Member Author
Sjors commented Oct 1, 2024

MSAN says https://cirrus-ci.com/task/6248232848719872:

SUMMARY: MemorySanitizer: use-of-uninitialized-value /usr/src/mp/proxy.cpp:146:25 in mp::Connection::addAsyncCleanup(std::__1::function<void ()>)
[10:00:27.923] Exiting

@ryanofsky
Copy link
Contributor

MSAN says https://cirrus-ci.com/task/6248232848719872

Thanks! I created bitcoin-core/libmultiprocess#115 with details about this, and I think I have a potential fix.

ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 31, 2025
This change is technically not needed to add libmultiprocess as a subtree, but
it avoids a CI failure in followup PR bitcoin#30975 which enables multiprocess build
option in more CI jobs. In that PR, the "macOS 14 native no depends job" fails
due to warnings in boost headers treated as errors, reported in
bitcoin#30975 (comment) and
bitcoin-core/libmultiprocess#138
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Mar 31, 2025
This change is technically not needed to add 
8000
libmultiprocess as a subtree, but
it avoids a CI failure in followup PR bitcoin#30975 which enables multiprocess build
option in more CI jobs. In that PR, clang-tidy job fails due to missing
generated example files as reported
bitcoin#30975 (comment)

Different fixes were suggested
bitcoin#30975 (comment) and
bitcoin#30975 (comment)

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
@Sjors Sjors force-pushed the 2024/09/multiprocess-guix branch from 0f61a2b to 7c96e38 Compare March 31, 2025 19:19
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 2, 2025
This change is technically not needed to add libmultiprocess as a subtree, but
it avoids a CI failure in followup PR bitcoin#30975 which enables multiprocess build
option in more CI jobs. In that PR, several jobs fail due to the mptest
executable not being built by default, as reported
bitcoin#30975 (comment)

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 2, 2025
This change is technically not needed to add libmultiprocess as a subtree, but
it avoids a CI failure in followup PR bitcoin#30975 which enables multiprocess build
option in more CI jobs. In that PR, the "macOS 14 native no depends job" fails
due to warnings in boost headers treated as errors, reported in
bitcoin#30975 (comment) and
bitcoin-core/libmultiprocess#138
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 2, 2025
This change is technically not needed to add libmultiprocess as a subtree, but
it avoids a CI failure in followup PR bitcoin#30975 which enables multiprocess build
option in more CI jobs. In that PR, clang-tidy job fails due to missing
generated example files as reported
bitcoin#30975 (comment)

Different fixes were suggested
bitcoin#30975 (comment) and
bitcoin#30975 (comment)

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 2, 2025
This change is technically not needed to add libmultiprocess as a subtree, but
it avoids a CI failure in followup PR bitco
6D40
in#30975 which enables multiprocess build
option in more CI jobs. In that PR, several jobs fail due to the mptest
executable not being built by default, as reported
bitcoin#30975 (comment)

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 2, 2025
This change is technically not needed to add libmultiprocess as a subtree, but
it avoids a CI failure in followup PR bitcoin#30975 which enables multiprocess build
option in more CI jobs. In that PR, the "macOS 14 native no depends job" fails
due to warnings in boost headers treated as errors, reported in
bitcoin#30975 (comment) and
bitcoin-core/libmultiprocess#138
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 2, 2025
This change is technically not needed to add libmultiprocess as a subtree, but
it avoids a CI failure in followup PR bitcoin#30975 which enables multiprocess build
option in more CI jobs. In that PR, clang-tidy job fails due to missing
generated example files as reported
bitcoin#30975 (comment)

Different fixes were suggested
bitcoin#30975 (comment) and
bitcoin#30975 (comment)

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
@Sjors Sjors force-pushed the 2024/09/multiprocess-guix branch from 7c96e38 to 369da6a Compare April 2, 2025 15:12
@Sjors
Copy link
Member Author

(not rebasing yet, CI already ran on the latest base PR push)

Copy link
Contributor
@vasild vasild left a comment

Choose a reason for hiding this comment

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

ACK 369da6a

Sjors added 2 commits April 11, 2025 13:24
Except:
1. i686, DEBUG (changed to "no multiprocess")
2. Windows due to lack of support
Install capnp where needed.

The bitcoin-node binary is built on all platforms which have
multiprocess enabled, but for functional tests it's only used in
the macOS native (no depends) and CentOS native (depends) jobs.
@Sjors Sjors force-pushed the 2024/09/multiprocess-guix branch from 369da6a to 747af17 Compare April 11, 2025 17:27
@Sjors
Copy link
Member Author
Sjors commented Apr 11, 2025

Rebased after #31741 landed. Also adjusted after #32218.

@Sjors Sjors marked this pull request as ready for review April 11, 2025 17:28
Copy link
Member
@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

No, objection, but I wonder what the goal of the changes here is.

In the OP you mention that it is too early to enable it by default in depends, so to me it seems better to just have CI follow when this is turned on by default in depends.

However, in #31802 (comment) you claim that this will be turned on by default for devs as well.

It would seem like useless churn if most of the changes here would be reverted soon after anyway, which is why I am asking.

@Sjors
Copy link
Member Author
Sjors commented Apr 11, 2025

@maflcko #31802 turns IPC on in the guix build and by default for devs. But even (especially?) if it's not turned on by default, it's good to have CI coverage.

too early to enable it by default in depends

This is because turning it on in depends turns it on in guix and ships it in the next release. That seems better to decide in the next PR.

this will be turned on by default for devs as well

I could do that here as well, but prefer to keep this PR limited to CI changes. Also it's a bit weird to turn it on for developers only if they don't use depends.

(in other words, the coupling between depends defaults and guix builds is a bit annoying)

@ryanofsky
Copy link
Contributor

Code review ACK 747af17

I think I agree with marco, and it might be simpler to just close this PR and turn on ENABLE_IPC by default in ci, in depends, and in cmake all in a single PR instead of turning it on in CI first, which makes CI builds and default builds less consistent with each other and creates churn in the CI configuration files.

I can also see the other point of view that that a change to enable IPC in releases is a bigger decision than enabling IPC in CI and developer builds, so maybe that should have a dedicated PR.

I think my preference would depend on how soon we think #31802 should be merged. If pretty soon, the simplest thing would be to close this PR and just update cmake default, depends default, and CI all together in #31802. But if we want to wait more time before merging #31802, it would be helpful to have ENABLE_IPC turned on in CI earlier so there's better CI testing for other IPC/multiprocess PR's being worked on.

@DrahtBot DrahtBot requested a review from vasild April 11, 2025 19:00
@Sjors
Copy link
Member Author
Sjors commented Apr 11, 2025

I've marked #31802 as ready for review. It includes all the commits here. But I'll leave this open for now.

@Sjors
Copy link
Member Author
Sjors commented Apr 11, 2025

Since I reordered the commits in #31802 it's now a non-trivial rebase, so I'm closing this.

@Sjors Sjors closed this Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
0