nym icon indicating copy to clipboard operation
nym copied to clipboard

Add peer-controller timeouts and lock tweaks

Open tommyv1987 opened this issue 1 month ago • 1 comments

Ad a 5 s timeout around every PeerManager call into the WireGuard peer controller (recv_with_timeout). Instead of blocking forever when the controller is stuck after suspend, the authenticator now surfaces PeerInteractionTimeout and keeps processing other clients.


This change is Reviewable

tommyv1987 avatar Nov 21 '25 08:11 tommyv1987

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
nym-explorer-v2 Error Error Dec 11, 2025 1:54pm
2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
docs-nextra Ignored Ignored Preview Dec 11, 2025 1:54pm
nym-node-status Ignored Ignored Preview Dec 11, 2025 1:54pm

vercel[bot] avatar Nov 21 '25 09:11 vercel[bot]

Instead of blocking forever when the controller is stuck after suspend, the authenticator now surfaces PeerInteractionTimeout and keeps processing other clients.

What suspend are you referring to exactly? I'm curious about the logs that caused this bug, could you reference them in this PR as well please?

Also, if the controller is stuck for some reason, there's not really much reason to process other clients on the mixnet listener, because there won't be any working controller that can process the requests. In that case, we should probably just stop the whole authenticator, because otherwise we would just get continuous error logs.

Added comments in the code explaining this. We don't have specific log snippets in this PR, but I'll try to source them again from testing.

Stopping the authenticator - Agreed. This PR adds the timeout to prevent blocking. Failure tracking and shutdown on repeated failures.

A follow up PR is probably needed to address the shutdown of the authenticator. A good thing though is that the timeout logs warnings so operators can see the issue.

tommyv1987 avatar Dec 11 '25 14:12 tommyv1987