bug: "room <ID> has no state" in sync #1142
Labels
No labels
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
Wont fix
old/ci/cd
old/rust
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity#1142
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The root cause of this bug is unknown, however it is somewhat easy to reproduce in very large (and typically quite broken) rooms, seemingly spaces in particular.
I know of at least two spaces that have caused this bug,
#community:matrix.org(matrix community space) and#space:nixos.org(NixOS space). My best guess is that joining the room gets far enough into the process that the user's membership cache is updated, however saving the room state fails (due to bad data? corrupted state chains?), which does return an error to the joining user, but causes sync to light up like a christmas tree.ERROR conduwuit_api::client::sync::v3: Room !iMZEhwCvbfeAYUxAjZ:t2l.io has no stateetc etclet current_shortstatehash = services.rooms.state.get_room_shortstatehash(room_id).map_err(|_| err!(Database(error!("Room {room_id} has no state"))));The error site seems to imply that there is no state being associated with a short state hash when there should be one.
Repro'd this in the wild:
my professional™️ opinion is there's a race condition between saving the room state response, and finishing adding the sender's membership event to the local graph.
had this happen to me when joining
#debian-next:matrix.debian.socialin the debian space, got far enough to where the irc bots dmed me but i wasn't able to see the chat. defederating with!admin federation disable-roomwasnt enough to stop it, had to completely ban the room.2026-01-28T08:12:46.856112Z ERROR conduwuit_api::client::sync::v3::joined: Room !izahlpcyIDeymNjiOd:matrix.debian.social has no state2026-01-28T08:12:46.856150Z WARN conduwuit_api::client::sync::v3: error loading joined room err=Room !izahlpcyIDeymNjiOd:matrix.debian.social has no state room_id=!izahlpcyIDeymNjiOd:matrix.debian.socialI just installed Continuwuity and encountered this issue immediately. This was my first impression of the project and the Matrix protocol in general. Perhaps I'm just unlucky, or maybe it's not so uncommon and should be fixed ASAP.
@Root-Core wrote in #1142 (comment):
This issue is not trivial to fix — we're working on a refactor that will hopefully address it, but it's a massive amount of work. Please remember that we're volunteers who maintain this software, in our spare time, to make it available for free to anyone.
If you would like issues fixed ASAP, I accept contract offers, which can allow me to dedicate time towards the project, rather than working on it when I feel like. If you believe an issue should be prioritised, please reach out and I'm sure we can arrange something!
"ASAP" means "as soon as possible", not "I demand this to be fixed immediately".
As an open source developer myself, I just wanted to provide some feedback that this is probably a common issue.
I haven't looked into the code base, but #1455 attempted to resolve the issue and the ticket was closed recently.
If you want to nitpick about "ASAP", you could interpret it as "take another look at this PR if you have time".
I'm grateful for your work, it just didn't create the best first impression of the Matrix protocol.
It's just like the first impression I left here! ;)