-
Notifications
You must be signed in to change notification settings - Fork 60
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
Messages still showing out of order #426
Comments
Possible to run with debug and paste the output? |
Sure, planning to try reproduce it when I have time and see if it's easily fixed. It may even be to do with the introduction of an additional IRC client/proxy (for me, it's irssi client -> irssi proxy -> matterircd. For @axinojolais, it's irssi client -> bip (?!?) -> matterircd). FWIW, I've been running matterircd reverting commit 2c3883a and so far haven't noticed out-of-order messages. Anyways, will keep digging. |
I am also facing this issue. My setup is hexchat <-> ZNC <-> matterircd. |
ORIGINAL / Web-client ONE MATTERIRCD [1d4] ONE Debug logs: The issues seems to be that messages FOUR and FIVE got "glued" together, it shows as "FOUR\nFIVE" in the debug logs. I hope this is useful for the issue debugging! |
So I guess this is just fallout from switching to using buffered channels? With the fix switching back to unbuffered channels, |
IIUC, in handleWsActionPost() (https://github.com/42wim/matterircd/blob/master/bridge/mattermost/mattermost.go#L813), a single message with multiple lines is split into multiple messages and put into the buffered channel (#383). Unfortunately, per https://stackoverflow.com/a/25795236, with buffered channels, we can't guarantee order of messages (the delivery?). Correct me if I'm wrong. |
Well, we have 1 goroutine handling them and the get put in in order, so that's why I don't understand it or I must be missing something. @guilhermepiccoli logs above show the issue, a LIFO problem :-) |
Oh, just edited my previous comment as you were replying :) I checked and we do indeed have only the 1 goroutine. |
@hloeung are you sure you were testing with the version that has #419 in it ? I talked to @guilhermepiccoli and he was using an older version that didn't had the fix. I also can not reproduce it with current master |
Yeah, definitely using a version with #419 applied. I wasn't able to easily reproduce it locally either. I'll have another go at reproducing it with debug/trace enabled this weekend. |
An update here, still haven't come across this yet and wasn't able to reproduce it myself. I did stumble on #420 with a PR to fix that though so all is not in vein. |
Ok, i'm going to close this, if someone can reproduce it, feel free to reopen. |
Seen it today, with the latest matterircd. Sadly, while running without debug/trace logging. @guilhermepiccoli did you end up sanitising the logs you had? |
Also, can we reopen the issue @42wim ? Saw this issue a lot past few days, but only have the above log collection with trace enabled. Have a bunch with just the debug logs though... Cheers! |
This should fix any unordered messages, but no idea why they are unordered in the first place...
@guilhermepiccoli and closed again.. no idea why it happens, I've now removed buffered channels for mattermost/slack. |
Thanks a bunch @42wim , gonna try now (will run the artifact generated by the test build of this commit). |
I'm running with the patch above, and so far, no out-of-order messages. Thanks ! |
I'll give it a try as well. I've been experiencing a lot of out of order messages lately. As to why it got closed (if you were actually asking about it, if not, I'm sorry for providing explanation anyway) - it's because of the commit message. If you put in it keywords like |
Unfortunately, I'm still seeing the issues even with @42wim 's patch =/ |
Yeah, I'm also experiencing out of order messages. |
Adding to the above - the messages sent by this user were most likely sent using desktop mattermost app. |
Can the people (@hloeung, @guilhermepiccoli, @furai ) that still have the issue download this special build: https://github.com/42wim/matterircd/pull/445/checks?check_run_id=2985395608 (and select your correct artifact) https://github.com/42wim/matterircd/suites/3155567672/artifacts/72567237 should be a direct link to the 64-bit linux one. Now add Hopefully this way we can see if there's a channel out of order issue or something else, if you get hit by the issue, paste the last OOTRACE lines here. |
Per IRC, I haven't come across or noticed it since the latest patch. I've pulled in the latest with OOTRACE logging anyways. Will update if I notice. Thanks! |
Okay, here it is:
|
Another:
|
@hloeung does MSG1 MSG2 or MSG3 contain ``` ? I have no idea btw how this is possible, msg's get set on the channel in order but get read out of order. |
@hloeung and other peeps, can you try https://github.com/42wim/matterircd/pull/445/checks?check_run_id=3041968404 ? The change here is to remove the buffered channel completely although this shouldn't make any difference because it's getting set to 0 when initializing mattermost/slack but maybe I'm missing something :) If you're seeing |
Yep, upgraded yesterday and am running with the latest patch since then.
I can see a difference in the logs already. Seems to be Will keep watching. |
so fixed now? I'll do a release tomorrow then. |
Yeah, I think so. Not noticed any more OOO messages. |
Spoke too soon. On IRC:
Matterircd OOTRACE logs:
So wtf?!?!? |
Still happening, a lot less frequent, but still seeing it. Most recent being:
Weird, I'm at a loss at where this would be. |
Still no fix for this? |
@furai well, if we don't know the root cause we can't fix it :( |
#482 should fix this as we're not splitting the lines from mattermost anymore before sending it to irc |
Hi,
Thought it was fixed with #419 but it looks like it's still happening (as @axinojolais mentioned a few days ago):
With that, you can see that messages are received out of order below:
Even without code blocks, for example:
Produces this:
The text was updated successfully, but these errors were encountered: