[bug]: payment attempts inflight for old payments #8146
Labels
bug
Unintended code behaviour
P1
MUST be fixed or reviewed
payments
Related to invoices/payments
resource usage
Software resource usage improvements/issues
Milestone
Background
In some goroutine dumps investigated recently (see for example #8125 (comment)) it was found that payment results are being collected for old payments that have been timed out long ago (I have some of those on a node as well), without them being failed properly. Somehow the switch does not give back any result for cltv-timed out payments when
collectResult
is called, which leads to creation of goroutines for each of those unhandled attempts, seeRelated issues are
where log lines
[INF] CRTR: Resuming payment shard
appear (but probably not the main cause of the issues).Your environment
lnd
v0.17.0Steps to reproduce
It is unclear how to reproduce, it may happen if there are many payments in flight and the node is restarted.
Expected behaviour
Old attempts are canceled back properly, payments marked failed such that no new payment loops are created.
Actual behaviour
Payment loops are started for old payments that are still of status in flight but not failed, leading to long-lived goroutines.
The text was updated successfully, but these errors were encountered: