-
Notifications
You must be signed in to change notification settings - Fork 153
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
Duplicate messages matrix-side (due to distributed IRCds) #27
Comments
The permalink says the commit sha: c3f8dbf6b5b5f33bebae09c2e92866e140e4601b |
Probably related: https://matrix.org/jira/browse/BOTS-142 |
This SHA is for Synapse, not the IRC bridge and is therefore useless. |
Tried to repro this on v0.3.1 and I cannot. Used the demo federation with user IDs:
I surmise the title of this bug is wrong, or that particular issue has already been fixed. BOTS-142 still seems valid though, so clobbering this issue with that. |
This is the important bit:
Netsplit and the single nick => Client mapping is wrong. |
This relates heavily to #72 - We might as well do that rather than faff with Nick => [Client] mappings (instead it'll be Username => Client which the bridge can ensure are unique 😄 ) |
Punting this to the next release as #72 is effectively a blocker and I don't feel like doing that right now. |
This reared its ugly head again today, though the cause isn't a netsplit. If you connect with the same nick to 2 freenode servers at the same time, the IRCds don't handshake first before accepting the connection, so there's a brief period where both servers accept the connection for the same nick. This then gets corrected less than a second later, but by this point it's too late because it has clobbered the entry in the // connect to one server, which accepts the proposed nick
clientPool["Alice"] = clientAlice
// connect at the same time to a different server, which also accepts the same nick. This clobbers `clientAlice` irreparably.
clientPool["Alice"] = clientAlice2
// bridge gets rename
clientPool["425FE25"] = clientPool["Alice"]
clientPool["Alice"] = null; But we keep another map of user_id -> client as well, so M->I is not affected by this. This means messages to IRC go out correctly, but means we don't recognise the nick when it comes back to us, so we send it on to Matrix again. |
Changed title because this is not netsplit specific anymore. |
@kegsay I'm seeing some duplicate messages on Matrix's IRC bridge to freenode in the ##nix-darwin channel. Not sure if that's a different cause or related to this one. I think the whole thing started with a netsplit a couple of weeks ago and hasn't fixed itself since. |
I just managed to do this yesterday by using NickServ from freenode to IDENTIFY and then REGAIN my nick. |
For reference, we are tracking this bug at the moment. The likely short term fix next week will be a bridge restart coupled with some related bug fixes. I suspect the very least we can do is some kind of debugAPI to refresh broken rooms. In the shorter term, you are free to ban *[m] users from your rooms as it won't interrupt the bridge. |
I think this comment is easy to interpret as |
Yes, I should be clear here. Please do NOT ban the matrix users from the IRC side -- that will break things. Ban Although hopefully for the time being this is a moot point, as hopefully the restart just now fixed stuff. |
I have reproduced this on Ergo IRCd which doesn't even support server linking.
On Matrix I am I think this is matrix-appservice-irc not handling the integrated bouncer of Ergo which is enforcing my nickname into being my accountname (Mikaela-). See also: https://github.com/ergochat/ergo/blob/v2.7.0/docs/USERGUIDE.md#how-ergo-is-different In case you try to reproduce this on liberta.casa, #371 or something similar is hitting it and you cannot contact Network IRCv3 capabilities in case they are of any help: |
I don't know whether this is a new issue or #502 (comment), but additionally when I join the 13 missing rooms by hand, in the end I am in 14 rooms as one has duplicated and I cannot see anything sent from IRC while IRC can read me in some cases. Possibly yet another issue is that some of the rooms have +i or +k where I am allowed to join right in due to having |
Update on reproducing on Ergo (#27 (comment)): I can
Maybe Ergo is a good IRCd to test against for fixing this bug in general if others don't allow reproducing this consistently? |
This comment has been minimized.
This comment has been minimized.
The diagnosis on matrix-org/node-irc#74 looks correct to me. The issue is this: in general, an IRC server can assign a client a nickname that differs from the one the client requested with NICK. The client is expected to deduce this from the first parameter of the To simplify reproducing the issue, I created an account on testnet.ergo.chat, account name
|
This issue is fixed in 0.29.0-rc2, thank you. It does introduce a new issue I am opening soon. |
Created by @ matthew:matrix.org.
e.g. roblabla on https://vector.im/beta/#/room/!cURbafjkfsMDVwdRDQ:matrix.org/$146192559593207XoTMY:matrix.org and half-shot a few days earlier
The text was updated successfully, but these errors were encountered: