element-hq / element-hq/synapse

Compement `TestPartialStateJoin/MembersRequestBlocksDuringPartialStateJoin` flake

Open
#15,408 0 comments 0 reactions 0 assignees View on GitHub
O-Uncommon S-Tolerable T-Task Z-Flake
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#15408](https://github.com/matrix-org/synapse/issues/15408).

---

E.g. https://github.com/matrix-org/synapse/actions/runs/4631184257/jobs/8194288649#step:7:24474

```
client.go:719: [CSAPI] POST hs1/_matrix/client/v3/register => 200 OK (93.11573ms)
client.go:719: [CSAPI] GET hs1/_matrix/client/v3/capabilities => 200 OK (8.972256ms)
server.go:170: Creating room !0-3FXvbvwgodiFgJI4RW:host.docker.internal:40585 with version 10
federation_room_join_partial_state_test.go:4400: Registered state_ids handler for event $UZHuBSp4ZnDhfjOLr3ZSqG-P9mcmsl0vCzAmeIRmwM4
federation_room_join_partial_state_test.go:4441: Registered /state handler for event $UZHuBSp4ZnDhfjOLr3ZSqG-P9mcmsl0vCzAmeIRmwM4
2023/04/06 17:44:27 Received send-join of event $w_HnCgvjunulC9NjnbdIxb_uOVtVUC8PTWmOSYy5upM
client.go:719: [CSAPI] POST hs1/_matrix/client/v3/join/!0-3FXvbvwgodiFgJI4RW:host.docker.internal:40585 => 200 OK (593.08873ms)
federation_room_join_partial_state_test.go:4294: /join request completed
federation_room_join_partial_state_test.go:4379: Incoming state_ids request for event [$UZHuBSp4ZnDhfjOLr3ZSqG-P9mcmsl0vCzAmeIRmwM4] in room !0-3FXvbvwgodiFgJI4RW:host.docker.internal:40585
client.go:719: [CSAPI] GET hs1/_matrix/client/v3/sync => 200 OK (287.180489ms)
federation_room_join_partial_state_test.go:1128: Alice successfully synced
federation_room_join_partial_state_test.go:4386: Replying to /state_ids request for event [$UZHuBSp4ZnDhfjOLr3ZSqG-P9mcmsl0vCzAmeIRmwM4]
federation_room_join_partial_state_test.go:4419: Incoming state request for event [$UZHuBSp4ZnDhfjOLr3ZSqG-P9mcmsl0vCzAmeIRmwM4] in room !0-3FXvbvwgodiFgJI4RW:host.docker.internal:40585
federation_room_join_partial_state_test.go:4427: Replying to /state request for event [$UZHuBSp4ZnDhfjOLr3ZSqG-P9mcmsl0vCzAmeIRmwM4]
client.go:719: [CSAPI] GET hs1/_matrix/client/v3/rooms/!0-3FXvbvwgodiFgJI4RW:host.docker.internal:40585/members => 200 OK (130.838147ms)
federation_room_join_partial_state_test.go:1152: MatchResponse JSONCheckOff(chunk): did not see items: [m.room.member|@charlie:host.docker.internal:40585 m.room.member|@derek:host.docker.internal:40585] - http://127.0.0.1:33009/_matrix/client/v3/rooms/%210-3FXvbvwgodiFgJI4RW:host.docker.internal:40585/members?at=s52_24_0_1_1_1_1_15_0_13 => {"chunk":[{"content":{"avatar_url":null,"displayname":"t11alice","membership":"join"},"origin_server_ts":1680803066976,"room_id":"!0-3FXvbvwgodiFgJI4RW:host.docker.internal:40585","sender":"@t11alice:hs1","state_key":"@t11alice:hs1","type":"m.room.member","unsigned":{"age":932},"event_id":"$w_HnCgvjunulC9NjnbdIxb_uOVtVUC8PTWmOSYy5upM","user_id":"@t11alice:hs1","age":932}]}
federation_room_join_partial_state_test.go:4317: Cleaning up after test...
client.go:719: [CSAPI] GET hs1/_matrix/client/v3/rooms/!0-3FXvbvwgodiFgJI4RW:host.docker.internal:40585/members => 200 OK (122.891943ms)
federation_room_join_partial_state_test.go:4319: @t11alice:hs1's partial state join to !0-3FXvbvwgodiFgJI4RW:host.docker.internal:40585 completed.
client.go:719: [CSAPI] POST hs1/_matrix/client/v3/rooms/!0-3FXvbvwgodiFgJI4RW:host.docker.internal:40585/leave => 200 OK (134.468831ms)
federation_room_join_partial_state_test.go:154: host.docker.internal:40585 saw @t11alice:hs1 leave test room !0-3FXvbvwgodiFgJI4RW:host.docker.internal:40585.

```

Contributor guide

Open the contributing guide

Research direction

Start with federation_room_join_partial_state_test.go, especially MembersRequestBlocksDuringPartialStateJoin and the logged request handlers around lines 4294-4441. Reproduce the intermittent failure and trace why the members response can arrive before Charlie and Derek are visible; done means the test reliably passes without masking the partial-state behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.