Open Edremon opened 2 years ago
Mm, that's interesting.
The first two lines are due to some recent change to THREAD_LIST_SYNC
, I'll have to look into that, and third means they changed the "mark as read" api, which I will also have to look into.
Neither of those should be related to the panic though. I'm not positive what could cause that panic, (very possibly an api change), however I suspect that another possible option would be if your client disconnected momentarily I suspect that it would be possible for the member list to become desynchronized between the client and server and then the panic might occur. I will try and see if I can replicate the error, and look into how to just reset (or maybe disable) the member list when something like this happens.
Also, while looking through the code I found a typo (which I fixed in 762a92a), although I don't believe it could cause the panic you encountered.
The panic didn't happen today, when it happened multiple times yesterday, don't have any idea what is different, connected to the same exact channels.
Concerning the errors that I posted in my initial bug report, they don't seem to be related, I got the ack one a lot but that just seem seem to make reading state a bit weird.
Meanwhile, I also got new errors that seem to be more related: paste since it's quite big. It's always the same with the same two users in it being spammed quite frequently (currently 300k lines in buffer).
Happened again, I don't see anything special in traces.
In weechat core:
hh:26:38 =!= Panic in the main Weechat thread: panicked at 'removal index (is 99) should be < len (is 99)', src/twilight_utils/member_list.rs:99:31
hh:26:38 discord: event loop failed, stopping...
hh:26:41 discord: event loop failed, stopping...
hh:26:44 discord: event loop failed, stopping...
hh:26:44 discord: event loop failed, stopping...
hh:26:44 discord: event loop failed, stopping...
hh:26:44 discord: event loop failed, stopping...
hh:26:45 discord: event loop failed, stopping...
hh:26:45 discord: event loop failed, stopping...
hh:26:46 discord: event loop failed, stopping...
hh:26:46 discord: event loop failed, stopping...
hh:26:46 discord: event loop failed, stopping...
hh:26:46 discord: event loop failed, stopping...
In weecord log:
hh:26:38 ERROR weecord::discord::discord_connection: Event loop failed: channel closed
hh:26:41 ERROR weecord::discord::discord_connection: Event loop failed: channel closed
hh:26:44 ERROR weecord::discord::discord_connection: Event loop failed: channel closed
hh:26:44 ERROR weecord::discord::discord_connection: Event loop failed: channel closed
hh:26:44 ERROR weecord::discord::discord_connection: Event loop failed: channel closed
hh:26:44 ERROR weecord::discord::discord_connection: Event loop failed: channel closed
hh:26:45 ERROR weecord::discord::discord_connection: Event loop failed: channel closed
hh:26:45 ERROR weecord::discord::discord_connection: Event loop failed: channel closed
hh:26:46 ERROR weecord::discord::discord_connection: Event loop failed: channel closed
hh:26:46 ERROR weecord::discord::discord_connection: Event loop failed: channel closed
hh:26:46 ERROR weecord::discord::discord_connection: Event loop failed: channel closed
hh:26:46 ERROR weecord::discord::discord_connection: Event loop failed: channel closed
In the 30 minutes before panic, it only had a few errors related to ack.
It happened again without any of the Nick list in an invalid state
error, so that might also be unrelated.
The Nick list in an invalid state
error might not be required for the panic to occur, but it's a very strong indication that either something major has changed in the API or one of the updates was missed.
To try and narrow down the cause:
Failed to add group "{}" to nicklist
errors? That could lead to this panic happening. I'll push a change (7740490) that should prevent the panic from occurring if you just want it to stop crashing, however the panic is there because once this happens there is no way to correct the nicklist state and the nicklist will be incorrect (users will get other users statuses) until weechat is restarted.
The only real way to trace this down would be to recompile with unlimited-logging
enabled, add twilight_gateway::shard::processor=trace
to the tracing directives. then the log file can be filtered to include only GUILD_MEMBER_LIST_UPDATE
events. From there it would be possible to reconstruct the series of events that lead to the panic. Not easy though, and I still haven't been able to reproduce, although I will keep trying.
Can you double check if there are any Failed to add group "{}" to nicklist errors? That could lead to this panic happening.
No Failed to add group "{}" to nicklist
errors at all.
Do you have a very reliable internet connection, or is it possible that the client disconnected briefly?
AFAIK my network connection is reliable.
Are you in any very large group chats (100 users or more?)
Some have more than 10k members.
Were you actively using weecord? Specifically adding or removing channels or servers? Or was it left completely idle with no channels or guilds added or removed since weechat was opened?
Hmm most of the time, I'm on some irc channel when that happen. In those session, I have never added or removed channels/guild, only use autoconnect.
I have been using weechat-discord (mk3 branch) in the last few days and after some time, around 1-2 hours, it panic, here what's in printed in weechat:
Here what I have in tracing in a normal session right after logging in, I don't know if all those errors are relevant:
The first error seem to be about an active thread (that I haven't joined). The third one seem to be about a channel where I have unread messages.
I will update issue if I get more relevant logs when that error happen again.