From e09fefed92f9a626e939ed6a437030b6c65c0287 Mon Sep 17 00:00:00 2001 From: Harry Beckwith Date: Mon, 27 Jul 2026 00:12:52 -0700 Subject: [PATCH] release: wait for the node to exit before stripping it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ARM64 job failed with 'strip: unable to copy file; reason: Text file busy'. 'bitcoin-cli stop' returns when the RPC is accepted, not when the process has gone, so strip raced a still-running bitcoind. The race was always there — x86_64 and macOS simply won it, and before this release the strip failure was swallowed by '2>/dev/null || true' so nobody would have noticed either way. Now that strip is load-bearing, wait for the process to actually exit and fail loudly if it never does. Co-Authored-By: Claude Opus 5 --- .github/workflows/release.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1dfdc61c9b7f..2a90e115c24c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -92,6 +92,17 @@ jobs: ./build/bin/bitcoin-cli -datadir="$DD" -chain=regtest generatetoaddress 101 "$A" >/dev/null test "$(./build/bin/bitcoin-cli -datadir="$DD" -chain=regtest getblockcount)" = "101" ./build/bin/bitcoin-cli -datadir="$DD" -chain=regtest stop + # `stop` returns as soon as the RPC is accepted, not when the process + # is gone — and strip cannot modify a running binary ("Text file + # busy"). Wait for it to actually exit. + for i in $(seq 1 60); do + pgrep -f "bitcoind -datadir=$DD" >/dev/null 2>&1 || break + sleep 1 + done + if pgrep -f "bitcoind -datadir=$DD" >/dev/null 2>&1; then + echo "::error::bitcoind did not exit after stop" + exit 1 + fi # Strip, and prove it worked. The previous version swallowed every error # into "2>/dev/null || true" and shipped a 292MB binary — 276MB of it