Closed ad2003 closed 6 years ago
Spent some time looking into this with the user on slack. Turns out the edge not being found is 395a1b980cc6d77c9f13c7291a3c5ccb5653181ab218d0b0f7517d2d34938d17:1
, which is not relevant to the user.
Currently, the server fails to start because we're unable to fetch the channel view of the graph when starting the router. This fails due to not finding the edge info for the channel above. Not sure how things got into this state however, as the edge seems to have been added successfully to the database from looking at the logs.
2018-09-17 20:50:39.300 [INF] CRTR: New channel discovered! Link connects 037584aa529af342287a0f91427df19f497925b93f9e1a73c48af2fe5cd16a1542 and 03b9bbc899b028a4c29b3fe17a7b382d64e3a8fc768f9ea91bdd8c4bc6ab4c7589 with ChannelPoint(395a1b980cc6d77c9f13c7291a3c5ccb5653181ab218d0b0f7517d2d34938d17:1): chan_id=595742887755513857, capacity=0.00103549 BTC
After providing them with a patch to start up, they ran into the following crash:
panic: runtime error: slice bounds out of range
goroutine 1 [running]:
github.com/lightningnetwork/lnd/vendor/github.com/coreos/bbolt.(*leafPageElement).value(...)
/home/pi/go/src/github.com/lightningnetwork/lnd/vendor/github.com/coreos/bbolt/page.go:126
github.com/lightningnetwork/lnd/vendor/github.com/coreos/bbolt.(*Cursor).keyValue(0x12377c18, 0x12af1480, 0x396ed8df, 0x8e516e8f, 0x41914c8f, 0x35de5d4b, 0x3542e2ba, 0xff5090cd)
/home/pi/go/src/github.com/lightningnetwork/lnd/vendor/github.com/coreos/bbolt/cursor.go:354 +0x190
github.com/lightningnetwork/lnd/vendor/github.com/coreos/bbolt.(*Cursor).next(0x12377c18, 0x9a1a14, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/pi/go/src/github.com/lightningnetwork/lnd/vendor/github.com/coreos/bbolt/cursor.go:248 +0xdc
github.com/lightningnetwork/lnd/vendor/github.com/coreos/bbolt.(*Cursor).Next(0x12377c18, 0x24, 0x24, 0x70b16424, 0x8, 0x8, 0x0)
/home/pi/go/src/github.com/lightningnetwork/lnd/vendor/github.com/coreos/bbolt/cursor.go:75 +0x64
github.com/lightningnetwork/lnd/vendor/github.com/coreos/bbolt.(*Bucket).ForEach(0x125947e0, 0x12377c4c, 0xa, 0xa)
/home/pi/go/src/github.com/lightningnetwork/lnd/vendor/github.com/coreos/bbolt/bucket.go:387 +0xa8
github.com/lightningnetwork/lnd/channeldb.(*ChannelGraph).ChannelView.func1(0x12067380, 0xb0e890, 0x12067380)
/home/pi/go/src/github.com/lightningnetwork/lnd/channeldb/graph.go:2626 +0xf8
github.com/lightningnetwork/lnd/vendor/github.com/coreos/bbolt.(*DB).View(0x1210a000, 0x12377c90, 0x0, 0x0)
/home/pi/go/src/github.com/lightningnetwork/lnd/vendor/github.com/coreos/bbolt/db.go:699 +0x80
github.com/lightningnetwork/lnd/channeldb.(*ChannelGraph).ChannelView(0x123be188, 0x123be878, 0x1, 0x1, 0x0, 0x0)
/home/pi/go/src/github.com/lightningnetwork/lnd/channeldb/graph.go:2606 +0x50
github.com/lightningnetwork/lnd/routing.(*ChannelRouter).Start(0x11f98280, 0x0, 0x0)
/home/pi/go/src/github.com/lightningnetwork/lnd/routing/router.go:378 +0x2f0
main.(*server).Start(0x12158380, 0x9cb1b2, 0x2e)
/home/pi/go/src/github.com/lightningnetwork/lnd/server.go:954 +0x150
main.lndMain(0x0, 0x0)
/home/pi/go/src/github.com/lightningnetwork/lnd/lnd.go:423 +0xf00
main.main()
/home/pi/go/src/github.com/lightningnetwork/lnd/lnd.go:455 +0x14
This seems to point towards a database corruption, which would also explain why we were unable to find the edge above even though it was successfully added.
rip rPi 😢
Background
I updated from 0.4.2 to 0.5.0-beta commit=3b2c807288b1b7f40d609533c1e96a510ac5fa6d. Everything just worked fine for around 24hours. But then the wallet was locked. I restarted everything manually, waited for bitcoind to start completely, started lnd manually but when I try to unlock my wallet I am getting the following log:
Your environment
uname -a
on *Nix)btcd
,bitcoind
, or other backendSteps to reproduce
Everythings starts fine, wallet unlocks successfully but locks after some time.
Expected behaviourH
It should work as before.
Actual behaviour
Tell us what happens instead