Skip to content

fix: 31.0:13 — IPC socket crash loop in nocow oneshot (#222)#223

Merged
MattDHill merged 1 commit into
31.xfrom
fix/ipc-socket-chattr-crash-loop
May 19, 2026
Merged

fix: 31.0:13 — IPC socket crash loop in nocow oneshot (#222)#223
MattDHill merged 1 commit into
31.xfrom
fix/ipc-socket-chattr-crash-loop

Conversation

@helix-nine
Copy link
Copy Markdown
Contributor

Summary

  • Closes Bitcoin Core 31.0:12 crash loop when IPC socket exists before chattr nocow step #222. After 31.0:12 shipped (which auto-restarts bitcoind when toggling IPC), users with a stale bitcoin-core.sock in $rootDir/ipc/ hit a restart loop: the nocow oneshot's chattr -R +C $rootDir returns "Operation not supported" on Unix socket files and exits non-zero, aborting startup.
  • Restrict the recursive chattr +C to directories and regular files via find … \( -type d -o -type f \) -exec chattr +C {} +, and remove any stale IPC socket up front so bitcoin-node can bind cleanly.
  • Bumps to 31.0:13. No migration; version file renamed in place per repo policy.

Note: 28.x / 29.x / 30.x don't ship IPC, so they can't produce the stale socket and aren't affected. The find -type d -o -type f change is a robustness improvement that could be backported defensively, but isn't required to fix this bug.

Test plan

  • npx tsc --noEmit clean
  • make builds successfully (riscv64 + x86_64, v31.0:13)
  • Install on a StartOS host with a pre-existing bitcoin-core.sock in $rootDir/ipc/ and confirm bitcoind starts instead of crash-looping
  • Toggle Enable IPC off → on → off and confirm no stale-socket regression on subsequent restarts

The nocow oneshot ran `chattr -R +C` over the entire data directory.
`chattr` returns "Operation not supported" on Unix socket files, which
aborted the oneshot with a non-zero exit code and put the package into a
restart loop whenever bitcoin-core.sock was left behind in
$rootDir/ipc/ (issue #222).

Restrict the recursive chattr to directories and regular files via
`find`, and remove any stale IPC socket up front so bitcoin-node can
bind cleanly.

Bumps to 31.0:13.
@helix-nine helix-nine force-pushed the fix/ipc-socket-chattr-crash-loop branch from 3b4de90 to 1c06091 Compare May 19, 2026 13:29
@MattDHill MattDHill merged commit 893a166 into 31.x May 19, 2026
1 check passed
@MattDHill MattDHill deleted the fix/ipc-socket-chattr-crash-loop branch May 19, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bitcoin Core 31.0:12 crash loop when IPC socket exists before chattr nocow step

2 participants