ci: Supply `--platform` argument to `docker` commands. #31657

pull davidgumberg wants to merge 1 commits into bitcoin:master from davidgumberg:1-13-24-ci-fix changing 6 files +14 −5
  1. davidgumberg commented at 11:17 PM on January 14, 2025: contributor

    I ran into this issue when following the instructions in ci/README.md for running CI locally.

    Newer versions of docker require a --platform argument when building from a platform-specific image that differs from the host platform, I'm not sure when this change took place, but trying to build any of the cross-platform CI images on Docker 27.5.0 fails in the following manner:

    $ # From ci/README.md
    $ env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh'
    WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64/v4) and no specific platform was requested
    Creating docker.io/arm64v8/debian:bookworm container to run in
    + docker build --file $BITCOIN_SRC/ci/test_imagefile --build-arg CI_IMAGE_NAME_TAG=docker.io/arm64v8/debian:bookworm --build-arg FILE_ENV=./ci/test/00_setup_env_arm.sh --label=bitcoin-ci-test --tag=ci_arm_linux $BITCOIN_SRC
    [+] Building 0.6s (2/2) FINISHED                                                                                                                                                 docker:default
     => [internal] load build definition from test_imagefile                                                                                                                                   0.0s
     => => transferring dockerfile: 600B                                                                                                                                                       0.0s
     => WARN: InvalidDefaultArgInFrom: Default value for ARG ${CI_IMAGE_NAME_TAG} results in empty or invalid base image name (line 8)                                                         0.0s
     => ERROR [internal] load metadata for docker.io/arm64v8/debian:bookworm                                                                                                                   0.5s
    ------
     > [internal] load metadata for docker.io/arm64v8/debian:bookworm:
    ------
    
     1 warning found (use docker --debug to expand):
     - InvalidDefaultArgInFrom: Default value for ARG ${CI_IMAGE_NAME_TAG} results in empty or invalid base image name (line 8)
    test_imagefile:8
    --------------------
       6 |
       7 |     ARG CI_IMAGE_NAME_TAG
       8 | >>> FROM ${CI_IMAGE_NAME_TAG}
       9 |
      10 |     ARG FILE_ENV
    --------------------
    ERROR: failed to solve: docker.io/arm64v8/debian:bookworm: failed to resolve source metadata for docker.io/arm64v8/debian:bookworm: no match for platform in manifest: not found
    

    This branch fixes this by setting the --platform argument of docker build and docker run with an environment variable CI_IMAGE_PLATFORM for each platform specific job, and linux/{$cpuarch} for any native jobs.

    Thi

    Steps to reproduce

    1. Install relevant dependencies, on Ubuntu:
    sudo apt install bash docker.io python3 qemu-user-static
    
    1. Run one of the platform-specific CI images, e.g.:
    env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh'
    
  2. DrahtBot commented at 11:17 PM on January 14, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, hebasto

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #31678 (ci: Skip read-write of default env vars by maflcko)
    • #30975 (Add multiprocess binaries to release build (except Windows, OpenBSD) by Sjors)
    • #29881 (guix: use GCC 13 to build releases by fanquake)

    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.

  3. DrahtBot added the label Tests on Jan 14, 2025
  4. in ci/test/00_setup_env_s390x.sh:12 in e58e0c52e0 outdated
       9 | @@ -10,6 +10,7 @@ export HOST=s390x-linux-gnu
      10 |  export PACKAGES="python3-zmq"
      11 |  export CONTAINER_NAME=ci_s390x
      12 |  export CI_IMAGE_NAME_TAG="docker.io/s390x/ubuntu:24.04"
    


    maflcko commented at 9:57 AM on January 15, 2025:
    export CI_IMAGE_NAME_TAG="docker.io/ubuntu:24.04"
    

    nit: I think you can now remove the redundant arch here? (same for the others)


    davidgumberg commented at 12:02 AM on January 16, 2025:

    Thanks, done.

  5. in ci/test/00_setup_env_s390x.sh:13 in e58e0c52e0 outdated
       9 | @@ -10,6 +10,7 @@ export HOST=s390x-linux-gnu
      10 |  export PACKAGES="python3-zmq"
      11 |  export CONTAINER_NAME=ci_s390x
      12 |  export CI_IMAGE_NAME_TAG="docker.io/s390x/ubuntu:24.04"
      13 | +export DOCKER_DEFAULT_PLATFORM="linux/s390x"
    


    maflcko commented at 10:07 AM on January 15, 2025:

    Does this env var work for podman as well? Regardless, I am wondering if it was easier to just pass --platform to docker build in ./ci/test/02_run_container.sh (and possibly docker run, if needed)?

    Something like:

    CI_IMAGE_PLATFORM=""  # native platform (default)
    

    Alternatively, with the added benefit of possibly supporting macos (see #31344 (comment) (expand "docker setup")):

    CI_IMAGE_PLATFORM="--os linux"  # native arch (default)
    

    and then in the individual CI tasks:

    CI_IMAGE_PLATFORM="--platform=linux/s390x"
    

    davidgumberg commented at 8:08 PM on January 15, 2025:

    Does this env var work for podman as well?

    The "podman" cli frontend doesn't use this environment variable^1, but I tested locally (on Fedora 40) that this PR works for the build phase when using docker cli to interact with podman container host:

    $ sudo dnf install podman-machine
    $ podman machine init
    $ podman machine start
    Starting machine "podman-machine-default"
    API forwarding listening on: /run/user/1000/podman/podman-machine-default-api.sock
    $ env -i HOME="$HOME" PATH="$PATH" USER="$USER" DOCKER_HOST='unix:///run/user/1000/podman/podman-machine-default-api.sock' bash -c 'FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh'
    WARNING: No output specified with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
    

    but as the warning hints will later fail when the docker run command is reached:

    ++ docker run --cap-add LINUX_IMMUTABLE --rm --interactive --detach --tty --mount [etc...] --env-file /tmp/env-{USER}-ci_arm_linux --name ci_arm_linux --network ci-ip6net ci_arm_linux
    Unable to find image 'ci_arm_linux:latest' locally
    $ cat /tmp/env-{USER}-ci_arm_linux | grep "DOCKER_HOST"
    DOCKER_HOST=unix:///run/user/1000/podman/podman-machine-default-api.sock
    

    but this can be fixed with:

    --- a/ci/test/02_run_container.sh
    +++ b/ci/test/02_run_container.sh
    @@ -34,6 +34,7 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
           --label="${CI_IMAGE_LABEL}" \
           --tag="${CONTAINER_NAME}" \
    +      --load \
    

    Alternatively, with the added benefit of possibly supporting macos (see #31344 (comment) (expand "docker setup")):

    CI_IMAGE_PLATFORM="--os linux"  # native arch (default)
    

    podman allows splitting up --platform into --arch and --os but docker doesn't :

    $ docker build --os linux
    unknown flag: --os
    $ docker build --arch s390x
    unknown flag: --arch
    

    I will try to troubleshoot what works best on an arm macos machine later today, but I guess the approach you are suggesting may work better if we ever want to support using podman for build and run.


    davidgumberg commented at 12:03 AM on January 16, 2025:

    How to best make this compatible with podman and/or macos remains an open question, but I've switched to using CI_IMAGE_PLATFORM that gets passed to docker build and docker run as you suggested


    davidgumberg commented at 10:28 PM on January 16, 2025:

    Marking this as resolved since my latest push tries to set the right native "--platform=linux/{arch}", falling back to "--platform=linux" which is also valid according to docker's documentation although I haven't tested this yet.

  6. maflcko approved
  7. maflcko commented at 10:07 AM on January 15, 2025: member

    lgtm, but I left some feedback

  8. davidgumberg force-pushed on Jan 15, 2025
  9. davidgumberg renamed this:
    ci: Supply `--platform` argument to `docker build`.
    ci: Supply `--platform` argument to `docker` commands.
    on Jan 16, 2025
  10. davidgumberg commented at 12:05 AM on January 16, 2025: contributor

    Rebased to address feedback, removed redundant arch specification from image names and switched to using the --platform argument over the DOCKER_DEFAULT_PLATFORM environment variable.

  11. davidgumberg force-pushed on Jan 16, 2025
  12. DrahtBot added the label CI failed on Jan 16, 2025
  13. DrahtBot commented at 12:14 AM on January 16, 2025: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Debug: https://github.com/bitcoin/bitcoin/runs/35684658943</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still 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.

    </details>

  14. DrahtBot removed the label CI failed on Jan 16, 2025
  15. in ci/test/02_run_container.sh:17 in 3f6863b745 outdated
      13 | @@ -14,7 +14,7 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
      14 |    # Though, exclude those with newlines to avoid parsing problems.
      15 |    python3 -c 'import os; [print(f"{key}={value}") for key, value in os.environ.items() if "\n" not in value and "HOME" != key and "PATH" != key and "USER" != key]' | tee "/tmp/env-$USER-$CONTAINER_NAME"
      16 |    # System-dependent env vars must be kept as is. So read them from the container.
      17 | -  docker run --rm "${CI_IMAGE_NAME_TAG}" bash -c "env | grep --extended-regexp '^(HOME|PATH|USER)='" | tee --append "/tmp/env-$USER-$CONTAINER_NAME"
      18 | +  docker run "$CI_IMAGE_PLATFORM" --rm "${CI_IMAGE_NAME_TAG}" bash -c "env | grep --extended-regexp '^(HOME|PATH|USER)='" | tee --append "/tmp/env-$USER-$CONTAINER_NAME"
    


    maflcko commented at 9:47 AM on January 16, 2025:

    The last push wasn't correct. This will fail https://cirrus-ci.com/task/4983203259219968?logs=ci#L194:

    [19:46:15.608] + docker run '' --rm docker.io/ubuntu:24.04 bash -c 'env | grep --extended-regexp '\''^(HOME|PATH|USER)='\'''
    [19:46:15.608] + tee --append /tmp/env-ci_worker_1731482059_419572074-ci_native_fuzz
    [19:46:15.610] Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
    [19:46:15.688] Error: repository name must have at least one component
    

    I guess pipefail should be enabled.

    Also, I wonder why the CI passed when this line was effectively disabled. Looking at #28138#issue-1818409930, I presume this will be failing when running the CI in a Fedora box.


    davidgumberg commented at 10:11 PM on January 16, 2025:

    The last push wasn't correct. This will fail

    Thanks for catching, I did this because without quotes the linter complains about SC2086: https://www.shellcheck.net/wiki/SC2086 and I didn't test any images built with the default CI_IMAGE_PLATFORM value.

    I am trying to use the native platform by default now in the latest push

    Don't fully grasp the context of #28138 but native_nowallet_libbitcoinkernel <details>

    <summary> worked on my fedora 40 machine even when this line fails. </summary>

    $ env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'FILE_ENV="./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh" ./ci/test_run_all.sh'
    # [...]
    + docker run '' --rm docker.io/ubuntu:22.04 bash -c 'env | grep --extended-regexp '\''^(HOME|PATH|USER)='\'''
    + tee --append /tmp/env-ltime-ci_native_previous_releases
    docker: invalid reference format.
    See 'docker run --help'.
    # [...]
    + ctest --stop-on-failure -j4 --timeout 2400
    Test project /ci_container_base/ci/scratch/build-x86_64-pc-linux-gnu
    100% tests passed, 0 tests failed out of 124
    + test/functional/test_runner.py --ci -j4 --tmpdirprefix /ci_container_base/ci/scratch/test_runner/ --ansi --combinedlogslen=99999999 --timeout-factor=40 --quiet --failfast
    ALL                                                      | ✓ Passed  | 1600 s (accumulated)
    

    </details>


    I guess pipefail should be enabled.

    +1


    maflcko commented at 9:01 AM on January 17, 2025:

    Don't fully grasp the context of #28138 but native_nowallet_libbitcoinkernel

    If it is no longer happening, I guess the workaround can be removed.


    maflcko commented at 12:13 PM on January 17, 2025:
  16. maflcko commented at 9:47 AM on January 16, 2025: member

    lgtm, but you'll have to undo the last force-push

  17. in ci/test/00_setup_env.sh:73 in 3f6863b745 outdated
      67 | @@ -68,3 +68,6 @@ export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential pkg-config curl ca-c
      68 |  export GOAL=${GOAL:-install}
      69 |  export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets}
      70 |  export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"}
      71 | +
      72 | +# The --platform argument used with `docker build` and `docker run`.
      73 | +export CI_IMAGE_PLATFORM=${CI_IMAGE_PLATFORM} # native platform by default
    


    maflcko commented at 9:51 AM on January 16, 2025:

    style wise I don't like using unbounded vars as fallbacks for an empty string. Might as well just set the empty string explicitly?

    Ref:

    sh-5.1# set -o nounset
    sh-5.1# export CI_IMAGE_PLATFORM=${CI_IMAGE_PLATFORM}
    sh: CI_IMAGE_PLATFORM: unbound variable
    sh-5.1# 
    

    davidgumberg commented at 10:11 PM on January 16, 2025:

    Thanks, fixed with a different approach.

  18. maflcko commented at 9:52 AM on January 16, 2025: member

    (In the pull description you can also remove the struck out stuff, so that it does not end up in the merge commit)

  19. davidgumberg force-pushed on Jan 16, 2025
  20. davidgumberg force-pushed on Jan 16, 2025
  21. DrahtBot added the label CI failed on Jan 16, 2025
  22. davidgumberg force-pushed on Jan 16, 2025
  23. davidgumberg force-pushed on Jan 16, 2025
  24. in ci/test/00_setup_env.sh:72 in e1c7c29727 outdated
      67 | @@ -68,3 +68,16 @@ export CI_BASE_PACKAGES=${CI_BASE_PACKAGES:-build-essential pkg-config curl ca-c
      68 |  export GOAL=${GOAL:-install}
      69 |  export DIR_QA_ASSETS=${DIR_QA_ASSETS:-${BASE_SCRATCH_DIR}/qa-assets}
      70 |  export CI_RETRY_EXE=${CI_RETRY_EXE:-"retry --"}
      71 | +
      72 | +# Try to get he host architecture in GOARCH format.
    


    davidgumberg commented at 10:14 PM on January 16, 2025:

    typo in this comment, I'll fix if I retouch

  25. davidgumberg commented at 10:19 PM on January 16, 2025: contributor

    Rebased to incorporate feedback, now try to set a good default --platform linux/$arch which should be an improvement for running CI on macOS.

    This solution also avoids an issue I ran into after making the image tags less specific, which is that if no --platform argument is set, docker will try to use any image that it has cached before fetching a native image.

  26. DrahtBot removed the label CI failed on Jan 17, 2025
  27. in ci/test/00_setup_env.sh:83 in e1c7c29727 outdated
      78 | +    NATIVE_PLATFORM="linux/$(go env GOARCH)"
      79 | +else
      80 | +    NATIVE_PLATFORM="linux"
      81 | +fi
      82 | +# The --platform argument used with `docker build` and `docker run`.
      83 | +export CI_IMAGE_PLATFORM=${CI_IMAGE_PLATFORM:-$NATIVE_PLATFORM} # native platform by default
    


    maflcko commented at 8:54 AM on January 17, 2025:

    Why the code above? Seems easier to just force "linux" (the fallback/default), which documents the requirements. It seems to work with podman, and I presume also works for the others?

    export CI_IMAGE_PLATFORM=${CI_IMAGE_PLATFORM:-"linux"} # Force linux, but use native arch by default
    

    davidgumberg commented at 6:38 PM on January 17, 2025:

    The reason I did this was because of the caching issue I described above which can be reproduced as follows with a clean docker cache:

    $ # clean docker cache on fedora 40
    $ systemctl restart docker 
    $ docker system prune -a
    
    $ docker run --platform=s390x docker.io/ubuntu:24.04 bash -c 'uname -m'
    Unable to find image 'ubuntu:24.04' locally
    24.04: Pulling from library/ubuntu
    755503a8fb36: Pull complete
    Digest: sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab
    Status: Downloaded newer image for ubuntu:24.04
    s390x
    $ docker run docker.io/ubuntu:24.04 bash -c 'uname -m' # no platform argument specified
    WARNING: The requested image's platform (linux/s390x) does not match the detected host platform (linux/amd64/v4) and no specific platform was requested
    s390x
    

    but it seems docker infers the arch if an OS is specified, and doesn't just fall back on a cache hit for that OS:

    $ docker run --platform=linux docker.io/ubuntu:24.04 bash -c 'uname -m'
    Unable to find image 'ubuntu:24.04' locally
    24.04: Pulling from library/ubuntu
    de44b265507a: Pull complete
    Digest: sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab
    Status: Downloaded newer image for ubuntu:24.04
    x86_64
    

    So I've taken your suggestion.


    maflcko commented at 8:24 AM on January 20, 2025:

    but it seems docker infers the arch if an OS is specified, and doesn't just fall back on a cache hit for that OS:

    Thanks for checking! In case this ever changes, it should be trivial to re-add the code you wrote by re-applying the diff: https://github.com/bitcoin/bitcoin/compare/1299bd89f8661028f9e1826c51a29d4e3fe39cdc..e1c7c29727faf2d0a5c6fa01505418aac26958fe

  28. maflcko approved
  29. maflcko commented at 8:56 AM on January 17, 2025: member

    lgtm ACK e1c7c29727faf2d0a5c6fa01505418aac26958fe

    I think some code can be removed to be more streamlined, but not a blocker.

  30. DrahtBot added the label Needs rebase on Jan 17, 2025
  31. davidgumberg force-pushed on Jan 17, 2025
  32. ci: Supply `platform` argument to docker commands.
    Later versions of docker require a `--platform` argument when building
    and running from a platform-specific image that differs from the host
    platform.
    6e29de2101
  33. davidgumberg force-pushed on Jan 17, 2025
  34. DrahtBot removed the label Needs rebase on Jan 17, 2025
  35. davidgumberg commented at 9:56 PM on January 17, 2025: contributor

    rebased to address merge conflicts and dropped unnecessary logic for getting the host machine arch.

  36. maflcko commented at 8:39 AM on January 20, 2025: member

    lgtm ACK 6e29de21010fc5213176a6ba29f754ca72612ea0

  37. hebasto commented at 8:55 AM on January 20, 2025: member

    Tested 6e29de21010fc5213176a6ba29f754ca72612ea0 on Ubuntu 24.10:

    $ docker --version
    Docker version 27.1.1, build 6312585
    $ env -i HOME="$HOME" PATH="$PATH" USER="$USER" bash -c 'FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh'
    ++++ dirname ./ci/test/00_setup_env.sh
    +++ cd ./ci/test/../../
    +++ pwd
    ++ BASE_READ_ONLY_DIR=/home/hebasto/git/bitcoin
    ++ export BASE_READ_ONLY_DIR
    ++ export BASE_ROOT_DIR=/ci_container_base
    ++ BASE_ROOT_DIR=/ci_container_base
    ++ export DEPENDS_DIR=/ci_container_base/depends
    ++ DEPENDS_DIR=/ci_container_base/depends
    ++ export BASE_SCRATCH_DIR=/ci_container_base/ci/scratch
    ++ BASE_SCRATCH_DIR=/ci_container_base/ci/scratch
    ++ export BINS_SCRATCH_DIR=/ci_container_base/ci/scratch/bins/
    ++ BINS_SCRATCH_DIR=/ci_container_base/ci/scratch/bins/
    ++ echo 'Setting specific values in env'
    Setting specific values in env
    ++ '[' -n ./ci/test/00_setup_env_arm.sh ']'
    ++ set -o errexit
    ++ source ./ci/test/00_setup_env_arm.sh
    +++ export LC_ALL=C.UTF-8
    +++ LC_ALL=C.UTF-8
    +++ export HOST=arm-linux-gnueabihf
    +++ HOST=arm-linux-gnueabihf
    +++ export DPKG_ADD_ARCH=armhf
    +++ DPKG_ADD_ARCH=armhf
    +++ export 'PACKAGES=python3-zmq g++-arm-linux-gnueabihf busybox libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf'
    +++ PACKAGES='python3-zmq g++-arm-linux-gnueabihf busybox libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf'
    +++ export CONTAINER_NAME=ci_arm_linux
    +++ CONTAINER_NAME=ci_arm_linux
    +++ export CI_IMAGE_NAME_TAG=docker.io/debian:bookworm
    +++ CI_IMAGE_NAME_TAG=docker.io/debian:bookworm
    +++ export CI_IMAGE_PLATFORM=linux/arm64
    +++ CI_IMAGE_PLATFORM=linux/arm64
    +++ export USE_BUSY_BOX=true
    +++ USE_BUSY_BOX=true
    +++ export RUN_UNIT_TESTS=true
    +++ RUN_UNIT_TESTS=true
    +++ export RUN_FUNCTIONAL_TESTS=false
    +++ RUN_FUNCTIONAL_TESTS=false
    +++ export GOAL=install
    +++ GOAL=install
    +++ export 'BITCOIN_CONFIG=-DREDUCE_EXPORTS=ON -DCMAKE_CXX_FLAGS='\''-Wno-psabi -Wno-error=maybe-uninitialized'\'''
    +++ BITCOIN_CONFIG='-DREDUCE_EXPORTS=ON -DCMAKE_CXX_FLAGS='\''-Wno-psabi -Wno-error=maybe-uninitialized'\'''
    ++ echo 'Fallback to default values in env (if not yet set)'
    Fallback to default values in env (if not yet set)
    ++ export MAKEJOBS=-j4
    ++ MAKEJOBS=-j4
    ++ export USE_BUSY_BOX=true
    ++ USE_BUSY_BOX=true
    ++ export RUN_UNIT_TESTS=true
    ++ RUN_UNIT_TESTS=true
    ++ export RUN_FUNCTIONAL_TESTS=false
    ++ RUN_FUNCTIONAL_TESTS=false
    ++ export RUN_TIDY=false
    ++ RUN_TIDY=false
    ++ export TEST_RUNNER_TIMEOUT_FACTOR=40
    ++ TEST_RUNNER_TIMEOUT_FACTOR=40
    ++ export RUN_FUZZ_TESTS=false
    ++ RUN_FUZZ_TESTS=false
    ++ export BOOST_TEST_RANDOM=1
    ++ BOOST_TEST_RANDOM=1
    ++ export DEBIAN_FRONTEND=noninteractive
    ++ DEBIAN_FRONTEND=noninteractive
    ++ export CCACHE_MAXSIZE=500M
    ++ CCACHE_MAXSIZE=500M
    ++ export CCACHE_TEMPDIR=/tmp/.ccache-temp
    ++ CCACHE_TEMPDIR=/tmp/.ccache-temp
    ++ export CCACHE_COMPRESS=1
    ++ CCACHE_COMPRESS=1
    ++ export CCACHE_DIR=/ci_container_base/ci/scratch/ccache
    ++ CCACHE_DIR=/ci_container_base/ci/scratch/ccache
    ++ export BASE_OUTDIR=/ci_container_base/ci/scratch/out
    ++ BASE_OUTDIR=/ci_container_base/ci/scratch/out
    ++ export PREVIOUS_RELEASES_DIR=/ci_container_base/prev_releases
    ++ PREVIOUS_RELEASES_DIR=/ci_container_base/prev_releases
    ++ export 'CI_BASE_PACKAGES=build-essential pkgconf curl ca-certificates ccache python3 rsync git procps bison e2fsprogs cmake'
    ++ CI_BASE_PACKAGES='build-essential pkgconf curl ca-certificates ccache python3 rsync git procps bison e2fsprogs cmake'
    ++ export GOAL=install
    ++ GOAL=install
    ++ export DIR_QA_ASSETS=/ci_container_base/ci/scratch/qa-assets
    ++ DIR_QA_ASSETS=/ci_container_base/ci/scratch/qa-assets
    ++ export 'CI_RETRY_EXE=retry --'
    ++ CI_RETRY_EXE='retry --'
    ++ export CI_IMAGE_PLATFORM=linux/arm64
    ++ CI_IMAGE_PLATFORM=linux/arm64
    + set -o errexit
    + ./ci/test/02_run_container.sh
    + '[' -z '' ']'
    + python3 -c 'import os; [print(f"{key}={value}") for key, value in os.environ.items() if "\n" not in value and "HOME" != key and "PATH" != key and "USER" != key]'
    + tee /tmp/env-hebasto-ci_arm_linux
    CCACHE_TEMPDIR=/tmp/.ccache-temp
    FILE_ENV=./ci/test/00_setup_env_arm.sh
    CCACHE_MAXSIZE=500M
    BASE_OUTDIR=/ci_container_base/ci/scratch/out
    RUN_UNIT_TESTS=true
    CI_RETRY_EXE=retry --
    CI_IMAGE_LABEL=bitcoin-ci-test
    BINS_SCRATCH_DIR=/ci_container_base/ci/scratch/bins/
    TEST_RUNNER_TIMEOUT_FACTOR=40
    PACKAGES=python3-zmq g++-arm-linux-gnueabihf busybox libc6:armhf libstdc++6:armhf libfontconfig1:armhf libxcb1:armhf
    MAKEJOBS=-j4
    CONTAINER_NAME=ci_arm_linux
    PWD=/home/hebasto/git/bitcoin
    CCACHE_DIR=/ci_container_base/ci/scratch/ccache
    CI_BASE_PACKAGES=build-essential pkgconf curl ca-certificates ccache python3 rsync git procps bison e2fsprogs cmake
    BASE_ROOT_DIR=/ci_container_base
    DEPENDS_DIR=/ci_container_base/depends
    RUN_FUNCTIONAL_TESTS=false
    GOAL=install
    CCACHE_COMPRESS=1
    DPKG_ADD_ARCH=armhf
    RUN_TIDY=false
    HOST=arm-linux-gnueabihf
    RUN_FUZZ_TESTS=false
    CI_IMAGE_PLATFORM=linux/arm64
    USE_BUSY_BOX=true
    BOOST_TEST_RANDOM=1
    BITCOIN_CONFIG=-DREDUCE_EXPORTS=ON -DCMAKE_CXX_FLAGS='-Wno-psabi -Wno-error=maybe-uninitialized'
    SHLVL=2
    DIR_QA_ASSETS=/ci_container_base/ci/scratch/qa-assets
    CI_IMAGE_NAME_TAG=docker.io/debian:bookworm
    BASE_SCRATCH_DIR=/ci_container_base/ci/scratch
    BASE_READ_ONLY_DIR=/home/hebasto/git/bitcoin
    LC_ALL=C.UTF-8
    PREVIOUS_RELEASES_DIR=/ci_container_base/prev_releases
    DEBIAN_FRONTEND=noninteractive
    _=/usr/bin/python3
    + docker run --platform=linux/arm64 --rm docker.io/debian:bookworm bash -c 'env | grep --extended-regexp '\''^(HOME|PATH|USER)='\'''
    + tee --append /tmp/env-hebasto-ci_arm_linux
    exec /usr/bin/bash: exec format error
    + MAYBE_CPUSET=
    + '[' '' ']'
    + echo 'Creating docker.io/debian:bookworm container to run in'
    Creating docker.io/debian:bookworm container to run in
    + DOCKER_BUILDKIT=1
    + docker build --file /home/hebasto/git/bitcoin/ci/test_imagefile --build-arg CI_IMAGE_NAME_TAG=docker.io/debian:bookworm --build-arg FILE_ENV=./ci/test/00_setup_env_arm.sh --platform=linux/arm64 --label=bitcoin-ci-test --tag=ci_arm_linux /home/hebasto/git/bitcoin
    [+] Building 0.1s (8/8) FINISHED                                                                                                                                                                                     docker:default
     => [internal] load build definition from test_imagefile                                                                                                                                                                       0.0s
     => => transferring dockerfile: 600B                                                                                                                                                                                           0.0s
     => WARN: InvalidDefaultArgInFrom: Default value for ARG ${CI_IMAGE_NAME_TAG} results in empty or invalid base image name (line 8)                                                                                             0.0s
     => [internal] load metadata for docker.io/library/debian:bookworm                                                                                                                                                             0.0s
     => [internal] load .dockerignore                                                                                                                                                                                              0.0s
     => => transferring context: 2B                                                                                                                                                                                                0.0s
     => [1/4] FROM docker.io/library/debian:bookworm                                                                                                                                                                               0.0s
     => [internal] load build context                                                                                                                                                                                              0.0s
     => => transferring context: 249B                                                                                                                                                                                              0.0s
     => CACHED [2/4] COPY ./ci/retry/retry /usr/bin/retry                                                                                                                                                                          0.0s
     => CACHED [3/4] COPY ./ci/test/00_setup_env.sh ././ci/test/00_setup_env_arm.sh ./ci/test/01_base_install.sh /ci_container_base/ci/test/                                                                                       0.0s
     => ERROR [4/4] RUN ["bash", "-c", "cd /ci_container_base/ && set -o errexit && source ./ci/test/00_setup_env.sh && ./ci/test/01_base_install.sh"]                                                                             0.1s
    ------                                                                                                                                                                                                                              
     > [4/4] RUN ["bash", "-c", "cd /ci_container_base/ && set -o errexit && source ./ci/test/00_setup_env.sh && ./ci/test/01_base_install.sh"]:
    0.099 exec /usr/bin/bash: exec format error
    ------
    
     1 warning found (use docker --debug to expand):
     - InvalidDefaultArgInFrom: Default value for ARG ${CI_IMAGE_NAME_TAG} results in empty or invalid base image name (line 8)
    test_imagefile:16
    --------------------
      14 |     COPY ./ci/test/00_setup_env.sh ./${FILE_ENV} ./ci/test/01_base_install.sh /ci_container_base/ci/test/
      15 |     
      16 | >>> RUN ["bash", "-c", "cd /ci_container_base/ && set -o errexit && source ./ci/test/00_setup_env.sh && ./ci/test/01_base_install.sh"]
      17 |     
    --------------------
    ERROR: failed to solve: process "bash -c cd /ci_container_base/ && set -o errexit && source ./ci/test/00_setup_env.sh && ./ci/test/01_base_install.sh" did not complete successfully: exit code: 1
    
  38. maflcko commented at 9:00 AM on January 20, 2025: member

    0.099 exec /usr/bin/bash: exec format error

    This is unrelated to the changes in this pull request, as it happens on master as well.

    You'll have to set up qemu. Possibly with podman run --rm --privileged docker.io/multiarch/qemu-user-static --reset -p yes

  39. hebasto approved
  40. hebasto commented at 9:09 AM on January 20, 2025: member

    ACK 6e29de21010fc5213176a6ba29f754ca72612ea0

  41. fanquake merged this on Jan 20, 2025
  42. fanquake closed this on Jan 20, 2025

  43. sedited referenced this in commit e1405325c9 on Feb 3, 2025
  44. stickies-v referenced this in commit d760fd3dda on Mar 17, 2025
  45. stickies-v referenced this in commit cc83553352 on Mar 17, 2025
  46. stickies-v referenced this in commit 2614933f06 on Mar 17, 2025
  47. stickies-v referenced this in commit b70418c5fc on Mar 17, 2025
  48. stickies-v referenced this in commit 69f8a1fe50 on Mar 17, 2025
  49. bug-castercv502 referenced this in commit bf2e6853b0 on Sep 28, 2025
  50. bitcoin locked this on Jan 20, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-24 09:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me