Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lnd crashes with out of memory #1299

Closed
hpbock opened this issue May 30, 2018 · 16 comments
Closed

lnd crashes with out of memory #1299

hpbock opened this issue May 30, 2018 · 16 comments
Labels
resource usage Software resource usage improvements/issues

Comments

@hpbock
Copy link

hpbock commented May 30, 2018

Background

Right after startup, lnd is quite responsive, but after a while lncli commands like getinfo take longer and longer (up to several minutes). After some more time lnd crashes with an out of memory error. Short before it used more than 1.2GB of ram.

Your environment

  • Version 0.4.2-beta commit=7cf5ebe2650b6798182e10be198c7ffc1f1d6e19
  • Linux 4.14.34-v7+ Commitment transaction fee calcualtion #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux
  • bitcoind 0.16.0
  • Raspbian GNU/Linux 9, Raspberry Pi 3, 1GB ram
  • 49 active channels

Steps to reproduce

Just start the LND and wait.

Expected behaviour

The lncli commands are expected to return the requested values immediately. The lnd is expected to not crash.

Actual behaviour

Right after startup, lnd is quite responsive, but after a while lncli commands like getinfo take longer and longer (up to several minutes). After some more time lnd crashes with an out of memory error. Short before it used more than 1.2GB of ram. See attached logfile lnd-crash.txt.

@Roasbeef
Copy link
Member

Roasbeef commented Jun 2, 2018

Do you have swap enabled on your rasp pi? You may need swap in order to be able to boot as the scrypt parameters we use currently for wallet encryption may cause smaller machines to reach to swap.

Also looking at the logs:

May 30 10:29:46 lndpi lnd[5549]: 2018-05-30 10:29:46.882 [ERR] LNWL: invalid flag

Are you sure this is running 0.4.2? Is the bitcoind node configured w/ zmq?

@Roasbeef
Copy link
Member

Roasbeef commented Jun 2, 2018

Generally, I wouldn't really recommend folks run LN nodes on rasp pi's as historically, their hardware hasn't been the most reliable.

@vegardengen
Copy link
Contributor

I'd never ever run any machine without swap. There's tons of stuff in binaries that will only be used during startup, for example. That memory is much better used as buffers/cache for the OS.

@hpbock
Copy link
Author

hpbock commented Jun 4, 2018

Yes I am sure, I ran 0.4.2. Swap is enabled:

$ free -h
              total        used        free      shared  buff/cache   available
Mem:           976M        931M         28M        924K         16M         12M
Swap:          7.0G        555M        6.5G

While starting the old version 0.4.1 again, I noticed, that the lnd is unresponsive as well with regard to lncli requests. The out of memory exception does though not occurr. After quite some time (several minutes) it starts to behave as expected.

BTW better hardware is meanwhile available and the migration of my node is in progress.

@Roasbeef
Copy link
Member

Roasbeef commented Jun 4, 2018

Nothing fundamental w.r.t memory usage has changed between 0.4.1 and 0.4.2, if anything, memory usage should have gone down. We have received some reports in the past of our scrypt parmaters not playing nice with rasp pi's, but none of the reports have been reproducible, so not actionable.

For example I routinely run a small ish node on testnet that hovers around 30-50MB of memory usage.

May 30 10:29:46 lndpi lnd[5549]: 2018-05-30 10:29:46.880 [ERR] LNWL: invalid flag

Is the bitcoind node local or remote?

@Roasbeef
Copy link
Member

Roasbeef commented Jun 8, 2018

Any updates on this?

@evd0kim
Copy link

evd0kim commented Jun 8, 2018

Same issue on my RPi3, also 1Gb.

Single channel. Started opening second right before the crash. Also before the crash, I've tried to disconnect some peers since I noticed an increasing memory usage.

I can only provide now my ssh terminal output when I tried to execute listpeers command.

http://paste.debian.net/1028448/

UPD: swap is off; started node again from 320MB ram busy in total (bitcoind + lnd). It crashed when memory usage was oscillating around 600-700 at low and 800-900 at peak.

@Roasbeef
Copy link
Member

Roasbeef commented Jun 8, 2018

Very odd, as I have a node that runs with 25-50MB of memory usage no problem, and it also has tens of channels. The initial burst can be high at times though, as not all the peers have switched over to the new query feature which allows them to only send what's necessary. This can be made worse if your node is very slow to process the incoming messages. I would try adding a bit of swap in the short term.

@Perlover
Copy link

Perlover commented Jun 11, 2018

I had same problem (i had many Gb's free memory but first start of lnd always to be terminated by "No memory"). Please my logs below

Try to increase limits of "max locked memory" by:
ulimit -l
But before you need to increase hard limits for user. For example in CentOS 6.* this can be done through:

vi /etc/security/limits.d/99-bitcoin.conf

bitcoin hard memlock 79348736
bitcoin soft memlock 79348736

My logs about memory (it's not log file - it's STDERR of lnd process. These logs are not logged in log file):

2018-05-24 02:41:06.797 [INF] RPCS: [listchannels] fetched 0 channels from DB
2018-05-24 02:43:29.220 [INF] RPCS: [listchannels] fetched 0 channels from DB
fatal error: runtime: out of memory

runtime stack:
runtime.throw(0xec5fe8, 0x16)
    /home/bitcoin/go1.10.2/src/runtime/panic.go:616 +0x81
runtime.sysMap(0xf9f68a0000, 0x140000, 0xc4204c8300, 0x15b48d8)
    /home/bitcoin/go1.10.2/src/runtime/mem_linux.go:216 +0x20a
runtime.(*mheap).sysAlloc(0x159aec0, 0x140000, 0xc41ffd891f)
    /home/bitcoin/go1.10.2/src/runtime/malloc.go:470 +0xd4
runtime.(*mheap).grow(0x159aec0, 0x9c, 0x0)
    /home/bitcoin/go1.10.2/src/runtime/mheap.go:907 +0x60
runtime.(*mheap).allocSpanLocked(0x159aec0, 0x9c, 0x15b48e8, 0xc4204edc00)
    /home/bitcoin/go1.10.2/src/runtime/mheap.go:820 +0x301
runtime.(*mheap).alloc_m(0x159aec0, 0x9c, 0x101, 0x60)
    /home/bitcoin/go1.10.2/src/runtime/mheap.go:686 +0x118
runtime.(*mheap).alloc.func1()
    /home/bitcoin/go1.10.2/src/runtime/mheap.go:753 +0x4d
runtime.(*mheap).alloc(0x159aec0, 0x9c, 0xf90d000101, 0x100)
    /home/bitcoin/go1.10.2/src/runtime/mheap.go:752 +0x8a
runtime.largeAlloc(0x1371ac, 0xc4204c0100, 0x457101)
    /home/bitcoin/go1.10.2/src/runtime/malloc.go:826 +0x94
runtime.mallocgc.func1()
    /home/bitcoin/go1.10.2/src/runtime/malloc.go:721 +0x46
runtime.systemstack(0x0)
    /home/bitcoin/go1.10.2/src/runtime/asm_amd64.s:409 +0x79
runtime.mstart()
    /home/bitcoin/go1.10.2/src/runtime/proc.go:1175

goroutine 105 [running]:
runtime.systemstack_switch()
    /home/bitcoin/go1.10.2/src/runtime/asm_amd64.s:363 fp=0xc420659460 sp=0xc420659458 pc=0x458e70
runtime.mallocgc(0x1371ac, 0x0, 0x0, 0x6b2602)
    /home/bitcoin/go1.10.2/src/runtime/malloc.go:720 +0x8a2 fp=0xc420659500 sp=0xc420659460 pc=0x4124e2
runtime.slicebytetostring(0x0, 0xf9f6662001, 0x1371ac, 0x137fff, 0x0, 0x0)
    /home/bitcoin/go1.10.2/src/runtime/string.go:94 +0x90 fp=0xc420659530 sp=0xc420659500 pc=0x446b00
encoding/json.(*decodeState).literalStore(0xf9f57ef0e0, 0xf9f6662000, 0x1371ae, 0x138000, 0xceae80, 0xf9f57febd0, 0x16, 0xf010b01e00)
    /home/bitcoin/go1.10.2/src/encoding/json/decode.go:979 +0x1b77 fp=0xc4206598a0 sp=0xc420659530 pc=0x6afec7
encoding/json.(*decodeState).literal(0xf9f57ef0e0, 0xceae80, 0xf9f57febd0, 0x16)
    /home/bitcoin/go1.10.2/src/encoding/json/decode.go:842 +0xd5 fp=0xc4206598f8 sp=0xc4206598a0 pc=0x6ae0c5
encoding/json.(*decodeState).value(0xf9f57ef0e0, 0xceae80, 0xf9f57febd0, 0x16)
    /home/bitcoin/go1.10.2/src/encoding/json/decode.go:411 +0x30d fp=0xc420659978 sp=0xc4206598f8 pc=0x6ab04d
encoding/json.(*decodeState).unmarshal(0xf9f57ef0e0, 0xceae80, 0xf9f57febd0, 0x0, 0x0)
    /home/bitcoin/go1.10.2/src/encoding/json/decode.go:189 +0x1e7 fp=0xc4206599e8 sp=0xc420659978 pc=0x6aa517
encoding/json.Unmarshal(0xf9f6662000, 0x1371ae, 0x138000, 0xceae80, 0xf9f57febd0, 0xc420659ab0, 0x7a3e4f)
    /home/bitcoin/go1.10.2/src/encoding/json/decode.go:108 +0x148 fp=0xc420659a30 sp=0xc4206599e8 pc=0x6a9f28
github.com/lightningnetwork/lnd/vendor/github.com/roasbeef/btcd/rpcclient.FutureGetBlockResult.Receive(0xf9f622daa0, 0xf9cc3b7804, 0xf9f622daa0, 0x0)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/roasbeef/btcd/rpcclient/chain.go:69 +0xd0 fp=0xc420659ac0 sp=0xc420659a30 pc=0x7a3ba0
github.com/lightningnetwork/lnd/vendor/github.com/roasbeef/btcd/rpcclient.(*Client).GetBlock(0xc42039e500, 0xf9cc3b7804, 0x5c8443, 0xe0ef00, 0xf9dc8a12c0)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/roasbeef/btcd/rpcclient/chain.go:109 +0x43 fp=0xc420659af0 sp=0xc420659ac0 pc=0x7a3f13
github.com/lightningnetwork/lnd/vendor/github.com/roasbeef/btcwallet/chain.(*BitcoindClient).GetBlock(0xc4203b02a0, 0xf9cc3b7804, 0xf9cc3b7800, 0xf9dc8a12c0, 0x0)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/roasbeef/btcwallet/chain/bitcoind.go:151 +0x38 fp=0xc420659b28 sp=0xc420659af0 pc=0x82f0e8
github.com/lightningnetwork/lnd/vendor/github.com/roasbeef/btcwallet/chain.(*BitcoindClient).reorg(0xc4203b02a0, 0xc420659e88, 0xf9cc3b7800, 0x0, 0x0)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/roasbeef/btcwallet/chain/bitcoind.go:732 +0x286 fp=0xc420659c30 sp=0xc420659b28 pc=0x8336f6
github.com/lightningnetwork/lnd/vendor/github.com/roasbeef/btcwallet/chain.(*BitcoindClient).socketHandler(0xc4203b02a0, 0xc4205ec3c0)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/roasbeef/btcwallet/chain/bitcoind.go:687 +0x12ca fp=0xc420659fd0 sp=0xc420659c30 pc=0x8330aa
runtime.goexit()
    /home/bitcoin/go1.10.2/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420659fd8 sp=0xc420659fd0 pc=0x45ba01
created by github.com/lightningnetwork/lnd/vendor/github.com/roasbeef/btcwallet/chain.(*BitcoindClient).Start
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/roasbeef/btcwallet/chain/bitcoind.go:383 +0x22f

@Perlover
Copy link

Perlover commented Jun 11, 2018

Here free command now there:

$ free -g
	 total       used       free     shared    buffers     cached
Mem:           252        170         81          0          0        165
-/+ buffers/cache:          4        247
Swap:           29          3         26

So i see only one reason for out of memory - locked memory

@meshcollider meshcollider added the resource usage Software resource usage improvements/issues label Jun 15, 2018
@hpbock
Copy link
Author

hpbock commented Jun 17, 2018

@Roasbeef bitcoind is running locally as the same user as lnd.

@Roasbeef
Copy link
Member

Unable to reproduce myself, have had lnd running for weeks in many cases (restart often as I do dev on many of them). As posted above, if you use the profiling argument, then you can attach locally or remotely in order to obtain a heap dump. If you can obtain and monitor this, then you can see exactly where memory is being allocated.

@Perlover
Copy link

Perlover commented Jun 18, 2018

@Roasbeef , did you try to first time start of lnd after installing? I have same error always in many OSes (CentOS 6, Linux Mint 18.3) in first time after installing. When i run after first crash the lnd it continues work without problem of memory. May be this bug is related with first time graph building of LN.... And when i start first time the lnd i have bitcoind (same user) first time too. The lnd waits of synchronization of bitcoind and in this time i see always same problem (out of memory)

@Roasbeef
Copy link
Member

Roasbeef commented Jul 7, 2018

Closing this now as now that the new query sync features have been merged and a few goroutine leaks fixed across the codebase, the initial burst in memory usage upon initial connect is gone (if you connect to "modern" peers), and also the chain notifier block epoch goroutines will no longer leak.

@Roasbeef Roasbeef closed this as completed Jul 7, 2018
@Perlover
Copy link

Perlover commented Nov 14, 2018

Hello!

I occur this again when i installer new node
Fresh commit: 0.5.0-beta commit=v0.5-beta-321-gd4b042dc1946ece8b60d538ade8e912f035612fe
This occurs as alreay i had. It happens every time when first time run (bitcoind before already started but to be synced)
My ulimit now are:

$ ulimit -aH
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 516017
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 4096
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) unlimited
cpu time               (seconds, -t) unlimited
max user processes              (-u) 516017
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

