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

run loop can busy-loop when the send queue blocks for a long period #3567

Closed
marten-seemann opened this issue Oct 3, 2022 · 1 comment · Fixed by #3570
Closed

run loop can busy-loop when the send queue blocks for a long period #3567

marten-seemann opened this issue Oct 3, 2022 · 1 comment · Fixed by #3570
Labels

Comments

@marten-seemann
Copy link
Member

Apparently the Accelerated DHT client makes the send queue block for extended periods of time, at least on OSX: ipfs/kubo#9309.

This leads to busy-looping when the ACK-alarm expires, but we fail to send out the ACK packet.

@marten-seemann
Copy link
Member Author

We probably need a proper re-design of our connection timer.

Requirements:

  • the timer is always armed, there’s never a situation where it is not armed (at the least it’s armed for the idle timeout)
  • there are situation when the timer fires, but no action can be taken
    • we might need to send an ACK, but the send queue is blocked, or we can’t send any more packets because we’re already tracking the maximum number of packets
  • it might be armed again and again to the same (sentinel) value, for the pacing timer. This could be changed to arm to a different value (time.Now), at the potential cost of another call of time.Now

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

Successfully merging a pull request may close this issue.

1 participant