You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lightningd aborts (SIGABRT) on transient bitcoind RPC failure while polling getchaininfo #9573
A transient Bitcoin backend failure (e.g. bitcoind restarting, momentary RPC timeout) kills lightningd with FATAL SIGNAL 6 instead of retrying the poll. Observed on v26.06.7 on a long-lived signet node.
Evidence
bitcoind was healthy the whole time (extending the chain every ~30s, never restarted). One getchaininfo poll hit a transient connection failure:
plugin-bcliIO_IN: {..."id":"cln:getchaininfo#704","error":{"code":500,"message":"bitcoin-cli -signet ... getblockchaininfo: command failed (error: timeout on transient error: Could not connect to the server 127.0.0.1:38332 ..."}}
lightningdBROKEN: /usr/local/libexec/c-lightning/plugins/bcli error: bad response to getchaininfo (...), response was {..."error":{"code":500,...}}
lightningdBROKEN: FATAL SIGNAL 6 (version v26.06.7)
Backtrace (all inside the poll path, node was in the sync-wait loop — bitcoind itself was still in IBD, headercount 40331 / blockcount 4000):
getchaininfo is polled in loops while waiting for the backend (retry_sync, retry_height_reached in lightningd/chaintopology.c). Any "error" member in the plugin response goes through get_bitcoin_result() → bitcoin_plugin_error() → fatal(). There is no distinction between a transient transport failure and a genuine misconfiguration.
Fail-fast at initial setup is fine (lightningd cannot boot without chain info), but aborting a running node over a single failed status poll buys no safety — the node holds no in-flight chain operation at that point — only downtime. Every bitcoind restart/upgrade becomes a lightningd outage.
Expected behavior
Poll-loop getchaininfo failures should log at unusual level and retry on the next poll interval, same as the existing IBD/catch-up wait. (Same-class exposure also exists in the steady-state estimatefees/getrawblockbyheight polls via get_bitcoin_result() — worth a follow-up.)
Planned fix
Draft PR incoming: plumb an optional error callback through the getchaininfo call path (err_cb == NULL preserves today's fatal behavior for one-shot callers such as initial setup), wire it into the two poll loops to re-arm their timers, plus regression tests that stop bitcoind mid-poll and assert survival.
Activity
tests: reproduce lightningd abort on transient bitcoind failure
lightningd: retry getchaininfo polls on transient backend errors
tests: reproduce lightningd abort on transient bitcoind failure
lightningd: don't abort on transient bitcoin backend errors