free -g (GB):

$ free -g
	 total       used       free     shared    buffers     cached
Mem:           126        100         25          0          0         49
-/+ buffers/cache:         50         75
Swap:           48         37         11

and my logs:

2018-11-13 00:20:01.986 [INF] LNWL: The wallet has been unlocked without a time limit
2018-11-13 00:20:01.987 [INF] LTND: LightningWallet opened
2018-11-13 00:20:01.988 [INF] LNWL: Catching up block hashes to height 382320, this will take a while...
2018-11-13 00:20:02.080 [INF] HSWC: Restoring in-memory circuit state from disk
2018-11-13 00:20:02.109 [INF] LNWL: Caught up to height 20000
2018-11-13 00:20:02.119 [INF] HSWC: Payment circuits loaded: num_pending=0, num_open=0
2018-11-13 00:20:02.178 [INF] RPCS: RPC server listening on 127.0.0.1:10009
2018-11-13 00:20:02.178 [INF] RPCS: gRPC proxy started at 127.0.0.1:8080
2018-11-13 00:20:02.181 [INF] LTND: Waiting for chain backend to finish sync, start_height=158658
2018-11-13 00:20:53.305 [INF] LNWL: Caught up to height 30000
2018-11-13 00:21:48.882 [INF] LNWL: Caught up to height 40000
2018-11-13 00:22:30.899 [INF] LNWL: Caught up to height 50000
2018-11-13 00:23:13.420 [INF] LNWL: Caught up to height 60000
2018-11-13 00:24:08.964 [INF] LNWL: Caught up to height 70000
2018-11-13 00:24:56.138 [INF] LNWL: Caught up to height 80000
2018-11-13 00:25:56.528 [INF] LNWL: Caught up to height 90000
2018-11-13 00:26:47.551 [INF] LNWL: Caught up to height 100000
2018-11-13 00:27:54.924 [INF] LNWL: Caught up to height 110000
2018-11-13 00:28:46.262 [INF] LNWL: Caught up to height 120000
2018-11-13 00:30:03.538 [INF] LNWL: Caught up to height 130000
2018-11-13 00:31:05.716 [INF] LNWL: Caught up to height 140000
2018-11-13 00:32:06.849 [INF] LNWL: Caught up to height 150000
2018-11-13 00:33:04.778 [INF] LNWL: Caught up to height 160000
2018-11-13 00:34:25.398 [INF] LNWL: Caught up to height 170000
2018-11-13 00:35:24.150 [INF] LNWL: Caught up to height 180000
2018-11-13 00:36:17.449 [INF] LNWL: Caught up to height 190000
2018-11-13 00:36:57.089 [INF] LNWL: Caught up to height 200000
2018-11-13 00:37:48.820 [INF] LNWL: Caught up to height 210000
2018-11-13 00:38:46.401 [INF] LNWL: Caught up to height 220000
2018-11-13 00:39:41.588 [INF] LNWL: Caught up to height 230000
2018-11-13 00:40:38.459 [INF] LNWL: Caught up to height 240000
2018-11-13 00:41:39.648 [INF] LNWL: Caught up to height 250000
2018-11-13 00:42:39.232 [INF] LNWL: Caught up to height 260000
2018-11-13 00:43:59.788 [INF] LNWL: Caught up to height 270000
2018-11-13 00:45:45.665 [INF] LNWL: Caught up to height 280000
2018-11-13 00:49:09.084 [INF] LNWL: Caught up to height 290000
2018-11-13 00:53:12.098 [INF] LNWL: Caught up to height 300000
2018-11-13 00:57:14.006 [INF] LNWL: Caught up to height 310000
2018-11-13 01:01:23.725 [INF] LNWL: Caught up to height 320000
2018-11-13 01:06:29.928 [INF] LNWL: Caught up to height 330000
2018-11-13 01:12:35.749 [INF] LNWL: Caught up to height 340000
2018-11-13 01:19:27.081 [INF] LNWL: Caught up to height 350000
2018-11-13 01:27:18.884 [INF] LNWL: Caught up to height 360000
2018-11-13 01:42:13.552 [INF] LNWL: Caught up to height 370000
2018-11-13 01:54:07.928 [INF] LNWL: Caught up to height 380000
2018-11-13 01:56:43.462 [INF] LNWL: Done catching up block hashes
2018-11-13 01:56:43.945 [INF] LNWL: Started rescan from block 00000000000000000a243b20075a6eaf69e867b1d606b8dea8dad6cc222ecb2a (height 382326) for 0 addresses
2018-11-13 01:56:43.945 [INF] LNWL: Starting rescan from block 00000000000000000a243b20075a6eaf69e867b1d606b8dea8dad6cc222ecb2a
2018-11-13 01:56:43.969 [INF] LNWL: Rescan finished at 382326 (00000000000000000a243b20075a6eaf69e867b1d606b8dea8dad6cc222ecb2a)
2018-11-13 01:56:43.969 [INF] LNWL: Catching up block hashes to height 382326, this might take a while
2018-11-13 01:56:44.035 [INF] LNWL: Done catching up block hashes
2018-11-13 01:56:44.035 [INF] LNWL: Finished rescan for 0 addresses (synced to block 00000000000000000a243b20075a6eaf69e867b1d606b8dea8dad6cc222ecb2a, height 382326)
fatal error: runtime: out of memory

runtime stack:
runtime.throw(0xfc9cfb, 0x16)
    /home/bitcoin/go1.10.2/src/runtime/panic.go:616 +0x81
runtime.sysMap(0xda77000000, 0x1f0000, 0x412000, 0x17e8778)
    /home/bitcoin/go1.10.2/src/runtime/mem_linux.go:216 +0x20a
runtime.(*mheap).sysAlloc(0x17cec20, 0x1f0000, 0x786a8d)
    /home/bitcoin/go1.10.2/src/runtime/malloc.go:470 +0xd4
runtime.(*mheap).grow(0x17cec20, 0xf8, 0x0)
    /home/bitcoin/go1.10.2/src/runtime/mheap.go:907 +0x60
runtime.(*mheap).allocSpanLocked(0x17cec20, 0xf8, 0x17e8788, 0x1)
    /home/bitcoin/go1.10.2/src/runtime/mheap.go:820 +0x301
runtime.(*mheap).alloc_m(0x17cec20, 0xf8, 0x101, 0x7fe5e97faad8)
    /home/bitcoin/go1.10.2/src/runtime/mheap.go:686 +0x118
runtime.(*mheap).alloc.func1()
    /home/bitcoin/go1.10.2/src/runtime/mheap.go:753 +0x4d
runtime.(*mheap).alloc(0x17cec20, 0xf8, 0x7fe5e9000101, 0x43d4c5)
    /home/bitcoin/go1.10.2/src/runtime/mheap.go:752 +0x8a
runtime.largeAlloc(0x1ef0c4, 0x100, 0x1)
    /home/bitcoin/go1.10.2/src/runtime/malloc.go:826 +0x94
runtime.mallocgc.func1()
    /home/bitcoin/go1.10.2/src/runtime/malloc.go:721 +0x46
runtime.systemstack(0x0)
    /home/bitcoin/go1.10.2/src/runtime/asm_amd64.s:409 +0x79
runtime.mstart()
    /home/bitcoin/go1.10.2/src/runtime/proc.go:1175

goroutine 106 [running]:
runtime.systemstack_switch()
    /home/bitcoin/go1.10.2/src/runtime/asm_amd64.s:363 fp=0xc7fdbe5548 sp=0xc7fdbe5540 pc=0x459090
runtime.mallocgc(0x1ef0c4, 0x0, 0x0, 0x77bc62)
    /home/bitcoin/go1.10.2/src/runtime/malloc.go:720 +0x8a2 fp=0xc7fdbe55e8 sp=0xc7fdbe5548 pc=0x4124f2
runtime.slicebytetostring(0x0, 0xda76d18001, 0x1ef0c4, 0x1effff, 0x0, 0x0)
    /home/bitcoin/go1.10.2/src/runtime/string.go:94 +0x90 fp=0xc7fdbe5618 sp=0xc7fdbe55e8 pc=0x446d20
encoding/json.(*decodeState).literalStore(0xda76d16120, 0xda76d18000, 0x1ef0c6, 0x1f0000, 0xdbd2a0, 0xda741b3a00, 0x16, 0x0)
    /home/bitcoin/go1.10.2/src/encoding/json/decode.go:979 +0x1b77 fp=0xc7fdbe5988 sp=0xc7fdbe5618 pc=0x779527
encoding/json.(*decodeState).literal(0xda76d16120, 0xdbd2a0, 0xda741b3a00, 0x16)
    /home/bitcoin/go1.10.2/src/encoding/json/decode.go:842 +0xd5 fp=0xc7fdbe59e0 sp=0xc7fdbe5988 pc=0x777725
encoding/json.(*decodeState).value(0xda76d16120, 0xdbd2a0, 0xda741b3a00, 0x16)
    /home/bitcoin/go1.10.2/src/encoding/json/decode.go:411 +0x30d fp=0xc7fdbe5a60 sp=0xc7fdbe59e0 pc=0x7746ad
encoding/json.(*decodeState).unmarshal(0xda76d16120, 0xdbd2a0, 0xda741b3a00, 0x0, 0x0)
    /home/bitcoin/go1.10.2/src/encoding/json/decode.go:189 +0x1e7 fp=0xc7fdbe5ad0 sp=0xc7fdbe5a60 pc=0x773b77
encoding/json.Unmarshal(0xda76d18000, 0x1ef0c6, 0x1f0000, 0xdbd2a0, 0xda741b3a00, 0xc7fdbe5b98, 0x84ecff)
    /home/bitcoin/go1.10.2/src/encoding/json/decode.go:108 +0x148 fp=0xc7fdbe5b18 sp=0xc7fdbe5ad0 pc=0x773588
github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcd/rpcclient.FutureGetBlockResult.Receive(0xda76903980, 0xc7fdbe5c60, 0xda76903980, 0x30)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcd/rpcclient/chain.go:69 +0xd0 fp=0xc7fdbe5ba8 sp=0xc7fdbe5b18 pc=0x84ea50
github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcd/rpcclient.(*Client).GetBlock(0xc4201043c0, 0xc7fdbe5c60, 0x618fc2, 0xf00060, 0xda75d03c20)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcd/rpcclient/chain.go:109 +0x43 fp=0xc7fdbe5bd8 sp=0xc7fdbe5ba8 pc=0x84edc3
github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain.(*BitcoindClient).GetBlock(0xc4204fa900, 0xc7fdbe5c60, 0xda665bfe80, 0xda75d03c20, 0x0)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain/bitcoind_client.go:148 +0x3d fp=0xc7fdbe5c10 sp=0xc7fdbe5bd8 pc=0x8c7b6d
github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain.(*BitcoindClient).reorg(0xc4204fa900, 0xc80b1371000268d7, 0x454155aaecc8e0b3, 0xb8f3d4bc6bfbc332, 0x30b4ee10b87, 0x0, 0x0, 0xec67ed994, 0x17c7660, 0xc420394000, ...)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain/bitcoind_client.go:771 +0x32f fp=0xc7fdbe5d70 sp=0xc7fdbe5c10 pc=0x8cbe4f
github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain.(*BitcoindClient).ntfnHandler(0xc4204fa900)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain/bitcoind_client.go:593 +0x57d fp=0xc7fdbe5fd8 sp=0xc7fdbe5d70 pc=0x8caa6d
runtime.goexit()
    /home/bitcoin/go1.10.2/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc7fdbe5fe0 sp=0xc7fdbe5fd8 pc=0x45bc21
created by github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain.(*BitcoindClient).Start
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain/bitcoind_client.go:433 +0x35c

goroutine 1 [sleep]:
time.Sleep(0x3b9aca00)
    /home/bitcoin/go1.10.2/src/runtime/time.go:102 +0x166
main.lndMain(0x0, 0x0)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/lnd.go:403 +0x1806
main.main()
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/lnd.go:449 +0x26

goroutine 58 [select, 768 minutes]:
github.com/lightningnetwork/lnd/signal.mainInterruptHandler()
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/signal/signal.go:62 +0x108
created by github.com/lightningnetwork/lnd/signal.init.1
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/signal/signal.go:30 +0x81

goroutine 68 [syscall, 768 minutes]:
os/signal.signal_recv(0x0)
    /home/bitcoin/go1.10.2/src/runtime/sigqueue.go:139 +0xa6
os/signal.loop()
    /home/bitcoin/go1.10.2/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
    /home/bitcoin/go1.10.2/src/os/signal/signal_unix.go:28 +0x41

goroutine 69 [select, 768 minutes, locked to thread]:
runtime.gopark(0x112d188, 0x0, 0xfb9058, 0x6, 0x18, 0x1)
    /home/bitcoin/go1.10.2/src/runtime/proc.go:291 +0x11a
runtime.selectgo(0xc42049df50, 0xc42003c780)
    /home/bitcoin/go1.10.2/src/runtime/select.go:392 +0xe50
runtime.ensureSigM.func1()
    /home/bitcoin/go1.10.2/src/runtime/signal_unix.go:549 +0x1f4
runtime.goexit()
    /home/bitcoin/go1.10.2/src/runtime/asm_amd64.s:2361 +0x1

goroutine 72 [select, 671 minutes]:
io.(*pipe).Read(0xc42050aa00, 0xc4202be000, 0x1000, 0x1000, 0x1, 0x1, 0x1)
    /home/bitcoin/go1.10.2/src/io/pipe.go:50 +0x115
io.(*PipeReader).Read(0xc420510248, 0xc4202be000, 0x1000, 0x1000, 0xc4202c6e00, 0x4cb6ae, 0xc42050a960)
    /home/bitcoin/go1.10.2/src/io/pipe.go:127 +0x4c
bufio.(*Reader).fill(0xc4202c6f50)
    /home/bitcoin/go1.10.2/src/bufio/bufio.go:100 +0x11e
bufio.(*Reader).ReadSlice(0xc4202c6f50, 0xa, 0x1, 0x0, 0x0, 0x1, 0x0)
    /home/bitcoin/go1.10.2/src/bufio/bufio.go:341 +0x2c
bufio.(*Reader).ReadLine(0xc4202c6f50, 0x16d42c0, 0x1, 0x1, 0x1, 0x0, 0x0)
    /home/bitcoin/go1.10.2/src/bufio/bufio.go:370 +0x34
github.com/lightningnetwork/lnd/vendor/github.com/jrick/logrotate/rotator.(*Rotator).Run(0xc42050a9b0, 0x11cba60, 0xc420510248, 0xc42050a9b0, 0x0)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/jrick/logrotate/rotator/rotator.go:100 +0xb8
created by main.initLogRotator
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/log.go:127 +0x328

goroutine 31 [select, 194 minutes]:
github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain.(*BitcoindConn).txEventHandler(0xc420594070, 0xc420558bd0)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain/bitcoind_conn.go:291 +0x627
created by github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain.(*BitcoindConn).Start
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain/bitcoind_conn.go:140 +0x378

goroutine 105 [select, 671 minutes]:
github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain.(*BitcoindClient).rescanHandler(0xc4204fa900)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain/bitcoind_client.go:472 +0x14e
created by github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain.(*BitcoindClient).Start
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain/bitcoind_client.go:432 +0x337

goroutine 24 [select]:
github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcd/rpcclient.(*Client).sendPostHandler(0xc4201043c0)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcd/rpcclient/infrastructure.go:736 +0x105
created by github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcd/rpcclient.(*Client).start
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcd/rpcclient/infrastructure.go:1029 +0x116

goroutine 244 [IO wait, 768 minutes]:
internal/poll.runtime_pollWait(0x7fe6ac436d60, 0x72, 0x0)
    /home/bitcoin/go1.10.2/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc420512098, 0x72, 0xc420322100, 0x0, 0x0)
    /home/bitcoin/go1.10.2/src/internal/poll/fd_poll_runtime.go:85 +0x9b
internal/poll.(*pollDesc).waitRead(0xc420512098, 0xffffffffffffff00, 0x0, 0x0)
    /home/bitcoin/go1.10.2/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Accept(0xc420512080, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/bitcoin/go1.10.2/src/internal/poll/fd_unix.go:372 +0x1a8
net.(*netFD).accept(0xc420512080, 0x0, 0x0, 0x0)
    /home/bitcoin/go1.10.2/src/net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc43071c138, 0x0, 0x0, 0x0)
    /home/bitcoin/go1.10.2/src/net/tcpsock_posix.go:136 +0x2e
net.(*TCPListener).Accept(0xc43071c138, 0x0, 0x0, 0x0, 0x0)
    /home/bitcoin/go1.10.2/src/net/tcpsock.go:259 +0x49
github.com/lightningnetwork/lnd/brontide.(*Listener).listen(0xc42032f110)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/brontide/listener.go:79 +0xf4
created by github.com/lightningnetwork/lnd/brontide.NewListener
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/brontide/listener.go:61 +0x1c6

goroutine 594 [chan receive, 768 minutes]:
github.com/lightningnetwork/lnd/lnrpc.RegisterLightningHandlerFromEndpoint.func1.1(0x11d6420, 0xc420515140, 0xc4379dc000, 0xc4200364d0, 0xf)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/lnrpc/rpc.pb.gw.go:864 +0x4c
created by github.com/lightningnetwork/lnd/lnrpc.RegisterLightningHandlerFromEndpoint.func1
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/lnrpc/rpc.pb.gw.go:863 +0x19b

goroutine 99 [select, 768 minutes]:
github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcd/rpcclient.(*Client).sendPostHandler(0xc420246140)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcd/rpcclient/infrastructure.go:736 +0x105
created by github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcd/rpcclient.(*Client).start
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcd/rpcclient/infrastructure.go:1029 +0x116

goroutine 42 [select, 768 minutes]:
github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/wallet.(*Wallet).txCreator(0xc420120000)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/wallet/wallet.go:1100 +0x12a
created by github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/wallet.(*Wallet).Start
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/wallet/wallet.go:142 +0xd8

goroutine 43 [select, 768 minutes]:
github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/wallet.(*Wallet).walletLocker(0xc420120000)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/wallet/wallet.go:1173 +0x382
created by github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/wallet.(*Wallet).Start
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/wallet/wallet.go:143 +0xfa

goroutine 87 [select, 671 minutes]:
github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain.(*ConcurrentQueue).Start.func1(0xc42022d760)
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain/queue.go:55 +0x324
created by github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain.(*ConcurrentQueue).Start
    /home/bitcoin/go/src/github.com/lightningnetwork/lnd/vendor/github.com/btcsuite/btcwallet/chain/queue.go:47 +0x3f

And so on... Here is not full log about creash. If you need please let me know

@Roasbeef
Copy link
Member

2018-11-13 01:56:44.035 [INF] LNWL: Finished rescan for 0 addresses (synced to block 00000000000000000a243b20075a6eaf69e867b1d606b8dea8dad6cc222ecb2a, height 382326)

What backend were you using? Were you syncing it (if a full node) at the same time you synced lnd?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resource usage Software resource usage improvements/issues
Projects
None yet
Development

No branches or pull requests

6 participants