loop icon indicating copy to clipboard operation
loop copied to clipboard

loopd Fails to cancel failed swap

Open AhmedMSedeek opened this issue 4 years ago • 1 comments
trafficstars

I've been using loopd for a while now through RTL interface, but recently I got too many stuck swaps in "Initiated" state so I digged deeper to find out what is causing this and found that the payment is reported as failed by lnd but loopd fails to close swap causing it to stay stuck

Expected behavior

loopd should close swap after failed payment

Actual behavior

Kindly check the following output of loopd just after restarted

2021-10-23 07:11:09.856 [INF] LOOP: 13f3aa Register 1 conf ntfn for swap script on chain (hh=706211)
2021-10-23 07:11:09.861 [INF] LOOP: 13f3aa Checking preimage reveal height 706291 exceeded (height 706267)
2021-10-23 07:11:09.865 [INF] LOOP: 13f3aa Waiting for either htlc on-chain confirmation or  off-chain payment failure
2021-10-23 07:11:09.880 [INF] LOOP: 13f3aa Server update: SERVER_FAILED_OFF_CHAIN_TIMEOUT received, timestamp: 2021-10-22 23:39:47.405046678 +0200 EET
2021-10-23 07:11:09.881 [INF] LOOP: 13f3aa swap subscription: server finished serving updates
2021-10-23 07:11:09.925 [INF] LOOP: 13f3aa Payment 14df9cdd17ee562852707aec4575b88d44f3d57b62f722b9adf09ea792768968: state=IN_FLIGHT, inflight_htlcs=0, inflight_amt=0 mSAT
2021-10-23 07:11:10.029 [INF] LOOP: 13f3aa Payment 13f3aa3e227d54ac88c0f1c44c669cc5a79a054dd98a023a43b37f68bf0f95b0: state=IN_FLIGHT, inflight_htlcs=0, inflight_amt=0 mSAT
2021-10-23 07:11:10.199 [INF] LOOP: 13f3aa Payment 14df9cdd17ee562852707aec4575b88d44f3d57b62f722b9adf09ea792768968: state=IN_FLIGHT, inflight_htlcs=1, inflight_amt=30000000 mSAT
2021-10-23 07:11:10.636 [INF] LOOP: 13f3aa Payment 13f3aa3e227d54ac88c0f1c44c669cc5a79a054dd98a023a43b37f68bf0f95b0: state=IN_FLIGHT, inflight_htlcs=1, inflight_amt=1061146500 mSAT
2021-10-23 07:11:10.787 [INF] LOOP: 13f3aa Payment 13f3aa3e227d54ac88c0f1c44c669cc5a79a054dd98a023a43b37f68bf0f95b0: state=IN_FLIGHT, inflight_htlcs=2, inflight_amt=1591719750 mSAT
2021-10-23 07:11:11.108 [INF] LOOP: 13f3aa Payment 13f3aa3e227d54ac88c0f1c44c669cc5a79a054dd98a023a43b37f68bf0f95b0: state=IN_FLIGHT, inflight_htlcs=3, inflight_amt=1857006375 mSAT
2021-10-23 07:11:11.419 [INF] LOOP: 13f3aa Payment 13f3aa3e227d54ac88c0f1c44c669cc5a79a054dd98a023a43b37f68bf0f95b0: state=IN_FLIGHT, inflight_htlcs=4, inflight_amt=1989649687 mSAT
2021-10-23 07:11:12.642 [INF] LOOP: 13f3aa Payment 13f3aa3e227d54ac88c0f1c44c669cc5a79a054dd98a023a43b37f68bf0f95b0: state=IN_FLIGHT, inflight_htlcs=3, inflight_amt=928503187 mSAT
2021-10-23 07:11:12.836 [INF] LOOP: 13f3aa Payment 13f3aa3e227d54ac88c0f1c44c669cc5a79a054dd98a023a43b37f68bf0f95b0: state=IN_FLIGHT, inflight_htlcs=4, inflight_amt=1525398093 mSAT
2021-10-23 07:11:14.331 [INF] LOOP: 13f3aa Payment 13f3aa3e227d54ac88c0f1c44c669cc5a79a054dd98a023a43b37f68bf0f95b0: state=IN_FLIGHT, inflight_htlcs=3, inflight_amt=1260111468 mSAT
2021-10-23 07:11:14.560 [INF] LOOP: 13f3aa Payment 13f3aa3e227d54ac88c0f1c44c669cc5a79a054dd98a023a43b37f68bf0f95b0: state=IN_FLIGHT, inflight_htlcs=4, inflight_amt=1691202234 mSAT
2021-10-23 07:11:16.166 [INF] LOOP: 13f3aa Payment 13f3aa3e227d54ac88c0f1c44c669cc5a79a054dd98a023a43b37f68bf0f95b0: state=IN_FLIGHT, inflight_htlcs=3, inflight_amt=1260111468 mSAT
2021-10-23 07:11:17.386 [INF] LOOP: 13f3aa Payment 13f3aa3e227d54ac88c0f1c44c669cc5a79a054dd98a023a43b37f68bf0f95b0: state=IN_FLIGHT, inflight_htlcs=4, inflight_amt=1691202234 mSAT
2021-10-23 07:11:19.274 [INF] LOOP: 13f3aa Payment 14df9cdd17ee562852707aec4575b88d44f3d57b62f722b9adf09ea792768968: state=IN_FLIGHT, inflight_htlcs=0, inflight_amt=0 mSAT
2021-10-23 07:11:19.292 [INF] LOOP: 13f3aa Payment 14df9cdd17ee562852707aec4575b88d44f3d57b62f722b9adf09ea792768968: state=FAILED
2021-10-23 07:11:19.292 [INF] LOOP: 13f3aa Failed prepayment: payment failed: FAILURE_REASON_INCORRECT_PAYMENT_DETAILS
2021-10-23 07:11:19.293 [INF] LOOP: 13f3aa Canceling swap: 1 payment failed: FAILURE_REASON_INCORRECT_PAYMENT_DETAILS, 1 attempts
2021-10-23 07:11:19.301 [WRN] LOOP: 13f3aa Could not report failure: rpc error: code = Unknown desc = cancel swap failed

To reproduce

I'm not sure how to reproduce, it just happens from time to time but a lot recently

System information

I'm using Lightning Loop as a standalone application not as part of Lightning Terminal

I'm interacting with Loop Through Ride The Lightning interface

I'm using "loop-windows-amd64-v0.15.0-beta", I downloaded it from releases page

AhmedMSedeek avatar Oct 23 '21 05:10 AhmedMSedeek

Could not report failure

Don't worry about this, it's just a quick report to the server that we should cancel the swap back faster. It'll still fully cancel in 30 minutes no matter what. Are you still seeing failures to cancel?

If you lookup the swap with loop swapinfo {hash} is it in a final state? If so, everything is fine!

carlaKC avatar Nov 03 '21 10:11 carlaKC