Skip to content
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

Handle tombstoned rooms properly to avoid adding the same room multiple times #178

Open
kevinaboos opened this issue Oct 8, 2024 · 1 comment
Assignees
Labels
blocked Blocked on another issue or missing feature bug Something isn't working

Comments

@kevinaboos
Copy link
Member

Here's an example, in which the room "The Office of the Matrix Foundation" has been tombstoned and replaced with a new room, but they have the same room_id: "!CltYqaqkvHpbwjPFcs:matrix.org".

This causes the timeline_update_receiver created in add_new_room() to be replaced in ALL_ROOMS_INFO, which in turn causes the old one to be dropped. Then, when the original room instance attempts to send an update, the timeline_update_sender.send() call fails because the corresponding receiver has been dropped.

Below is the log output:

src/sliding_sync.rs:930:5 - Populating initial set of 0 known rooms.
src/home/rooms_list.rs:243:17 - RoomsList: processed 1 updates to the list of all rooms
2024-10-08T18:31:18.643267Z  INFO matrix_sdk::encryption::recovery: Recovery state changed from Unknown to Incomplete
2024-10-08T18:31:18.713080Z  WARN matrix_sdk_crypto::identities::manager: Our own device might have been deleted user_id="@kevinaboos:matrix.org" device_id="BVMLCDKGQG" curve25519_key="curve25519:r6vBTV0GY/lJFX0ue6baJBJC44V04+y2hP8OBlRwdV4" ed25519_key="ed25519:/KgR6H0N857EXycYD6WotNCkM6gUVjaf0qVGLkb/2CM"
src/sliding_sync.rs:963:46 - room_list: diff PushBack
src/sliding_sync.rs:1050:5 - Adding new room: "Empty Room", room_id: !CltYqaqkvHpbwjPFcs:matrix.org
2024-10-08T18:31:19.515965Z  INFO matrix_sdk_ui::room_list_service::room: No cached sliding sync room found for `!CltYqaqkvHpbwjPFcs:matrix.org`, the timeline will be empty.
src/sliding_sync.rs:1141:13 - Received an updated ignored-user list: []
src/sliding_sync.rs:1192:13 - Received a room list loading state update: Loaded { maximum_number_of_rooms: Some(29) }
src/home/rooms_list.rs:243:17 - RoomsList: processed 1 updates to the list of all rooms
2024-10-08T18:31:19.926715Z  WARN build{room_id="!CltYqaqkvHpbwjPFcs:matrix.org" track_read_receipts=true}: matrix_sdk_base::rooms::normal: Unknown room version, falling back to v10
2024-10-08T18:31:19.931166Z  INFO sending_task{room_id=!CltYqaqkvHpbwjPFcs:matrix.org}: matrix_sdk::send_queue: spawned the sending task
2024-10-08T18:31:19.931828Z  INFO local_echo_handler{room_id="!CltYqaqkvHpbwjPFcs:matrix.org"}: matrix_sdk_ui::timeline::builder: spawned the local echo handler!
src/sliding_sync.rs:1214:5 - Starting timeline subscriber for room !CltYqaqkvHpbwjPFcs:matrix.org...
src/sliding_sync.rs:1009:46 - room_list: diff Reset, new length 20
src/sliding_sync.rs:1050:5 - Adding new room: "Office of the Matrix.org Foundation", room_id: !CltYqaqkvHpbwjPFcs:matrix.org
src/sliding_sync.rs:1216:5 - Received initial timeline update of 2 items for room !CltYqaqkvHpbwjPFcs:matrix.org.
thread 'tokio-runtime-worker' panicked at src/sliding_sync.rs:1223:14:
Error: timeline update sender couldn't send update to room !CltYqaqkvHpbwjPFcs:matrix.org with initial items!

The key lines are:

src/sliding_sync.rs:1050:5 - Adding new room: "Empty Room", room_id: !CltYqaqkvHpbwjPFcs:matrix.org

and

src/sliding_sync.rs:1050:5 - Adding new room: "Office of the Matrix.org Foundation", room_id: !CltYqaqkvHpbwjPFcs:matrix.org
@kevinaboos kevinaboos added the bug Something isn't working label Oct 8, 2024
@kevinaboos kevinaboos self-assigned this Oct 8, 2024
@kevinaboos kevinaboos added this to Robrix Oct 8, 2024
@github-project-automation github-project-automation bot moved this to Ready in Robrix Oct 8, 2024
@kevinaboos kevinaboos moved this from Ready to In progress in Robrix Nov 1, 2024
@kevinaboos kevinaboos added the blocked Blocked on another issue or missing feature label Nov 8, 2024
@kevinaboos
Copy link
Member Author

This is currently blocked on Matrix SDK's issue, in which we cannot get a room's tombstoned state events.
matrix-org/matrix-rust-sdk#4211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked on another issue or missing feature bug Something isn't working
Projects
Status: In progress
Development

No branches or pull requests

1 participant