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

Endless failed request polling loop #163

Open
Gudahtt opened this issue Jul 15, 2023 · 4 comments
Open

Endless failed request polling loop #163

Gudahtt opened this issue Jul 15, 2023 · 4 comments

Comments

@Gudahtt
Copy link
Member

Gudahtt commented Jul 15, 2023

The polling block tracker has been observed being stuck in an endless loop (e.g. MetaMask/metamask-extension#17040).

I was able to reproduce this scenario by using MetaMask extension to switch to a network that will fail to respond to requests. This results in an endless loop of failed requests, even after switching away (i.e. even after there are no more listeners). In the debugger I confirmed that the only active listeners were internal to the block tracker itself (specifically this listener).

@Gudahtt Gudahtt added the bug label Jul 15, 2023
@Gudahtt Gudahtt changed the title Prevent endless polling loop Endless failed request polling loop Jul 15, 2023
@mcmire mcmire self-assigned this Jul 17, 2023
@mcmire mcmire closed this as completed Aug 1, 2023
@mcmire mcmire reopened this Aug 1, 2023
@mcmire mcmire assigned Gudahtt and unassigned mcmire Aug 14, 2023
@Gudahtt
Copy link
Member Author

Gudahtt commented Jun 20, 2024

I was still able to reproduce this bug on v9.0.3

@mcmire
Copy link
Contributor

mcmire commented Jun 26, 2024

In the PR that is linked to in the timeline above and was closed, I made this comment:

@Gudahtt and I had a discussion and we feel like we can solve this a different way that doesn't involve listening to latest in any form.

@Gudahtt Do you still think following that route would be a proper fix here?

@Gudahtt
Copy link
Member Author

Gudahtt commented Jun 26, 2024

Unfortunately I don't recall the details of that solution

@mcmire
Copy link
Contributor

mcmire commented Jul 18, 2024

For clarity, a solution here would be to figure out a way to have the block tracker ignore internally-added listeners. More details here: https://consensys.slack.com/archives/C06FXU326RL/p1718910083555919?thread_ts=1718130645.943409&cid=C06FXU326RL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants