Skip to content

Socket disconnect followed by segfault on macos/arm64 #191

@ryanofsky

Description

@ryanofsky

Originally posted by @pinheadmz in bitcoin/bitcoin#32297 (comment)

I got some crashes testing bitcoin/bitcoin@37cd2c0 on macos/arm64. This is on a pruned mainnet node catching up on about 30 days behind blockchain tip. After these two crashes I wasn't able to reproduce any more for a little while after a few restarts then got the third crash.

server: build/bin/bitcoin-node -server=1 -printtoconsole=1 -ipcbind=unix -debug=ipc -debug=rpc -debug=http

client: build/bin/bitcoin-cli -getinfo

server:

2025-07-15T17:16:16Z [ipc] {bitcoin-node-65637/b-capnp-loop-15499815} IPC server: socket disconnected.
2025-07-15T17:16:16Z [ipc] {bitcoin-node-65637/b-capnp-loop-15499815} IPC server destroy N2mp11ProxyServerIN3ipc5capnp8messages4InitEEE
2025-07-15T17:16:16Z [rpc] ThreadRPCServer method=getbalances user=
Segmentation fault: 11

client: (1st occurence)

error: timeout on transient error: kj::Exception: capnp/rpc.c++:2779: disconnected: Peer disconnected.
stack: 102cca3bc 102cc028c 1007be520 1007c0f90

Probably bitcoin-node is not running or not listening on a unix socket. Can be started with:

    bitcoin-node -chain=main -ipcbind=unix



client: (2nd occurence)

libc++abi: terminating due to uncaught exception of type kj::ExceptionImpl: /opt/homebrew/include/kj/memory.h:258: failed: expected ptr != nullptr; null Own<> dereference
stack: 10563c7cb 102e3e057 102ef043b 102ef0367 102ef7b6b 102ef7a0b 102ef79af 102ef794f 102ef788f 102ef7833 102ef51b7 102e528e7 102e525f3 10339cf9b 10339c8eb 102e307b3 102e3062b 102e30503 102e2f593 1895a2f93 18959dd33
Abort trap: 6

client: (3rd occurence)

error: kj::Exception: capnp/rpc.c++:2779: disconnected: Peer disconnected.
stack: 1070523bc 10704828c 104f737c4 104f7621c
error: timeout on transient error: Could not connect to the server 127.0.0.1:8332


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions