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

leaf node eviction of old connections seems racy (for mis configured setups) #1730

Closed
matthiashanel opened this issue Nov 20, 2020 · 0 comments · Fixed by #1738
Closed

leaf node eviction of old connections seems racy (for mis configured setups) #1730

matthiashanel opened this issue Nov 20, 2020 · 0 comments · Fixed by #1738
Assignees

Comments

@matthiashanel
Copy link
Contributor

matthiashanel commented Nov 20, 2020

Defect

Leaf node configuration where server A accepts incomming leaf nodes connections on $G.
Server B has two remotes to server A. This is a misconfiguration but:
Server A only sometimes disconnects server B. (there is a race. initial startup usually shows no issue)
Server B is configured, but none of it's output even hints at an issue.

The picture shows the config and server A and B not having an issue. That's the race condition in A.

Screen Shot 2020-11-20 at 12 39 52 PM

kozlovic added a commit that referenced this issue Nov 23, 2020
There was a test to prevent an errorneous loop detection when a
remote would reconnect (due to a stale connection) while the accepting
side did not detect the bad connection yet.

However, this test was racy because the test was done prior to add
the connections to the map.

In the case of a misconfiguration where the remote creates 2 different
remote connections that end-up binding to the same account in the
accepting side, then it was possible that this would not be detected.
And when it was, the remote side would be unaware since the disconnect/
reconnect attempts would not show up if not running in debug mode.

This change makes sure that the detection is no longer racy and returns
an error to the remote so at least the log/console of the remote will
show the "duplicate connection" error messages.

Resolves #1730

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@bruth bruth removed the 🐞 bug label Aug 18, 2023
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 a pull request may close this issue.

3 participants