Skip to content

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

Closed
@aantonop

Description

Background

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

LND crashes after restart

Your environment

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions