Skip to content

askrene bug: The shortest path is reserve but it should not #8663

@vincenzopalazzo

Description

@vincenzopalazzo

Updating from 24.05 to 25.05 I noted a strange bug in the xpay (or renepay path finding algo) that have some sort fo memory leak that do not free the previous route reservetion that cause the failure of the pay command with the following error. In particular what bring me to assume that there is a memory leak is Raw error: cln err code: 205- messageFailed: We could not find a usable set of paths. The shortest path is .... but 0x0x0/1 already reserved 1813499msat by command "cln4go/6528/cln:xpay-as-pay#1558717/cln-xpay:askrene-reserve#134186/cln:askrene-reserve#1558904" (723567 seconds ago)`

Raw error: cln err code: `205` - message `Failed: We could not find a usable set of paths. The shortest path is 918993x2243x0->916866x678x6->903128x1195x0->0x0x0, but 0x0x0/1 already reserved 1813499msat by command \"cln4go/6528/cln:xpay-as-pay#1558717/cln-xpay:askrene-reserve#134186/cln:askrene-reserve#1558904\" (723567 seconds ago), 1813499msat by command \"cln4go/6528/cln:xpay-as-pay#1558717/cln-xpay:askrene-reserve#134221/cln:askrene-reserve#1559005\" (723560 seconds ago), 7936000msat by command \"cln4go/5539/cln:xpay-as-pay#1644637/cln-xpay:askrene-reserve#150200/cln:askrene-reserve#1644652\" (619295 seconds ago), 3047000msat by command \"cln4go/4082/cln:xpay-as-pay#1770630/cln-xpay:askrene-reserve#166889/cln:askrene-reserve#1770644\" (346055 seconds ago), 2494012msat by command \"cln4go/7669/cln:xpay-as-pay#2054222/cln-xpay:getroutes#192393/cln:getroutes#2054255\" (24982 seconds ago)`

This error got resolved by restarting the node, but due that the payout and the node it is fully automated this "restart" and retrying is causing a few problems!


This bug is found in the ocean node that process around 700 bolt12 payment a day and I did not spend time in trying to reproducing it, but the setup of ocean is kind of unique and look like the following one: Ocean Node -> exit node (a single one) -> Lightning network -> miner, so the exit note and the last of to reach the miner is most luckily the same channel across several weeks

Metadata

Metadata

Assignees

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