scroll-tech / go-ethereum

Scroll's fork of the official Go implementation of the Ethereum protocol
GNU Lesser General Public License v3.0
494 stars 276 forks source link

Possible memory leak when running witch --gcmode full #917

Open 1aBcD1234aBcD1 opened 3 months ago

1aBcD1234aBcD1 commented 3 months ago

System information

Geth version: scroll-v5.5.0 OS & Version: Ubuntu with docker version 25.0.2, build 29cf629

Expected behaviour

Actual behaviour

I have been trying to setup a full node instead and an archive node. When using the --gcmode full, geth service crashes since it consume all the RAM of the server.

Seems memory leak is in function func (l *ZktrieDatabase) Put(k, v []byte) error at trie/zk_trie_database.go line 39.

Steps to reproduce the behaviour

Backtrace

You can check the heap and allocs from the following files heap.txt allocs.txt

Thegaram commented 3 months ago

Thank you for reporting this. Currently we only support --gcmode archive and full mode is known to not work, but we will work on adding pruning in the near future.

1aBcD1234aBcD1 commented 3 months ago

Alright, thanks!