-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Handling of differing set_presence
values between devices causes sync tightlooping
#16057
Comments
Hi all, just reporting the same issue here. Since yesterday I got one particular user with a blinking online/away icon all the time, except he is working on the computer. Will observe it further more. |
The same can happen with an Element Web in the background (sending set_presence=unavailable) and any other client syncing without |
Thank you for details t3chguy. Just a question about how to handle the presence correctly. We did not experience such behavior yet and users on our server run mobile and destkop apps with browser tabs simultaneously. |
The problem appears since a recent Element update (element-hq/element-web#25900) but the actual cause is a bug in Synapse, as I understand it. |
@praet0ri4n Element Web v1.11.37 switched from using |
set_presence
between devices causes sync tightloopingset_presence
values between devices causes sync tightlooping
I did some manual testing of #16066 and it seems to fix the issue (it also has a test case that seems to illustrate the problem). @erikjohnston and I are trying to figure out the proper way to handle some per-device presence information and define the behavior before we go fixing stuff. Things left to do here include:
tl;dr Progress is happening, but this is a very complicated, brittle piece of code we're working in. |
Description
Synapse is handling
/sync
set_presence
incorrectly.The spec says
This implies the server is responsible for mixing all the various sync streams'
set_presence
values into one overall value for the user. It seems like it is just doing the equivalent of callingPUT /presence
which is known to clobber things between clients for a given user.Screen.Recording.2023-08-03.at.09.39.44.mov
Steps to reproduce
set_presence=unavailable
set_presence
orset_presence=online
/sync
requests as quickly as possible with the only data they receive being the status update of the other clientHomeserver
localhost
Synapse Version
{"server_version":"1.83.0","python_version":"3.11.3"}
Installation Method
Docker (matrixdotorg/synapse)
Database
SQLite
Workers
Single process
Platform
Docker on macOS
Configuration
Presence enabled
Relevant log output
Lots of sync calls, nothing useful in the logs
Anything else that would be useful to know?
Related #16039
Related #15980
Related element-hq/element-web#25900
The text was updated successfully, but these errors were encountered: