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

Memory leak in chainbase_node_allocator. #1046

Closed
greg7mdp opened this issue Nov 26, 2024 · 1 comment
Closed

Memory leak in chainbase_node_allocator. #1046

greg7mdp opened this issue Nov 26, 2024 · 1 comment
Labels

Comments

@greg7mdp
Copy link
Contributor

Unless I'm mistaken, we have a memory leak in chainbase_node_allocator.

This allocates groups of items from the shared segment_manager, and free items are managed in a free list. Items are added to the freelist when either:

  • of block of them (64) is allocated from the segment manager
  • or some are freed (deallocate called)

The issue is that when nodeos is closed (via Ctrl-c for example), the segment allocations in the shared segment_manager are preserved, but the freelist is lost. So the memory for whatever free items we had in the segment_manager when closing nodeos is now lost, until we restart fresh from a snapshot.

@enf-ci-bot enf-ci-bot moved this to Todo in Team Backlog Nov 26, 2024
@greg7mdp greg7mdp added bug The product is not working as was intended. state-change Change to Chainbase and/or fork database on-disk state. Updates require snapshots. labels Nov 26, 2024
@greg7mdp
Copy link
Contributor Author

greg7mdp commented Dec 2, 2024

I was wrong. The chainbase_node_allocator is preserved in instances of shared_multi_index_container, so the _free_list offset_ptr is preserved as well. Closing the issue.

@greg7mdp greg7mdp closed this as completed Dec 2, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Team Backlog Dec 2, 2024
@greg7mdp greg7mdp removed bug The product is not working as was intended. state-change Change to Chainbase and/or fork database on-disk state. Updates require snapshots. labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants