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

Database inconsistency from some device IDs #2724

Open
bdelwood opened this issue May 4, 2024 · 0 comments
Open

Database inconsistency from some device IDs #2724

bdelwood opened this issue May 4, 2024 · 0 comments

Comments

@bdelwood
Copy link

bdelwood commented May 4, 2024

After migrating using syn2mas, I got the following error from graphql when looking at the device panel in the user webui:

error: Error: Database inconsistency on table compat_sessions column device_id row 01GBDKE9WE9BA835G0HBW13FZ2

Running mas-cli manage kill-sessions led to a similar error:

2024-05-04T18:11:13.373610Z ERROR cli.manage.kill_sessions{user.username="elwood"}:db.compat_session.lookup{compat_session.id=01GBDKE9WE9BA835G0HBW13FZ2 db.statement="\n                SELECT compat_session_id\n                     , device_id\n                     , user_id\n                     , user_session_id\n                     , created_at\n                     , finished_at\n                     , is_synapse_admin\n                     , user_agent\n                     , last_active_at\n                     , last_active_ip as \"last_active_ip: IpAddr\"\n                FROM compat_sessions\n                WHERE compat_session_id = $1\n            "}: mas_storage_pg::compat::session: error=Database inconsistency on table compat_sessions column device_id row 01GBDKE9WE9BA835G0HBW13FZ2
Error: Database inconsistency on table compat_sessions column device_id row 01GBDKE9WE9BA835G0HBW13FZ2

Caused by:
    Device ID contains invalid characters

I had some really old sessions, generated by the Mautrix bridges, with device IDs like Facebook Messenger Bridge. Dropping the rows with those device IDs in compat_access_tokens and compat_sessions seems to have cleared it up and not broken anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant