Go-ethereum: Ethereum Error "Fatal Error out of Memory"

Created on 20 Jun 2017  Â·  9Comments  Â·  Source: ethereum/go-ethereum

Expected Behavior-
For Geth to Sync to Ethereum Network.

What Actually Happened- (Full Stack In Attached Text Doc)
Blockchain Sync Error.txt
runtime: out of memory: cannot allocate 268435456-byte block (905314304 in use)
fatal error: out of memory
runtime stack:
runtime.throw(0xc6c852, 0xd)
C:/go/src/runtime/panic.go:596 +0x7c
runtime.largeAlloc(0x10000000, 0x1e50001, 0x44c033)
C:/go/src/runtime/malloc.go:809 +0xdb
runtime.mallocgc.func1()
C:/go/src/runtime/malloc.go:702 +0x31
runtime.systemstack(0x12126000)
C:/go/src/runtime/asm_386.s:337 +0x5e
runtime.mstart()
C:/go/src/runtime/proc.go:1132

Additional Information-

PC Rig Specs:
CPU: i5-6600k @ 3.5 GHz
RAM: 16GB-DDR4-2133 MHz-2x8GB
Storage: Samsung 256GB M.2 SSD + 2TB Segate SSHD
Motherboard: Gigabyte Z170-XP-SLI
GPU: 2x Palit GeForce GTX 970-Core clock = 1050 MHz-Memory clock = 3505
No items in this list are overclocked.

Command/s Used: geth --rpc and same error for geth --rpc --fast --cache=1024

Versions of Software:
Win-10
geth-windows-386-1.6.5-cf87713d
cpp-ethereum-windows-v1.2.8

Most helpful comment

Can't run geth --rpc or geth --rpc --fast for more than like 10-15 minutes without this shitting the bed.
Windows 10 x64, 16GB RAM, i5-6600K @3.5GHz

instance=Geth/v1.6.6-stable-10a45cb5/windows-386/go1.8.3

runtime: out of memory: cannot allocate 11993088-byte block (1068302336 in use)
fatal error: out of memory

runtime stack:
runtime.throw(0xc71f3c, 0xd)
        C:/go/src/runtime/panic.go:596 +0x7c
runtime.largeAlloc(0xb6db41, 0x1c0001, 0x2)
        C:/go/src/runtime/malloc.go:809 +0xdb
runtime.mallocgc.func1()
        C:/go/src/runtime/malloc.go:702 +0x31
runtime.systemstack(0x121a5500)
        C:/go/src/runtime/asm_386.s:337 +0x5e
runtime.mstart()
        C:/go/src/runtime/proc.go:1132

goroutine 6677 [running]:
runtime.systemstack_switch()

All 9 comments

Same issue here using geth --fast on a machine with 32GB.

geth --fast
6/26. New download of Ethereum from the website and made sure to clear any previous chain DBs.
Windows 10 64bit
32GB RAM
i7-7700k
Samsung 850 Evo SSD 512GB
GTX 1080

runtime: out of memory: cannot allocate 33554432-byte block (1055326208 in use)
fatal error: out of memory

runtime stack:
runtime.throw(0xc6c852, 0xd)
        C:/go/src/runtime/panic.go:596 +0x7c
runtime.largeAlloc(0x2000000, 0x44ca01, 0x14460600)
        C:/go/src/runtime/malloc.go:809 +0xdb
runtime.mallocgc.func1()
        C:/go/src/runtime/malloc.go:702 +0x31
runtime.systemstack(0x1213aa80)
        C:/go/src/runtime/asm_386.s:337 +0x5e
runtime.mstart()
        C:/go/src/runtime/proc.go:1132

Can't run geth --rpc or geth --rpc --fast for more than like 10-15 minutes without this shitting the bed.
Windows 10 x64, 16GB RAM, i5-6600K @3.5GHz

instance=Geth/v1.6.6-stable-10a45cb5/windows-386/go1.8.3

runtime: out of memory: cannot allocate 11993088-byte block (1068302336 in use)
fatal error: out of memory

runtime stack:
runtime.throw(0xc71f3c, 0xd)
        C:/go/src/runtime/panic.go:596 +0x7c
runtime.largeAlloc(0xb6db41, 0x1c0001, 0x2)
        C:/go/src/runtime/malloc.go:809 +0xdb
runtime.mallocgc.func1()
        C:/go/src/runtime/malloc.go:702 +0x31
runtime.systemstack(0x121a5500)
        C:/go/src/runtime/asm_386.s:337 +0x5e
runtime.mstart()
        C:/go/src/runtime/proc.go:1132

goroutine 6677 [running]:
runtime.systemstack_switch()

Same problem on Linux.

same here with ubuntu 16 box on AWS.
even m4.xlarge instance is crashed

Most of these reports are pretty old (Jun 30 / geth 1.6.6).
@manipulator01 could you provide some logs and some more info (geth version and exact command used when starting it)

Yep same probem here

>.\geth.exe --syncmode fast

WARN [12-19|17:55:22] No etherbase set and no accounts found as default
INFO [12-19|17:55:22] Starting peer-to-peer node               instance=Geth/v1.7.2-stable-1db4ecdc/windows-386/go1.9
INFO [12-19|17:55:22] Allocated cache and file handles         database=C:\\Users\\remyb\\AppData\\Roaming\\Ethereum\\geth\\chaindata cache=128 handles=1024
INFO [12-19|17:55:23] Initialised chain configuration          config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Engine: ethash}"
INFO [12-19|17:55:23] Disk storage enabled for ethash caches   dir=C:\\Users\\remyb\\AppData\\Roaming\\Ethereum\\geth\\ethash count=3
INFO [12-19|17:55:23] Disk storage enabled for ethash DAGs     dir=C:\\Users\\remyb\\AppData\\Ethash                          count=2
INFO [12-19|17:55:23] Initialising Ethereum protocol           versions="[63 62]" network=1
INFO [12-19|17:55:23] Loaded most recent local header          number=4117482 hash=ae1478…007a99 td=623512962200573555163
INFO [12-19|17:55:23] Loaded most recent local full block      number=0       hash=d4e567…cb8fa3 td=17179869184
INFO [12-19|17:55:23] Loaded most recent local fast block      number=4080397 hash=2e9e97…21a38d td=569500819249911299483
INFO [12-19|17:55:23] Upgrading chain index                    type=bloombits percentage=98
INFO [12-19|17:55:23] Loaded local transaction journal         transactions=0 dropped=0
INFO [12-19|17:55:23] Regenerated local transaction journal    transactions=0 accounts=0
INFO [12-19|17:55:23] Starting P2P networking
INFO [12-19|17:55:26] UDP listener up                          self=enode://fecd334b98752ca94729188ccf7f88d416eb01437c8e23e5d63400d6fe9b06b8a425fbc1d4171ddfbd0568c00bc822e677bed5157ff7bbecbd8cb72215e5c7bc@[::]:30303
INFO [12-19|17:55:26] RLPx listener up                         self=enode://fecd334b98752ca94729188ccf7f88d416eb01437c8e23e5d63400d6fe9b06b8a425fbc1d4171ddfbd0568c00bc822e677bed5157ff7bbecbd8cb72215e5c7bc@[::]:30303
INFO [12-19|17:55:26] IPC endpoint opened: \\.\pipe\geth.ipc
INFO [12-19|17:55:28] Finished upgrading chain index           type=bloombits
INFO [12-19|17:55:46] Block synchronisation started
INFO [12-19|17:56:19] Imported new block headers               count=0 elapsed=9.525ms number=4080589 hash=ee57f1…4aa12b ignored=192

Ok so it started right and then after a few minutes... boom

INFO [12-19|18:12:03] Imported new state entries               count=875  elapsed=1.503ms   processed=166031 pending=7950  retry=0   duplicate=97 unexpected=544
INFO [12-19|18:12:07] Imported new state entries               count=983  elapsed=1.002ms   processed=167014 pending=9508  retry=0   duplicate=97 unexpected=544
INFO [12-19|18:12:07] Imported new block receipts              count=314  elapsed=546.940ms bytes=18638708 number=4119285 hash=fa0c8d…f59a0b ignored=0
INFO [12-19|18:12:14] Imported new block headers               count=256  elapsed=54.143ms  number=4155128 hash=99b621…8ac9e2 ignored=0
INFO [12-19|18:13:27] Imported new block headers               count=2048 elapsed=483.575ms number=4157176 hash=e9429f…7bb0d9 ignored=0
runtime: out of memory: cannot allocate 33554432-byte block (1559838720 in use)
fatal error: out of memory

runtime stack:
runtime.throw(0xcd7cf3, 0xd)
        C:/go/src/runtime/panic.go:605 +0x7c
runtime.largeAlloc(0x2000000, 0x45f0101, 0x44f559)
        C:/go/src/runtime/malloc.go:829 +0xe0
runtime.mallocgc.func1()
        C:/go/src/runtime/malloc.go:722 +0x39
runtime.systemstack(0x149de000)
        C:/go/src/runtime/asm_386.s:393 +0x5e
runtime.mstart()
        C:/go/src/runtime/proc.go:1125

goroutine 7197 [running]:
runtime.systemstack_switch()
        C:/go/src/runtime/asm_386.s:347 fp=0x1842f448 sp=0x1842f444 pc=0x451a50
runtime.mallocgc(0x2000000, 0xbcde60, 0x1, 0x7342ee00)
        C:/go/src/runtime/malloc.go:721 +0x67e fp=0x1842f49c sp=0x1842f448 pc=0x41015e
runtime.makeslice(0xbcde60, 0x0, 0x2000000, 0x4734000, 0x78094000, 0x1bc29301)
        C:/go/src/runtime/slice.go:54 +0x59 fp=0x1842f4b0 sp=0x1842f49c pc=0x43e189
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/memdb.New(0x12cf2a0, 0x14b47728, 0x2000000, 0x0)
        C:/gopath/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/memdb/memdb.go:470 +0xd4 fp=0x1842f4fc sp=0x1842f4b0 pc=0x6d65b4
github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.(*DB).mpoolGet(0x14b3e600, 0x2e78b, 0x0)

And pages and pages of stacklog

Reproducable AF but at least the synchronisation state is increasing from run to run... I will do a manual watchdog. (of course there is plenty of memory on my device.

Just version informations:

PS C:\Users\remyb\AppData\Roaming\Ethereum Wallet\binaries\Geth\unpacked> .\geth.exe version
Geth
Version: 1.7.2-stable
Git Commit: 1db4ecdc0b9e828ff65777fb466fc7c1d04e0de9
Architecture: 386
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.9
Operating System: windows
GOPATH=
GOROOT=c:\go

Oh wait. 1.7.2-stable -- that's over a year old. Original reported had geth-windows-386-1.6.5-cf87713d -- which is even older. Closing, feel free to reopen if it happens on more recent versions.

well, you should always make sure that you have at least 8gb of ram to sync with a fast sync, more with archive. consider adding paging/virtual memory although, it may make some peers drop you since you are too slow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

keitaj picture keitaj  Â·  3Comments

vogelito picture vogelito  Â·  3Comments

VoR0220 picture VoR0220  Â·  3Comments

AdrianScott picture AdrianScott  Â·  3Comments

tymat picture tymat  Â·  3Comments