Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix memory leak (24GB per second) when rodeos starts with --filter-wa… #10519

Merged
merged 1 commit into from
Jul 15, 2021

Conversation

linhuang-blockone
Copy link
Contributor

…sm and is not connected to nodeos

Change Description

When rodeos' ship_client fails to connect to nodeos (like when nodeos is not running),. ship_client calls cloner_session's close() with retry set to true. This triggers cloner_plugin to recreate cloner_session every second until a connection is established. cloner_session creates rodeos_filter object if rodeos starts with --filter-wasm option. Although destructor of rodeos_filter is called before recreation, its memory is not completely freed. The root cause is the filter_state in rodeos_filter has a member eosio::vm::wasm_allocator wa. wa allocates VM memory when initiated. This memory must be released by explicit free().

The same problem in thread_state is fixed by this PR as well.

Change Type

Select ONE:

  • Documentation
  • Stability bug fix
  • Other
  • Other - special case

Testing Changes

Select ANY that apply:

  • New Tests
  • Existing Tests
  • Test Framework
  • CI System
  • Other

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

@linhuang-blockone linhuang-blockone merged commit 3c822b9 into develop-boxed Jul 15, 2021
@linhuang-blockone linhuang-blockone deleted the fix_filter_memory_leak branch July 15, 2021 17:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants