lnd: LND crashing - panic: runtime error: index out of range [1] with length 0

Background

Upgraded to 0.14-beta-rc3 (mistakenly thought it was 0.13.4-beta)

LND crashes after restart

Your environment

  • version of lnd 0.14-beta-rc3

  • which operating system (uname -a on *Nix) Linux ln 5.4.0-1059-aws #62~18.04.1-Ubuntu SMP Fri Oct 22 21:51:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

  • version of btcd, bitcoind, or other backend bitcoind: v0.21.1

Steps to reproduce

Nov 14 23:38:41 ln lnd[18905]: 2021-11-14 23:38:41.140 [INF] NTFN: Dispatching confirmed spend notification for outpoint=9c9c7dce1fa814c87435f29c483a7d730f980d751e765fb8ba0a480fd32aea63:0, script=0 418f94a68090431b1d138993a6d9afebd3edd5708f8c1463c19f3a15340accc3 at current height=709748: 20f71bd0c14f171995a4616b0c6f2f675d4bf207c502838bb2dc081f90f3506f[0] spending 9c9c7dce1fa814c87435f29c483a7d730f980d751e765fb8ba0a480fd32aea63:0 at height=709447 Nov 14 23:38:41 ln lnd[18905]: panic: runtime error: index out of range [1] with length 0 Nov 14 23:38:41 ln lnd[18905]: goroutine 2798 [running]: Nov 14 23:38:41 ln lnd[18905]: github.com/lightningnetwork/lnd/contractcourt.isSuccessSpend(…) Nov 14 23:38:41 ln lnd[18905]: /usr/local/gocode/src/github.com/lightningnetwork/lnd/contractcourt/htlc_timeout_resolver.go:270 Nov 14 23:38:41 ln lnd[18905]: github.com/lightningnetwork/lnd/contractcourt.(*htlcTimeoutResolver).Resolve(0xc007b89c00, 0xc005d83da0, 0x0, 0xc00865b0a0, 0x2) Nov 14 23:38:41 ln lnd[18905]: /usr/local/gocode/src/github.com/lightningnetwork/lnd/contractcourt/htlc_timeout_resolver.go:296 +0x3c9 Nov 14 23:38:41 ln lnd[18905]: github.com/lightningnetwork/lnd/contractcourt.(*ChannelArbitrator).resolveContract(0xc0061f0000, 0x18c2ed0, 0xc007b89c00) Nov 14 23:38:41 ln lnd[18905]: /usr/local/gocode/src/github.com/lightningnetwork/lnd/contractcourt/channel_arbitrator.go:2180 +0x2a2 Nov 14 23:38:41 ln lnd[18905]: created by github.com/lightningnetwork/lnd/contractcourt.(*ChannelArbitrator).launchResolvers Nov 14 23:38:41 ln lnd[18905]: /usr/local/gocode/src/github.com/lightningnetwork/lnd/contractcourt/channel_arbitrator.go:1298 +0x12c Nov 14 23:38:41 ln systemd[1]: lnd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 32 (23 by maintainers)

Most upvoted comments

This bitcoind node has been running for years. It’s strange that it doesn’t have the full transaction. I’m going to run a reindex on the bitcoin node.