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

eth: fix deadlock casued by multiple subscriptions/requests #457

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

nick1udwig
Copy link
Contributor

Problem

Our default eth provider, providerfren.os, frequently hangs, requiring restart.

Solution

Fix deadlock by minimizing the amount of time locks are acquired for. In particular move everything that communicates with a timeout outside of a lock.

Testing

To test I:

  1. Set up an eth provider using this binary or master
  2. Modified kns_indexer to infinitely loop sending get_logs(), by commenting out
  3. Run one node using looping kns indexer, pointed at eth provider
  4. Start a second one & stop if it successfully connects, repeating until either witness deadlock or get bored

Using that protocol, I get a deadlock immediately on master, whereas I have not witnessed a deadlock on this branch.

Docs Update

None

Notes

None

@nick1udwig nick1udwig requested a review from dr-frmr July 19, 2024 00:46
Copy link
Member

@dr-frmr dr-frmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing

@dr-frmr dr-frmr merged commit c591ec5 into v0.8.6 Jul 19, 2024
@dr-frmr dr-frmr deleted the hf/eth-fix-deadlock branch July 19, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants