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
bug: a failed node start can leave the running node without an event loop #1399
Follow-ups from #1395, to fix in the ldk-node rc.82 bump PR:
A failed start() cancels whichever event loop is current, possibly one a concurrent start() on the same node installed, leaving a running node with no loop. Fix: listenForEvents returns the task it installs, and the catch cancels it only if eventLoopTask is still that task (compared under eventLoopLock). review
waitForEnd can return false for a finished task: cancelling the timer wakes its sleep, and try? lets resume(false) race resume(true), giving false shutdown warnings. Fix: resume false only when the sleep did not throw.
In 3.2.0: these are follow-ups to the node restart fix in #1395, part of the 3.2.0 stability work, and land in the ldk-node rc.82 bump PR before the release.
Two more gaps in the same area, from @pwltr's review of #1395 (#1395 (review)). Both predate that PR:
A failed start() cancels the event loop without waiting for it, so an acknowledgement or delivery the loop already took can still be in flight when a retry or wipe follows.
restart() and the previous-configuration recovery release the node with no wait when native stop() throws (for example PersistenceFailed), so a rebuild can load the wallet's event queue while the old loop's iteration still acknowledges or delivers.
Fix both with the start() catch change above: wait for the loop being cancelled, bounded like stop(), before releasing or rebuilding.
Two more cases with the same root, from @pwltr's review of #1395 (#1395 (review)): a wallet graph or routing-cache reset still stopping the old node, or a wallet retry that read the old node, can cancel the listener a settings restart just installed for the replacement, leaving it running without a listener until another start.
Fix with the rest of this issue: the event-loop slot records which node its loop serves, and a cancel or replace only takes the loop of the node it was asked about.
Activity
ovitrif commentedon Nov 23, 2026
In 3.2.0: these are follow-ups to the node restart fix in #1395, part of the 3.2.0 stability work, and land in the ldk-node rc.82 bump PR before the release.
ovitrif commentedon Nov 24, 2026
Two more gaps in the same area, from @pwltr's review of #1395 (#1395 (review)). Both predate that PR:
start()cancels the event loop without waiting for it, so an acknowledgement or delivery the loop already took can still be in flight when a retry or wipe follows.restart()and the previous-configuration recovery release the node with no wait when nativestop()throws (for examplePersistenceFailed), so a rebuild can load the wallet's event queue while the old loop's iteration still acknowledges or delivers.Fix both with the
start()catch change above: wait for the loop being cancelled, bounded likestop(), before releasing or rebuilding.ovitrif commentedon Nov 24, 2026
Two more cases with the same root, from @pwltr's review of #1395 (#1395 (review)): a wallet graph or routing-cache reset still stopping the old node, or a wallet retry that read the old node, can cancel the listener a settings restart just installed for the replacement, leaving it running without a listener until another start.
Fix with the rest of this issue: the event-loop slot records which node its loop serves, and a cancel or replace only takes the loop of the node it was asked about.