lnd: lnd crash after lncli closechannel --force

Background

Tried to force close a zombie channel inactive foe 134 days

Your environment

lnd 0.9.2-beta Linux btclnd 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux Bitcoin Core version v0.19.0.1

Steps to reproduce

lncli closechannel --force 8860eafc5f8570e115bdad8e4e9379ede5f72e496fe8627107a5a2332d7457a9 0

Expected behaviour

close zombie channel

Actual behaviour

[lncli] rpc error: code = Unavailable desc = transport is closing

lnd.log: 2020-04-30 23:32:00.237 [INF] LTND: Active chain: Bitcoin (network=mainnet) 2020-04-30 23:34:16.626 [INF] CHDB: Checking for schema update: latest_version=12, db_version=12 2020-04-30 23:34:16.667 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080 2020-04-30 23:34:16.667 [INF] RPCS: password RPC server listening on 0.0.0.0:10009 2020-04-30 23:34:16.671 [INF] LTND: Waiting for wallet encryption password. Use lncli create to create a wallet, lncli unlock to unlock an existing wallet, or lncli changepassword to change the password of an existing wallet and unlock it. 2020-04-30 23:40:37.699 [INF] LNWL: Opened wallet 2020-04-30 23:40:38.177 [INF] LTND: Primary chain is set to: bitcoin 2020-04-30 23:40:38.221 [INF] LTND: Initializing bitcoind backed fee estimator 2020-04-30 23:40:38.221 [INF] LNWL: Started listening for bitcoind block notifications via ZMQ on 127.0.0.1:28332 2020-04-30 23:40:38.221 [INF] LNWL: Started listening for bitcoind transaction notifications via ZMQ on 127.0.0.1:28333 2020-04-30 23:40:43.780 [INF] LNWL: The wallet has been unlocked without a time limit 2020-04-30 23:40:43.969 [INF] LTND: LightningWallet opened 2020-04-30 23:40:44.145 [INF] HSWC: Restoring in-memory circuit state from disk 2020-04-30 23:40:44.157 [INF] HSWC: Payment circuits loaded: num_pending=0, num_open=0 2020-04-30 23:40:44.213 [INF] HSWC: Trimming open circuits for chan_id=622332:1781:1, start_htlc_id=2 2020-04-30 23:40:44.536 [INF] LTND: Channel backup proxy channel notifier starting 2020-04-30 23:40:44.536 [INF] ATPL: Instantiating autopilot with max_channels=5, allocation=0.600000, min_chan_size=20000, max_chan_size=16777215, private=false, min_confs=1, conf_target=3 2020-04-30 23:40:44.542 [INF] RPCS: RPC server listening on 0.0.0.0:10009 2020-04-30 23:40:44.559 [INF] RPCS: gRPC proxy started at 127.0.0.1:8080 2020-04-30 23:40:44.564 [INF] LTND: Waiting for chain backend to finish sync, start_height=628318 2020-04-30 23:40:45.397 [INF] LNWL: Started rescan from block 00000000000000000001b0d8d51c0ca48c97485f2edd1164d3586b2f2343b925 (height 628317) for 84 addresses 2020-04-30 23:40:48.605 [INF] LNWL: Catching up block hashes to height 628318, this might take a while 2020-04-30 23:40:48.628 [INF] LNWL: Done catching up block hashes 2020-04-30 23:40:48.628 [INF] LNWL: Finished rescan for 84 addresses (synced to block 000000000000000000108f550bec8eb344a86e76d5ccde31194dc7e9dd22f8e5, height 628318) 2020-04-30 23:40:48.842 [INF] LTND: Chain backend is fully synced (end_height=628318)! 2020-04-30 23:40:48.869 [INF] PRNF: PeerNotifier starting 2020-04-30 23:40:48.928 [INF] NTFN: New block epoch subscription 2020-04-30 23:40:48.935 [INF] HSWC: Starting HTLC Switch 2020-04-30 23:40:48.935 [INF] NTFN: New block epoch subscription 2020-04-30 23:40:49.063 [INF] LNWL: Removed invalid transaction: (*wire.MsgTx)(0x2c2c320)({ Version: (int32) 2, TxIn: ([]*wire.TxIn) (len=3 cap=3) { (*wire.TxIn)(0x2dfbb00)({ PreviousOutPoint: (wire.OutPoint) 3be18fbca03b3500c1467de0a31bfa0e2a1accaa32f1a30eb22907d700aa0b5c:1, SignatureScript: ([]uint8) { }, Witness: (wire.TxWitness) (len=2 cap=2) { ([]uint8) (len=72 cap=72) { 00000000 30 45 02 21 00 e4 2c ec 49 cb a6 db c7 fb 88 21 |0E.!..,.I…!| 00000010 59 22 ff 32 19 cc 18 39 39 37 45 1f 49 aa b9 31 |Y".2…997E.I…1| 00000020 af 6c 38 29 c9 02 20 7e ff 5e 9f d3 fc 5b 93 44 |.l8)… ~.^…[.D| 00000030 9f 30 71 87 9c e6 89 5d c7 2c 64 c2 df 3e 26 9d |.0q…].,d…>&.| 00000040 8d 72 0f b3 3b b7 e2 01 |.r…;…| }, ([]uint8) (len=33 cap=33) { 00000000 02 05 b7 33 59 ec b1 7f 50 b5 ac ea 62 dc 83 28 |…3Y…P…b…(| 00000010 15 1d 4b 8a e1 db 80 81 98 f0 48 ee 3e d1 9e 2b |…K…H.>…+| 00000020 d4 |.| } }, Sequence: (uint32) 0 }), (*wire.TxIn)(0x2dfbb40)({ PreviousOutPoint: (wire.OutPoint) d9489bd02ca4406392a60d6e778f296ea2cf66edaf3f610061921eedcdf84c5f:1, SignatureScript: ([]uint8) { }, Witness: (wire.TxWitness) (len=2 cap=2) { ([]uint8) (len=71 cap=71) { 00000000 30 44 02 20 23 c3 fb 23 52 05 ee 6b 2d 90 de 35 |0D. #…#R…k-…5| 00000010 7e c8 91 4c 5b 9b 24 bb b6 fa da e0 bf 29 fb d2 |~…L[.$…)…| 00000020 25 ae 64 3a 02 20 24 b9 a3 03 a6 f5 15 06 bb bc |%.d:. $…| 00000030 04 d4 6e 34 ca 7f a2 8b 6f bd bd 11 28 4a 83 fb |…n4…o…(J…| 00000040 94 b8 57 ec 93 2f 01 |…W…/.| }, ([]uint8) (len=33 cap=33) { 00000000 03 71 71 dc 31 10 02 6b 6e 54 2e ee 27 74 0d 94 |.qq.1…knT…‘t…| 00000010 e5 88 26 13 ca ee 47 a0 26 e8 e6 ca ef 4c 57 b4 |…&…G.&…LW.| 00000020 e1 |.| } }, Sequence: (uint32) 0 }), (wire.TxIn)(0x2dfbb80)({ PreviousOutPoint: (wire.OutPoint) 8831bd4552604b6d350a77be308860aac4bee309bec5c2a33a06959dffeec101:0, SignatureScript: ([]uint8) { }, Witness: (wire.TxWitness) (len=2 cap=2) { ([]uint8) (len=72 cap=72) { 00000000 30 45 02 21 00 d5 3a b3 54 99 56 04 81 f2 02 ed |0E.!..:.T.V…| 00000010 17 64 ec 3a 76 46 2b c2 8d f9 85 54 47 98 d0 53 |.d.:vF+…TG…S| 00000020 fd e3 75 0e a3 02 20 2d de 78 b0 2a a5 9e 99 21 |…u… -.x.…!| 00000030 21 57 d2 97 86 05 35 f3 8a 47 74 29 81 f2 75 6d |!W…5…Gt)…um| 00000040 ce db 61 8b bd 32 1f 01 |…a…2…| }, ([]uint8) (len=33 cap=33) { 00000000 02 d0 e8 b9 75 ff 28 6e 8d 19 05 8e a2 48 1f 5d |…u.(n…H.]| 00000010 0d 3d b6 14 a8 3e 27 0f ef 0a d3 eb 2e 6e 49 5d |.=…>’…nI]| 00000020 da |.| } }, Sequence: (uint32) 0 }) }, TxOut: ([]*wire.TxOut) (len=1 cap=1) { (*wire.TxOut)(0x2c2c360)({ Value: (int64) 325286, PkScript: ([]uint8) (len=22 cap=22) { 00000000 00 14 22 4a be ef 2f 91 a5 06 95 e2 a8 92 74 bd |…"J…/…t.| 00000010 14 47 35 16 d6 71 |.G5…q| } }) }, LockTime: (uint32) 622147 })

2020-04-30 23:40:49.064 [INF] NTFN: New block epoch subscription 2020-04-30 23:40:49.101 [INF] NTFN: New block epoch subscription 2020-04-30 23:40:49.175 [INF] CNCT: Creating ChannelArbitrators for 3 active channels 2020-04-30 23:40:49.176 [INF] NTFN: New block epoch subscription 2020-04-30 23:40:49.176 [INF] NTFN: New block epoch subscription 2020-04-30 23:40:49.177 [INF] NTFN: New block epoch subscription 2020-04-30 23:40:49.204 [INF] NTFN: New spend subscription: spend_id=3, outpoint=b450e05e740a5da8ef9731ab50770e7f3ddc9aabc4d70533e7ffb9f7531ddda8:0, script=0 e399add0f329b4c9e81ce85bf79e0ec4aad6f75a3f72eaee27b86db71516326a, height_hint=623336 2020-04-30 23:40:49.205 [INF] NTFN: Dispatching historical spend rescan for outpoint=b450e05e740a5da8ef9731ab50770e7f3ddc9aabc4d70533e7ffb9f7531ddda8:0, script=0 e399add0f329b4c9e81ce85bf79e0ec4aad6f75a3f72eaee27b86db71516326a, start=623336, end=628318 2020-04-30 23:40:49.206 [INF] NTFN: New spend subscription: spend_id=1, outpoint=f029b45a579b89dabbd7b80b0ed84215dea37c8acfc0eda13ce9eebb82f8945f:1, script=0 55f813c2b6cace6cec9f9915e80484f01c234c99c451cd9412eb6f5f0965811e, height_hint=628317 2020-04-30 23:40:49.207 [INF] NTFN: Dispatching historical spend rescan for outpoint=f029b45a579b89dabbd7b80b0ed84215dea37c8acfc0eda13ce9eebb82f8945f:1, script=0 55f813c2b6cace6cec9f9915e80484f01c234c99c451cd9412eb6f5f0965811e, start=628317, end=628318 2020-04-30 23:40:49.208 [INF] NTFN: New spend subscription: spend_id=2, outpoint=8860eafc5f8570e115bdad8e4e9379ede5f72e496fe8627107a5a2332d7457a9:0, script=0 01828c8befde6fd248dbd6530b7aad657941b79044d7cbfc5ad41e29e7a5f801, height_hint=628317 2020-04-30 23:40:49.208 [INF] NTFN: Dispatching historical spend rescan for outpoint=8860eafc5f8570e115bdad8e4e9379ede5f72e496fe8627107a5a2332d7457a9:0, script=0 01828c8befde6fd248dbd6530b7aad657941b79044d7cbfc5ad41e29e7a5f801, start=628317, end=628318 2020-04-30 23:40:49.308 [INF] CNCT: Close observer for ChannelPoint(f029b45a579b89dabbd7b80b0ed84215dea37c8acfc0eda13ce9eebb82f8945f:1) active 2020-04-30 23:40:49.464 [INF] CNCT: Close observer for ChannelPoint(8860eafc5f8570e115bdad8e4e9379ede5f72e496fe8627107a5a2332d7457a9:0) active 2020-04-30 23:40:49.505 [INF] CNCT: Close observer for ChannelPoint(b450e05e740a5da8ef9731ab50770e7f3ddc9aabc4d70533e7ffb9f7531ddda8:0) active 2020-04-30 23:40:49.505 [INF] CNCT: ChannelArbitrator(f029b45a579b89dabbd7b80b0ed84215dea37c8acfc0eda13ce9eebb82f8945f:1): starting state=StateDefault 2020-04-30 23:40:49.516 [INF] CNCT: ChannelArbitrator(8860eafc5f8570e115bdad8e4e9379ede5f72e496fe8627107a5a2332d7457a9:0): starting state=StateBroadcastCommit 2020-04-30 23:40:49.938 [INF] CNCT: ChannelArbitrator(8860eafc5f8570e115bdad8e4e9379ede5f72e496fe8627107a5a2332d7457a9:0): force closing chan 2020-04-30 23:40:49.975 [INF] HSWC: Removing channel link with ChannelID(a957742d33a2a5077162e86f492ef7e5ed79934e8eadbd15e170855ffcea6088) 2020-04-30 23:40:50.027 [INF] RPCS: Stopping RPC Server 2020-04-30 23:40:50.027 [INF] RPCS: Stopping SignRPC Sub-RPC Server 2020-04-30 23:40:50.027 [INF] RPCS: Stopping AutopilotRPC Sub-RPC Server 2020-04-30 23:40:50.031 [INF] RPCS: Stopping ChainRPC Sub-RPC Server 2020-04-30 23:40:50.031 [INF] RPCS: Stopping InvoicesRPC Sub-RPC Server 2020-04-30 23:40:50.032 [INF] RPCS: Stopping WalletKitRPC Sub-RPC Server 2020-04-30 23:40:50.032 [INF] RPCS: Stopping WatchtowerClientRPC Sub-RPC Server 2020-04-30 23:40:50.032 [INF] RPCS: Stopping WatchtowerRPC Sub-RPC Server 2020-04-30 23:40:50.032 [INF] RPCS: Stopping RouterRPC Sub-RPC Server 2020-04-30 23:40:50.034 [INF] LTND: Shutdown complete 2020-04-30 23:41:50.875 [INF] LTND: Version: 0.9.2-beta commit=v0.9.2-beta, build=production, logging=default 2020-04-30 23:41:50.876 [INF] LTND: Active chain: Bitcoin (network=mainnet) 2020-04-30 23:44:09.672 [INF] CHDB: Checking for schema update: latest_version=12, db_version=12 2020-04-30 23:44:09.719 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080 2020-04-30 23:44:09.719 [INF] RPCS: password RPC server listening on 0.0.0.0:10009 2020-04-30 23:44:09.720 [INF] LTND: Waiting for wallet encryption password. Use lncli create to create a wallet, lncli unlock to unlock an existing wallet, or lncli changepassword to change the password of an existing wallet and unlock it.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 42 (17 by maintainers)

Most upvoted comments

@wpaulino OMG, we got it going! i am as happy as it gets! sorry for wasting your time for my bad mistakes. Hope my reporting this crash after lncli force closechannel will make a tiny contribution to lnd development. Here is the log: https://gist.github.com/bereska/12c9324b5692362bb7b145ece03d57e8 I will keep on monitoring lnd to see if all the channels are restored Thank you