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

single_block_lookups leak #5694

Open
dapplion opened this issue May 2, 2024 · 1 comment
Open

single_block_lookups leak #5694

dapplion opened this issue May 2, 2024 · 1 comment
Labels
bug Something isn't working v5.2.0 Q2 2024

Comments

@dapplion
Copy link
Collaborator

dapplion commented May 2, 2024

Description

Looking at the metric sync_single_block_lookups on our nodes, they have 100k ~ 150k active lookups. The metric is properly implemented so this is a leak. Each lookup is quite small some hundreds of bytes so the leak is very slow and small overall.

A possible explanation is:

  • Create a new lookup for block A
  • Block A is already in the da_checker
  • lookup skips sending a block request because it's already in the da_checker
  • No need event for lookup is received, so it is never removed

Version

stable

Steps to resolve

Fixed with

@michaelsproul michaelsproul added bug Something isn't working v5.2.0 Q2 2024 labels May 3, 2024
@pawanjay176
Copy link
Member

Seems like the leak is happening atleast partly due to #5680 (comment)

RPCError::Disconnect not propagating up to sync could lead to awaiting_parent.is_some() lookups never getting resolved which means that they never get removed from the lookups map.

I did some testing with propagating the disconnects to sync. Doing this seems to result in lookups getting removed and sync_single_block_lookups metric getting back to 0 once the node is synced.
Not propagating the disconnects (like its happening currently in cut-5.2.0) is consistently increasing the lookup size on local testing.

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

No branches or pull requests

3 participants