bug: appservices receive duplicated events #739

Open
opened 2025-04-14 20:29:10 +00:00 by nex · 15 comments
Owner

more info required

more info required
Owner

Logs from mautrix-discord's side:
image

Logs from mautrix-discord's side: ![image](/attachments/7e89460b-d037-42f0-be01-5e72da5cbf72)
215 KiB
Owner

Some people with similar setups haven't encountered this, so may be to do with database corruption caused by the appservice EDU patch

Some people with similar setups haven't encountered this, so may be to do with database corruption caused by the appservice EDU patch
Author
Owner

@Jade wrote in continuwuation/continuwuation#739 (comment):

Some people with similar setups haven't encountered this, so may be to do with database corruption caused by the appservice EDU patch

I've managed to repro on transgender.ing before, which never ran the patch. Can't say for sure

@Jade wrote in https://forgejo.ellis.link/continuwuation/continuwuation/issues/739#issuecomment-14634: > Some people with similar setups haven't encountered this, so may be to do with database corruption caused by the appservice EDU patch I've managed to repro on transgender.ing before, which never ran the patch. Can't say for sure
Contributor

Can reproduce with OOYE, never ran whatever patch that was. Can I ask if the repeat messages would have different txnids?

Can reproduce with OOYE, never ran whatever patch that was. Can I ask if the repeat messages would have different txnids?

Can reproduce, also it seems to happen when lots of events are firing at the same time, like redacting message or banning user on multiple rooms.

Can reproduce, also it seems to happen when lots of events are firing at the same time, like redacting message or banning user on multiple rooms.

@NoaHimesaka1873 wrote in #739 (comment):

Can reproduce, also it seems to happen when lots of events are firing at the same time, like redacting message or banning user on multiple rooms.

More specifically, for me, it happens when Meowlnir sending "Redacted (n) events from (user) in (channel)" message, and this message getting bridged by mautrix-discord bot.

@NoaHimesaka1873 wrote in https://forgejo.ellis.link/continuwuation/continuwuity/issues/739#issuecomment-23270: > Can reproduce, also it seems to happen when lots of events are firing at the same time, like redacting message or banning user on multiple rooms. More specifically, for me, it happens when Meowlnir sending "Redacted (n) events from (user) in (channel)" message, and this message getting bridged by mautrix-discord bot.
Contributor

How can I help debug this? I am pretty sure I am hitting this problem with OOYE and duplicated messages.

Happy to dig into code/compile stuff etc.

How can I help debug this? I am pretty sure I am hitting this problem with OOYE and duplicated messages. Happy to dig into code/compile stuff etc.
Owner

First step is likely getting a debug build with traces going, and then watching for suspicious logs around appservices. It might be easier if you can reproduce it in an artificial environment

First step is likely getting a debug build with traces going, and then watching for suspicious logs around appservices. It might be easier if you can reproduce it in an artificial environment
Contributor

Lemme put up a debug homeserver setup.

Lemme put up a debug homeserver setup.
Contributor

Set up a brand new homeserver and ooye instance with dev continuwuity + traceimage

Set up a brand new homeserver and ooye instance with dev continuwuity + trace![image](/attachments/32a54dce-942a-4cc4-916d-efc525671d95)
Contributor

Blah:

warning: some trace filter directives would enable traces that are disabled statically
 | `trace` would enable the TRACE level for all targets
 = note: the static max level is `info`
 = help: to enable DEBUG logging, remove the `max_level_info` feature from the `tracing` crate

wtfrog sec...

Blah: ``` warning: some trace filter directives would enable traces that are disabled statically | `trace` would enable the TRACE level for all targets = note: the static max level is `info` = help: to enable DEBUG logging, remove the `max_level_info` feature from the `tracing` crate ``` wtfrog sec...
Owner

You have to build with --no-default-features --features default to get all log levels I believe.

You have to build with --no-default-features --features default to get all log levels I believe.
Contributor

Hmm... The way you are meant to build the container is just the Dockerfile in /docker right?

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "/sbin/conduwuit": stat /sbin/conduwuit: no such file or directory
Hmm... The way you are meant to build the container is just the Dockerfile in `/docker` right? ``` Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: exec: "/sbin/conduwuit": stat /sbin/conduwuit: no such file or directory ```
Contributor

Also something to note... that Out of Your Element bot was repeating its own messages there...

Also something to note... that Out of Your Element bot was repeating its own messages there...
Contributor

Think I figured out my problem, I was not using buildx, just trying to manually build and it missed a bunch of stages.

Think I figured out my problem, I was not using buildx, just trying to manually build and it missed a bunch of stages.
Sign in to join this conversation.
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#751 feat: appservice callbacks
continuwuation/continuwuity
Reference
continuwuation/continuwuity#739
No description provided.