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

Presence status does not update correctly #13601

Closed
erikgieseler opened this issue Aug 23, 2022 · 22 comments
Closed

Presence status does not update correctly #13601

erikgieseler opened this issue Aug 23, 2022 · 22 comments
Assignees
Labels
A-Presence O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Major functionality / product severely impaired, no satisfactory workaround. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. X-Regression Something broke which worked on a previous release

Comments

@erikgieseler
Copy link

erikgieseler commented Aug 23, 2022

Description

Hello,

Since the update to Synapse 1.64 or 1.65, we have the problem that the status of a user in Element no longer updates correctly. The users are using Element version 1.11.3. The problem cannot be reproduced correctly, for one user the status is updated correctly after approx. 1-5 minutes after logging out, but another user is still shown as online even though he has already closed Element for 30 minutes. If you delete the cache in Element, the status is displayed correctly, but not permanently.
Has something been changed in the presence handling that could cause this behaviour?

Greetings Erik

Steps to reproduce

  • User 1 is online
  • User 2 sees that User 1 is online
  • User 1 closes Element
  • Wait 10 minutes
  • User 2 sees that User 1 is still online although User 1 has Element not opened

Homeserver

chat.slawinski.de

Synapse Version

1.65

Installation Method

No response

Platform

Server: Ubuntu 20.04 LTS
Client: macOS, iOS and Android

Relevant log output

I will attach the log file.

Anything else that would be useful to know?

No response

@erikgieseler
Copy link
Author

homeserver.log

@DMRobertson
Copy link
Contributor

Sanity check: when this was working, which version of Element were your users using? (I.e. could this be a client-side problem?)

@DMRobertson
Copy link
Contributor

If it is a server-side change, possibly #13313 to blame?

@DMRobertson DMRobertson added the X-Needs-Info This issue is blocked awaiting information from the reporter label Aug 23, 2022
@erikgieseler
Copy link
Author

erikgieseler commented Aug 23, 2022

When the problem was first noticed, our iMacs had different versions of Element from 1.10.15 to 1.11.3 installed. After that, I installed 1.11.3 on all iMacs. Even with this, the problem persisted. I am pretty sure that the problem did not exist with Synapse 1.62. Regardless of the desktop version, the same problem also exists under Android.

@markiceman
Copy link

I have the same problem after upgrade Synapse from 1.61 to 1.64. You must clean cache in Element and status is OK, but after some time it stops updating correctly again.

@erikjohnston
Copy link
Member

If this is a synapse bug then it sounds like we're not correctly proxying the presence update down the /sync streams. Which is logic that #13313 changed

@lsrmg
Copy link

lsrmg commented Aug 26, 2022

I've got the same problem after updating to synapse 1.63 or 1.64 using element 11.2 and 11.3, it takes some time to notice the wrong status so I can't tell for sure which version it was.

The problem is still present with synapse 1.65 + element 11.3

@DMRobertson DMRobertson added S-Major Major functionality / product severely impaired, no satisfactory workaround. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. X-Regression Something broke which worked on a previous release O-Occasional Affects or can be seen by some users regularly or most users rarely A-Presence and removed X-Needs-Info This issue is blocked awaiting information from the reporter labels Aug 30, 2022
@erikgieseler
Copy link
Author

Any news on this?

@lsrmg
Copy link

lsrmg commented Sep 1, 2022

I can confirm, that it’s working correctly after cleaning the cache, but it stops working after a short period of time. I also noticed that some users stuck on the „yellow“ away bubble, I didn’t see this status ever before.

I tested this with multiple users on Element 1.11.3. And today on Element 1.11.4

@markiceman
Copy link

markiceman commented Sep 20, 2022

Any news?

One question for all with this problem: Do you have synapse in worker mode or in moholith mode?

@lsrmg
Copy link

lsrmg commented Sep 20, 2022

I have 3 generic workers

@markiceman
Copy link

I have 9 workers in large installation.

And I have another, very small installation in monlith mode. In this installation all looks like OK.

@erikgieseler
Copy link
Author

moholith mode here

@markiceman
Copy link

moholith mode here

How many users?

@erikgieseler
Copy link
Author

20 - 30 users

@richvdh
Copy link
Member

richvdh commented Sep 22, 2022

@MatMaul says he has reproduced this and will investigate

@MatMaul MatMaul self-assigned this Sep 22, 2022
@erikgieseler
Copy link
Author

The problem still exists with 1.68

@markiceman
Copy link

I found a lot of messages in postgresql main log:

2022-10-11 09:17:05.946 CEST [1756] synapse_user@synapse ERROR: could not serialize access due to concurrent delete
2022-10-11 09:17:05.946 CEST [1756] synapse_user@synapse STATEMENT: DELETE FROM presence_stream WHERE stream_id < 222660131 AND user_id = ANY(ARRAY[ .... ])

@anoadragon453
Copy link
Member

ERROR: could not serialize access due to concurrent delete

This is fine - it just means that two writes to the database were attempted at once. Synapse will automatically retry the query that didn't make it.

@erikgieseler
Copy link
Author

The problem still exists with 1.69

@MatMaul
Copy link
Contributor

MatMaul commented Nov 4, 2022

This should be fixed by #14243 and available in 1.71 release, closing.

@MatMaul MatMaul closed this as completed Nov 4, 2022
@korneyda
Copy link

korneyda commented Feb 9, 2023

This problem repeated in version 1.76

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Presence O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Major functionality / product severely impaired, no satisfactory workaround. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. X-Regression Something broke which worked on a previous release
Projects
None yet
Development

No branches or pull requests

9 participants