Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Setting profile + joining a room can race (SYN-787) #1444

@matrixbot

Description

@matrixbot

The Slack bridge appears to be triggering a race condition of some kind in synapse that most regular users would be too slow to provoke. Namely, that if concurrently a client tries to set a displayname/avatar image and join a room, the member event in the room never ends up with that profile information.

For example, the user @​_slack_decentralizedweb_U1BLXG620:matrix.org is in the room !WBhcGXTDMlzyTPWoJv:matrix.org (which is ##decentralizedweb-general:matrix.org. The user themself does have a profile set:

$ matrixtool client -u @​LeoNerd:matrix.org json /_matrix/client/r0/profile/@​_slack_decentralizedweb_U1BLXG620:matrix.org
{
   "displayname" : "pfrazee",
   "avatar_url" : "mxc://matrix.org/SBrnbsCSCpVFLZOArSPNaSni"
}

However, their m.room.member event in the room does not contain this information:

$ matrixtool client -u @​LeoNerd:matrix.org json /_matrix/client/r0/rooms/'!WBhcGXTDMlzyTPWoJv:matrix.org'/state/m.room.member/@​_slack_decentralizedweb_U1BLXG620:matrix.org
{
   "membership" : "join",
   "displayname" : null,
   "avatar_url" : null
}

(Imported from https://matrix.org/jira/browse/SYN-787)

(Reported by @leonerd)

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions