loop icon indicating copy to clipboard operation
loop copied to clipboard

Lightning Terminal Crash on start up from Loop DB Error

Open gkrizek opened this issue 1 year ago • 7 comments
trafficstars

I'm running litd with the latest version (0.12.3). We've had several nodes hit a problem where they fail to start up and the entire litd binary shuts down. The stack trace indicates it's an issue with Loop and database access. We have made no changes since previous versions. Here is a stack trace:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x11c488c]

goroutine 1 [running]:
github.com/lightninglabs/loop/loopd.openDatabase(0x3fc55e0, 0x1aee188?)
	github.com/lightninglabs/[email protected]/loopd/utils.go:62 +0x29c
github.com/lightninglabs/loop/loopd.(*Daemon).initialize(0x40000d83c0, 0x0)
	github.com/lightninglabs/[email protected]/loopd/daemon.go:411 +0x518
github.com/lightninglabs/loop/loopd.(*Daemon).StartAsSubserver(0xfffcefcc8c10?, 0xffff972f3f18?, 0x18?)
	github.com/lightninglabs/[email protected]/loopd/daemon.go:194 +0x7c
github.com/lightninglabs/lightning-terminal/subservers.(*loopSubServer).Start(0x40009539b8?, {0x14b31cc?, 0x18?}, 0x185a4a0?, 0x1?)
	github.com/lightninglabs/lightning-terminal/subservers/loop.go:74 +0x28
github.com/lightninglabs/lightning-terminal/subservers.(*subServerWrapper).startIntegrated(0x4000600420, {0x2e9f8e0?, 0x40008a0350?}, 0x1b1c683?, 0x8?, 0x40064c3230)
	github.com/lightninglabs/lightning-terminal/subservers/subserver.go:106 +0x3c
github.com/lightninglabs/lightning-terminal/subservers.(*Manager).StartIntegratedServers(0x4000618540, {0x2e9f8e0, 0x40008a0350}, 0x1ad8c89?, 0xc?)
	github.com/lightninglabs/lightning-terminal/subservers/manager.go:94 +0x16c
github.com/lightninglabs/lightning-terminal.(*LightningTerminal).start(0x4000000900)
	github.com/lightninglabs/lightning-terminal/terminal.go:666 +0x18a8
github.com/lightninglabs/lightning-terminal.(*LightningTerminal).Run(0x4000000900)
	github.com/lightninglabs/lightning-terminal/terminal.go:305 +0x658
main.main()
	github.com/lightninglabs/lightning-terminal/cmd/litd/main.go:14 +0x88

To resolve the issue, we delete the loop directory.

Expected behavior

Litd can run without crashing

Actual behavior

Litd start up crashes

gkrizek avatar Feb 29 '24 16:02 gkrizek