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

Possible memory leak from go-rapidsnark #312

Closed
syntrust opened this issue Aug 5, 2024 · 1 comment
Closed

Possible memory leak from go-rapidsnark #312

syntrust opened this issue Aug 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@syntrust
Copy link
Collaborator

syntrust commented Aug 5, 2024

System information

v0.1.15-808d9af9-1722415992

AX101

Expected behaviour

Actual behaviour

RES(Resident Memory Usage)increases from 900MB up to 2.3GB after 30 hours and about 20 mining submissions.

Steps to reproduce the behaviour

Run es-node using --miner.zk-prover-impl 2

Backtrace

Using pprof shows the memory generated by wazero.NewCircom2WZWitnessCalculator (used by go-rapidsnark prover) is increasing.

Showing top 10 nodes out of 44
      flat  flat%   sum%        cum   cum%
     520MB 70.72% 70.72%      520MB 70.72%  github.com/syndtr/goleveldb/leveldb/memdb.New
  169.34MB 23.03% 93.75%   169.34MB 23.03%  github.com/tetratelabs/wazero/internal/wasm/binary.decodeDataSegment
   27.98MB  3.81% 97.56%    27.98MB  3.81%  github.com/tetratelabs/wazero/internal/wasm/binary.decodeCode
    0.50MB 0.068% 97.63%   169.84MB 23.10%  github.com/tetratelabs/wazero/internal/wasm/binary.decodeDataSection
         0     0% 97.63%      512MB 69.64%  github.com/ethereum/go-ethereum/core/rawdb.NewLevelDBDatabase
         0     0% 97.63%      512MB 69.64%  github.com/ethereum/go-ethereum/core/rawdb.Open
         0     0% 97.63%      512MB 69.64%  github.com/ethereum/go-ethereum/core/rawdb.openKeyValueDatabase
         0     0% 97.63%      512MB 69.64%  github.com/ethereum/go-ethereum/ethdb/leveldb.New
         0     0% 97.63%      512MB 69.64%  github.com/ethereum/go-ethereum/ethdb/leveldb.NewCustom
         0     0% 97.63%        4MB  0.54%  github.com/ethereum/go-ethereum/p2p/enode.OpenDB
@syntrust syntrust added the bug Something isn't working label Aug 5, 2024
@syntrust
Copy link
Collaborator Author

Fixed by #317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant