-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
lots of AssertionError: 'Attempting to create an event with no prev_events' #8094
Comments
This assertionerror is what happens where previously we would have returned 'no create event in auth events'; as such this is closely related to #7642. These rooms have no entries in They seem to divide into two sets:
|
It might be worth noting that, at the time we ran this update on matrix.org, it looked at |
New sentry issue: https://sentry.matrix.org/sentry/synapse-matrixorg/issues/189680/ |
Still very much a thing: https://sentry.matrix.org/sentry/synapse-matrixorg/issues/200257 |
This was noticed again when Relevant stack trace: Stack trace
|
Re above, this disappeared now, not sure if it was me 1) joining my matrix.org user to the room, 2) writing some events to the room (it was previously empty, just state events) or 3) re-inviting the bot to the room - but it's now happy. |
I am seeing this issue on my self-hosted Synapse instance in one e2e-encrypted direct-message room with another user ("u2"). u2 dropped out of the Element Android client after I made a configuration error on the Identity server. This config error has been fixed meanwhile. Still, when I attempt to send a message to u2 the following exception happens:
When u2 attempts to join the room (after restoring keys) synapse logs:
I have nightly backups of the Synapse state that I could restore. I also do have an Element Desktop client of u2 that has not been force-logged-out and of whose state I created a backup. My homeserver is running Synapse v1.48.0. Any ideas? Edit: I see that #11243, which deals with this assertion, got merged yesterday. Any idea whether this will land in v1.49? |
For searchability: the new phrase for this log line is 'Attempting to create a non-m.room.create event with no prev_events'. https://sentry.matrix.org/sentry/synapse-matrixorg/issues/242065/?query=is%3Aunresolved appears to be another recent example, again with neb/RSS bot. |
I've been bit by this bug and I'm not sure if it's due to data corruption, locale, or if I borked something in my attempts to fix. The log shows multiple errors when I try to post to an existing room:
Synapse version: 1.53.0 This is happening to all the rooms that existed before. This example is a public room with no special permissions. Synapse-admin shows the room, shows my user in the room, and even shows the membership in the rooms state list (m.room.member event with my username). New rooms seem to function without issue. * edit1: Opened a dedicated issue for my instance as there seem to be more errors than listed here: 12147 |
We still see this today. At the time of writing, it is the noisiest error we see on Matrix.org's Sentry deployment. I briefly looked at https://sentry.tools.element.io/organizations/element/issues/38924/events/f519ef8661df429fbbee8dac8dbb4fd9/?project=2 today. It seems to be as AS user controlled by neb_rssbot trying to post an The room in question
As an aside: how many stateless- and forward-extremityless rooms are there on matrix.org? Answer: lots.
|
Curiously, the number of such rooms is still going up: matrix=> SELECT COUNT(*) FROM rooms WHERE NOT EXISTS (SELECT 1 FROM current_state_events cse WHERE cse.room_id = rooms.room_id);
count
---------
1697883
(1 row)
matrix=> SELECT COUNT(*) FROM rooms WHERE NOT EXISTS (SELECT 1 FROM event_forward_extremities efe WHERE efe.room_id = rooms.room_id);
count
--------
615352
(1 row) so we have one or more bugs to track down. |
When a room is deleted in Synapse we remove the event forward extremities in the room, so if (say a bot) tries to send a message into the room we error out due to not being able to calculate prev events for the new event *before* we check if the sender is in the room. Fixes #8094
When a room is deleted in Synapse we remove the event forward extremities in the room, so if (say a bot) tries to send a message into the room we error out due to not being able to calculate prev events for the new event *before* we check if the sender is in the room. Fixes #8094
Still rising:
|
I think that will happen if the server leaves the room, no? |
Oh, maybe. I'd naively expect that room's row to be deleted from the rooms table if that was the case though. 🤷 |
These suggest something is wrong with the room in question. We should filter out attempts to send to such rooms earlier on.
The text was updated successfully, but these errors were encountered: