Skip to content

sv2-tp does not exit or reconnect when bitcoin core disconnects #97

@enirox001

Description

@enirox001

When running the full regtest stack (Bitcoin Core with -ipcbind=unix, sv2-tp, and an SRI pool connected), disconnecting Bitcoin Core produces the following logs in sv2-tp:

2026-04-25T08:46:03Z [ipc:error] IPC client method call interrupted by disconnect.
2026-04-25T08:46:03Z sv2-0 thread exit
2026-04-25T08:46:03Z [ipc:warning] {sv2-tp-56776/b-capnp-loop-56777} IPC client: unexpected network disconnect.

sv2-tp continues running but is no longer functional, it holds the port open and keeps any connected SRI pool clients attached, but cannot serve templates.
Restarting Bitcoin Core does not trigger reconnection. The only recovery path is manually killing sv2-tp (which also drops connected pool clients) and restarting the entire stack.

Expected behavior

One of two behaviors would be correct:

  • sv2-tp exits cleanly when Bitcoin Core disconnects, allowing a process supervisor to handle restart of the full stack.

  • sv2-tp detects the disconnect, drops connected clients gracefully, and attempts to reconnect to Bitcoin Core's IPC socket with backoff, resuming normal operation once the node is available again.

Currently neither happens.

Steps to reproduce

  1. Start Bitcoin Core: bitcoin -m node -regtest -ipcbind=unix
  2. Start sv2-tp: sv2-tp -regtest -conf=0 -ipcconnect=unix -debug=sv2
  3. Start SRI pool connected to sv2-tp
  4. Stop Bitcoin Core (Ctrl+C or bitcoin-cli -regtest stop)
  5. Observe sv2-tp logs, it logs the disconnect but keeps running
  6. Restart Bitcoin Core
  7. Observe that sv2-tp does not reconnect and remains non-functional

Environment

  • Bitcoin Core: 9ca6954a99 (compiled from source)
  • sv2-tp: 0e5d1e6 (compiled from source)
  • OS: Fedora 43

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