Closed whizz closed 6 years ago
Thanks for this report! I've been trying to track this bug down for some time now, and I think your set of logs (combined with the other reports I've received), should help in pinning this bug.
Similar
2017-12-29 20:45:15.850 [INF] HSWC: ChannelLink(6130eb2259237dee3ba526aae5f07b0b35d0c0329dcc78c5055b7732a87770ea:0) has exited
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8d4ec0]
goroutine 11327195 [running]:
github.com/lightningnetwork/lnd/lnwallet.(*LightningChannel).evaluateHTLCView(0xc420bcb180, 0xc421cef920, 0xc421acf620, 0xc421acf618, 0x7, 0xc4212f3b01, 0xc4213f8820)
/root/go/src/github.com/lightningnetwork/lnd/lnwallet/channel.go:2528 +0x820
github.com/lightningnetwork/lnd/lnwallet.(*LightningChannel).fetchCommitmentView(0xc420bcb180, 0x1, 0x3, 0x0, 0x2, 0x2, 0xc421124480, 0x4cb16f, 0xc4205dc1c0, 0x0)
/root/go/src/github.com/lightningnetwork/lnd/lnwallet/channel.go:2292 +0x199
github.com/lightningnetwork/lnd/lnwallet.(*LightningChannel).SignNextCommitment(0xc420bcb180, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/root/go/src/github.com/lightningnetwork/lnd/lnwallet/channel.go:2962 +0x29e
github.com/lightningnetwork/lnd/htlcswitch.(*channelLink).updateCommitTx(0xc4205831d0, 0xc42080a000, 0x0)
/root/go/src/github.com/lightningnetwork/lnd/htlcswitch/link.go:987 +0x44
github.com/lightningnetwork/lnd/htlcswitch.(*channelLink).htlcManager(0xc4205831d0)
/root/go/src/github.com/lightningnetwork/lnd/htlcswitch/link.go:538 +0x6fc
created by github.com/lightningnetwork/lnd/htlcswitch.(*channelLink).Start
/root/go/src/github.com/lightningnetwork/lnd/htlcswitch/link.go:267 +0x12b
Right now, I have the daemon in a state, that it crashes immediately after starting up and opening the wallet.
This is the entire log. I can run it with some more logging if you want.
2018-01-03 14:49:46.093 [INF] LTND: Version 0.3.0-alpha
2018-01-03 14:49:46.101 [INF] CHDB: Checking for schema update: latest_version=0, db_version=0
2018-01-03 14:49:46.193 [INF] RPCS: password RPC server listening on 127.0.0.1:10009
2018-01-03 14:49:46.198 [INF] RPCS: password gRPC proxy started at localhost:8080
2018-01-03 14:49:46.200 [INF] LTND: Waiting for wallet encryption password. Use `lncli create` to create wallet, or `lncli unlock` to unlock already created wallet.
2018-01-03 14:50:20.302 [INF] LNWL: Opened wallet
2018-01-03 14:50:20.304 [INF] LTND: Primary chain is set to: bitcoin
2018-01-03 14:50:20.332 [INF] LTND: Initializing btcd backed fee estimator
2018-01-03 14:50:22.310 [INF] LNWL: Opened wallet
2018-01-03 14:50:24.578 [INF] LNWL: The wallet has been unlocked without a time limit
2018-01-03 14:50:24.867 [INF] LTND: LightningWallet opened
2018-01-03 14:50:24.873 [INF] LNWL: Started rescan from block 00000000958954c5a0e2a0cd3b780a58eac8cbffe3455962ffcc84e6ced1343c (height 1257184) for 957 addresses
2018-01-03 14:50:24.974 [INF] LNWL: Catching up block hashes to height 1257184, this might take a while
2018-01-03 14:50:24.986 [INF] LNWL: Done catching up block hashes
2018-01-03 14:50:24.988 [INF] LNWL: Finished rescan for 957 addresses (synced to block 00000000958954c5a0e2a0cd3b780a58eac8cbffe3455962ffcc84e6ced1343c, height 1257184)
2018-01-03 14:50:25.352 [INF] RPCS: RPC server listening on 127.0.0.1:10009
2018-01-03 14:50:25.355 [INF] SRVR: Attempting to send msgs 1 to: 02c8ed754b0291755a296274cf52900f09dee1e5a2b8f7c6b6e2496a9ba5c7d86a
2018-01-03 14:50:25.357 [ERR] SRVR: unable to send message to 02c8ed754b0291755a296274cf52900f09dee1e5a2b8f7c6b6e2496a9ba5c7d86a, peer not found
2018-01-03 14:50:25.356 [INF] LTND: Waiting for chain backend to finish sync, start_height=1257184
2018-01-03 14:50:25.359 [WRN] FNDG: unable to send fundingLocked to peer 02c8ed754b0291755a296274cf52900f09dee1e5a2b8f7c6b6e2496a9ba5c7d86a: unable to find peer. Will retry when online
2018-01-03 14:50:25.359 [INF] RPCS: gRPC proxy started at localhost:8080
2018-01-03 14:50:25.360 [INF] SRVR: Attempting to send msgs 1 to: 0205135c541acd6b5f26a032b0508b1633a21ce0f27529b6773c5209c022e5f2c0
2018-01-03 14:50:25.367 [ERR] SRVR: unable to send message to 0205135c541acd6b5f26a032b0508b1633a21ce0f27529b6773c5209c022e5f2c0, peer not found
2018-01-03 14:50:25.367 [WRN] FNDG: unable to send fundingLocked to peer 0205135c541acd6b5f26a032b0508b1633a21ce0f27529b6773c5209c022e5f2c0: unable to find peer. Will retry when online
2018-01-03 14:50:25.372 [INF] LTND: Chain backend is fully synced (end_height=1257184)!
2018-01-03 14:50:25.599 [INF] HSWC: Starting HTLC Switch
2018-01-03 14:50:25.604 [INF] NTFN: New confirmations subscription: txid=508e4e5003e30e1040e75e299e4565f77a663e93093a8b64f485f55eaeaf9acc, numconfs=6
2018-01-03 14:50:25.716 [INF] NTFN: Dispatching 6 conf notification for 508e4e5003e30e1040e75e299e4565f77a663e93093a8b64f485f55eaeaf9acc
2018-01-03 14:50:25.717 [INF] NTFN: New confirmations subscription: txid=508e4e5003e30e1040e75e299e4565f77a663e93093a8b64f485f55eaeaf9acc, numconfs=6
2018-01-03 14:50:25.718 [INF] FNDG: Announcing ChannelPoint(508e4e5003e30e1040e75e299e4565f77a663e93093a8b64f485f55eaeaf9acc:0), short_chan_id=(*lnwire.ShortChannelID)(0xc420482710)(1257181:143:1)
2018-01-03 14:50:25.728 [INF] NTFN: Dispatching 6 conf notification for 508e4e5003e30e1040e75e299e4565f77a663e93093a8b64f485f55eaeaf9acc
2018-01-03 14:50:25.730 [INF] NTFN: New block epoch subscription
2018-01-03 14:50:25.730 [INF] FNDG: Announcing ChannelPoint(508e4e5003e30e1040e75e299e4565f77a663e93093a8b64f485f55eaeaf9acc:0), short_chan_id=(*lnwire.ShortChannelID)(0xc420482800)(1257139:149:0)
2018-01-03 14:50:25.843 [INF] BRAR: Retrieved 72 channels from database, watching with vigilance!
2018-01-03 14:50:25.851 [INF] NTFN: New spend subscription: utxo=0a03b05d0c4583a74d6cdc658676a6af8e680305272981271397785ad4c94c5a:0
2018-01-03 14:50:25.858 [INF] LNWL: Close observer for ChannelPoint(0a03b05d0c4583a74d6cdc658676a6af8e680305272981271397785ad4c94c5a:0) active
2018-01-03 14:50:25.861 [INF] NTFN: New spend subscription: utxo=9a5c78dfc69cc255f95780cedc83836b172df4e62d60be493c3d711cbaf81581:0
2018-01-03 14:50:25.863 [INF] LNWL: Close observer for ChannelPoint(9a5c78dfc69cc255f95780cedc83836b172df4e62d60be493c3d711cbaf81581:0) active
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x8c48a8]
goroutine 1 [running]:
github.com/lightningnetwork/lnd/lnwallet.(*LightningChannel).logUpdateToPayDesc(0xc42063a540, 0xc430616fc0, 0xc42059ef30, 0x8ad, 0xd200, 0xc4201e0ea0, 0x222, 0xc4406f0f00, 0xc4406f1340, 0xc4406f0ee0)
/root/go/src/github.com/lightningnetwork/lnd/lnwallet/channel.go:1475 +0x738
github.com/lightningnetwork/lnd/lnwallet.(*LightningChannel).restoreStateLogs(0xc42063a540, 0xc4205e8780, 0xc4205e8840, 0xc4205e8900, 0xc4205ca6e0, 0xc4201e0ea0, 0x0, 0x0)
/root/go/src/github.com/lightningnetwork/lnd/lnwallet/channel.go:1668 +0x6ef
github.com/lightningnetwork/lnd/lnwallet.(*LightningChannel).restoreCommitState(0xc42063a540, 0xc430617420, 0xc4306173a0, 0xc42059ee70, 0xc42059ef30, 0x21, 0xc43067d600)
/root/go/src/github.com/lightningnetwork/lnd/lnwallet/channel.go:1586 +0x48c
github.com/lightningnetwork/lnd/lnwallet.NewLightningChannel(0x0, 0x0, 0x146b7c0, 0xc420516000, 0x14698a0, 0xc4205be080, 0xc430662500, 0xc42063a380, 0x0, 0x0)
/root/go/src/github.com/lightningnetwork/lnd/lnwallet/channel.go:1286 +0xa30
main.(*breachArbiter).Start(0xc420228050, 0x0, 0x0)
/root/go/src/github.com/lightningnetwork/lnd/breacharbiter.go:215 +0x41c
main.(*server).Start(0xc4201b8100, 0xe4f2a8, 0x2e)
/root/go/src/github.com/lightningnetwork/lnd/server.go:409 +0xcd
main.lndMain(0x0, 0x0)
/root/go/src/github.com/lightningnetwork/lnd/lnd.go:401 +0x15f3
main.main()
/root/go/src/github.com/lightningnetwork/lnd/lnd.go:450 +0x36
@Roasbeef thinks I've ran into the same problem and asked me to add my logs here: node A, node B.
I restarted node B at around 01:37:27 and that resulted in crashing both nodes A and B. Immediately before restarting node B, this is what I saw and did. Before that, I tried to send a payment to node A which seemed to get stuck.
I just started seeing the same thing as @whizz and am unable to start lnd
. It is running on a preemptible Google Compute instance. So there's a chance this state came about from an unclean shutdown when the instance was preempted.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x8c3c08]
goroutine 1 [running]:
github.com/lightningnetwork/lnd/lnwallet.(*LightningChannel).logUpdateToPayDesc(0xc42117c8c0, 0xc421152fc0, 0xc420ad63c0, 0x197, 0xc350, 0xc420e93020, 0x23d, 0xc42159b240, 0xc42159b260, 0xc42159b220)
/home/matt/go/src/github.com/lightningnetwork/lnd/lnwallet/channel.go:1475 +0x738
github.com/lightningnetwork/lnd/lnwallet.(*LightningChannel).restoreStateLogs(0xc42117c8c0, 0xc42048a0c0, 0xc42048a480, 0xc42108f800, 0xc420093d60, 0xc420e93020, 0x0, 0x0)
/home/matt/go/src/github.com/lightningnetwork/lnd/lnwallet/channel.go:1668 +0x6ef
github.com/lightningnetwork/lnd/lnwallet.(*LightningChannel).restoreCommitState(0xc42117c8c0, 0xc421153420, 0xc4211533a0, 0xc420ad62d0, 0xc420ad63c0, 0x21, 0xc420191600)
/home/matt/go/src/github.com/lightningnetwork/lnd/lnwallet/channel.go:1586 +0x48c
github.com/lightningnetwork/lnd/lnwallet.NewLightningChannel(0x0, 0x0, 0x146c7c0, 0xc4204942a0, 0x146a8a0, 0xc42016e3e0, 0xc4209c3b80, 0xc420bf8380, 0x0, 0x0)
/home/matt/go/src/github.com/lightningnetwork/lnd/lnwallet/channel.go:1286 +0xa30
main.(*breachArbiter).Start(0xc420082140, 0x0, 0x0)
/home/matt/go/src/github.com/lightningnetwork/lnd/breacharbiter.go:215 +0x41c
main.(*server).Start(0xc420488500, 0xe4f493, 0x2e)
/home/matt/go/src/github.com/lightningnetwork/lnd/server.go:410 +0xcd
main.lndMain(0x0, 0x0)
/home/matt/go/src/github.com/lightningnetwork/lnd/lnd.go:401 +0x15f3
main.main()
/home/matt/go/src/github.com/lightningnetwork/lnd/lnd.go:450 +0x36
lnd crashed with "panic: runtime error: invalid memory address or nil pointer dereference".
Running on CentOS 7 Linux go version go1.9.2 linux/amd64
Here are the last 100 or so lines from log: