Closed pseudozach closed 5 years ago
Closing as duplicate of #2427. You can try the suggested patch there for now until the proper fix is out.
@pseudozach I have the same issue. Can you help me how can I fix this issue. Thanks
@omkarsunku I just installed latest LND version and started again and it worked.
@pseudozach Thanks I will try it.
Background
I closed lnd without doing shutdown and next time I launched it it failed with the above error and stacktrace as below.
Your environment
Steps to reproduce
Expected behaviour
lnd should restart properly or indicate if something has been corrupted.
Actual behaviour
lnd start crashes with the below logs.
LOGS `2019-02-01 17:59:00.486 [INF] LTND: Version: 0.5.2-beta commit=v0.5.2-beta-rc4,build=production, logging=default 2019-02-01 17:59:00.487 [INF] LTND: Active chain: Bitcoin (network=mainnet) 2019-02-01 17:59:00.490 [INF] CHDB: Checking for schema update: latest_version=7, db_version=7 2019-02-01 17:59:00.505 [INF] RPCS: password gRPC proxy started at [::]:8080 2019-02-01 17:59:00.505 [INF] RPCS: password RPC server listening on 127.0.0.1:10008 2019-02-01 17:59:00.505 [INF] RPCS: password RPC server listening on [::]:10009 2019-02-01 17:59:00.509 [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. 2019-02-01 17:59:01.978 [INF] LNWL: Opened wallet 2019-02-01 17:59:02.179 [INF] LTND: Primary chain is set to: bitcoin 2019-02-01 17:59:02.242 [INF] LNWL: Started listening for bitcoind block notific ations via ZMQ on tcp://127.0.0.1:18500 2019-02-01 17:59:02.242 [INF] LTND: Initializing bitcoind backed fee estimator 2019-02-01 17:59:02.242 [INF] LNWL: Started listening for bitcoind transaction n otifications via ZMQ on tcp://127.0.0.1:18501 2019-02-01 17:59:03.385 [INF] LNWL: The wallet has been unlocked without a time limit 2019-02-01 17:59:03.397 [INF] LTND: LightningWallet opened 2019-02-01 17:59:03.500 [INF] LNWL: Started rescan from block 000000000000000000 0ba394229e6a27af6ff1c2f41e67381748a72b8f0ec198 (height 561075) for 15 addresses 2019-02-01 17:59:03.501 [INF] LNWL: Starting rescan from block 00000000000000000 00ba394229e6a27af6ff1c2f41e67381748a72b8f0ec198 2019-02-01 17:59:03.754 [INF] HSWC: Restoring in-memory circuit state from disk 2019-02-01 17:59:03.820 [INF] HSWC: Payment circuits loaded: numpending=0, num open=0 2019-02-01 17:59:03.822 [INF] HSWC: Trimming open circuits for chan_id=561056:13 93:0, start_htlc_id=0 2019-02-01 17:59:03.822 [INF] HSWC: Trimming open circuits for chan_id=561024:66 6:0, start_htlc_id=4 2019-02-01 17:59:03.860 [INF] LNWL: Rescan finished at 561075 (00000000000000000 00ba394229e6a27af6ff1c2f41e67381748a72b8f0ec198) 2019-02-01 17:59:04.022 [INF] LNWL: Catching up block hashes to height 561075, t his might take a while 2019-02-01 17:59:04.203 [INF] LNWL: Done catching up block hashes 2019-02-01 17:59:04.203 [INF] LNWL: Finished rescan for 15 addresses (synced to block 0000000000000000000ba394229e6a27af6ff1c2f41e67381748a72b8f0ec198, height 5 61075) 2019-02-01 17:59:04.398 [INF] RPCS: RPC server listening on [::]:10009 2019-02-01 17:59:04.401 [INF] LTND: Waiting for chain backend to finish sync, st art_height=561076 2019-02-01 17:59:04.402 [INF] RPCS: RPC server listening on 127.0.0.1:10008 2019-02-01 17:59:04.402 [INF] RPCS: gRPC proxy started at [::]:8080 2019-02-01 17:59:04.424 [INF] LTND: Chain backend is fully synced (end_height=56 1076)! 2019-02-01 17:59:04.497 [INF] HSWC: Starting HTLC Switch 2019-02-01 17:59:04.498 [INF] NTFN: New block epoch subscription 2019-02-01 17:59:04.498 [INF] NTFN: New block epoch subscription 2019-02-01 17:59:04.645 [INF] NTFN: New block epoch subscription 2019-02-01 17:59:04.652 [INF] UTXN: Processing outputs from missed blocks. Start ing with blockHeight=561075, to current blockHeight=561076 2019-02-01 17:59:04.653 [INF] UTXN: Attempting to graduate height=561076: num_ki ds=0, num_babies=0 2019-02-01 17:59:04.795 [INF] UTXN: UTXO Nursery is now fully synced 2019-02-01 17:59:04.815 [INF] CNCT: Creating ChannelArbitrators for 2 active cha nnels 2019-02-01 17:59:04.817 [INF] NTFN: New block epoch subscription 2019-02-01 17:59:04.818 [INF] NTFN: New block epoch subscription 2019-02-01 17:59:04.819 [INF] NTFN: New spend subscription: spend_id=1, outpoint =97a0ce235b71c886cb2e6ce5da44d571b462dec336f9a98fdef2a515348072c2:0, height_hint =561056 2019-02-01 17:59:04.826 [INF] NTFN: New spend subscription: spend_id=2, outpoint =12b62092b4e8bffd6d4b975d5def031f5b13cfe1bb97adb5361ca0b1ebe0bd54:0, height_hint =561024 2019-02-01 17:59:04.912 [INF] CNCT: Close observer for ChannelPoint(97a0ce235b71 c886cb2e6ce5da44d571b462dec336f9a98fdef2a515348072c2:0) active 2019-02-01 17:59:04.995 [INF] CNCT: Close observer for ChannelPoint(12b62092b4e8 bffd6d4b975d5def031f5b13cfe1bb97adb5361ca0b1ebe0bd54:0) active 2019-02-01 17:59:04.995 [INF] CNCT: ChannelArbitrator(97a0ce235b71c886cb2e6ce5da 44d571b462dec336f9a98fdef2a515348072c2:0): starting state=StateDefault 2019-02-01 17:59:05.014 [INF] CNCT: ChannelArbitrator(12b62092b4e8bffd6d4b975d5d ef031f5b13cfe1bb97adb5361ca0b1ebe0bd54:0): starting state=StateDefault 2019-02-01 17:59:05.025 [INF] DISC: Authenticated Gossiper is starting 2019-02-01 17:59:05.026 [INF] BRAR: Starting contract observer, watching for bre aches. 2019-02-01 17:59:05.028 [INF] NTFN: New block epoch subscription 2019-02-01 17:59:05.032 [INF] CRTR: FilteredChainView starting 2019-02-01 17:59:05.032 [ERR] DISC: Unable to rebroadcast stale channels: unable to retrieve outgoing channels: Channel from self node has no policy 2019-02-01 17:59:05.124 [INF] CRTR: Filtering chain using 14924 channels active 2019-02-01 17:59:05.129 [INF] CRTR: Prune tip for Channel Graph: height=561075, hash=0000000000000000000ba394229e6a27af6ff1c2f41e67381748a72b8f0ec198 2019-02-01 17:59:05.133 [INF] CRTR: Syncing channel graph from height=561075 (ha sh=0000000000000000000ba394229e6a27af6ff1c2f41e67381748a72b8f0ec198) to height=5 61076 (hash=0000000000000000001253e35a32e52cbe5eb3928cb32b7ff3ec4683482575e8) 2019-02-01 17:59:05.420 [INF] CRTR: Block 0000000000000000001253e35a32e52cbe5eb3 928cb32b7ff3ec4683482575e8 (height=561076) closed 0 channels 2019-02-01 17:59:05.421 [INF] CRTR: Graph pruning complete: 0 channels were clos ed since height 561075 2019-02-01 17:59:05.548 [INF] CMGR: Server listening on [::]:9735 2019-02-01 17:59:05.549 [ERR] DISC: unable to validate channel update announceme nt for short_chan_id=(lnwire.ShortChannelID) 561056:1393:0 : max_htlc(18446744073709551615 mSAT) for channel update greater than capacity(5 00000000 mSAT) 2019-02-01 17:59:05.552 [ERR] FNDG: failed adding to router graph: error sending channel update: unable to validate channel update announcement for short_chan_i d=(lnwire.ShortChannelID) 561056:1393:0 : max_htlc(18446744073709551615 mSAT) for channel update greater than capacity(5 00000000 mSAT) 2019-02-01 17:59:05.627 [INF] LTND: Shutdown complete panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x68 pc=0xd75431]
goroutine 1 [running]: main.(server).establishPersistentConnections.func1(0xc0002d8a80, 0xc0005fa420, 0x0, 0xc0002ee3f0, 0xc0005fa448, 0x21) /Users/roasbeef/gocode/src/github.com/lightningnetwork/lnd/server.go:166 1 +0x41 github.com/lightningnetwork/lnd/channeldb.(LightningNode).ForEachChannel.func1( 0xc0002d8a80, 0x117ff30, 0xc0002d8a80) /Users/roasbeef/gocode/src/github.com/lightningnetwork/lnd/channeldb/gra ph.go:2026 +0x598 github.com/coreos/bbolt.(DB).View(0xc0002d4000, 0xc000605bf0, 0x0, 0x0) /Users/roasbeef/gocode/pkg/mod/github.com/coreos/bbolt@v0.0.0-2018022318 4059-7ee3ded59d4835e10f3e7d0f7603c42aa5e83820/db.go:701 +0x97 github.com/lightningnetwork/lnd/channeldb.(LightningNode).ForEachChannel(0xc000 978240, 0x0, 0xc01062d300, 0x0, 0xc000069270) /Users/roasbeef/gocode/src/github.com/lightningnetwork/lnd/channeldb/gra ph.go:2038 +0xc6 main.(server).establishPersistentConnections(0xc00005e300, 0x0, 0x0) /Users/roasbeef/gocode/src/github.com/lightningnetwork/lnd/server.go:165 6 +0x345 main.(server).Start(0xc00005e300, 0x1039660, 0x2e) /Users/roasbeef/gocode/src/github.com/lightningnetwork/lnd/server.go:100 2 +0x260 main.lndMain(0x0, 0x0) /Users/roasbeef/gocode/src/github.com/lightningnetwork/lnd/lnd.go:417 +0 x10bf main.main() /Users/roasbeef/gocode/src/github.com/lightningnetwork/lnd/lnd.go:449 +0 x2d`