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

Assertion error on startup in 1.76 #15010

Closed
msirringhaus opened this issue Feb 7, 2023 · 1 comment · Fixed by #15041
Closed

Assertion error on startup in 1.76 #15010

msirringhaus opened this issue Feb 7, 2023 · 1 comment · Fixed by #15041
Labels
A-Metrics metrics, measures, stuff we put in Prometheus O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@msirringhaus
Copy link

Description

I've updated from 1.74 to 1.76 and now on startup get

2023-02-07 09:40:49,117 - root - 344 - WARNING - main - ***** STARTING SERVER *****
2023-02-07 09:40:49,118 - root - 348 - WARNING - main - Server /home/matrix/synapse/env37/lib/python3.7/site-packages/synapse/app/homeserver.py version 1.76.0
2023-02-07 09:40:51,594 - synapse.metrics.background_process_metrics - 246 - ERROR - _handle_new_device_update_async-0 - Background process '_handle_new_device_update_async' threw an exception
Traceback (most recent call last):
  File "/home/matrix/synapse/env37/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration: []

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/matrix/synapse/env37/lib/python3.7/site-packages/synapse/metrics/background_process_metrics.py", line 242, in run
    return await func(*args, **kwargs)
  File "/home/matrix/synapse/env37/lib/python3.7/site-packages/synapse/handlers/device.py", line 726, in _handle_new_device_update_async
    assert max_stream_id == stream_id
AssertionError

Restarting yields the same error.

Otherwise, the server seems to work fine.

Steps to reproduce

  • Upgrade synapse
  • and just start it

Homeserver

self-hosted

Synapse Version

1.76

Installation Method

pip (from PyPI)

Database

Postgresql

Workers

Single process

Platform

Raspberry Pi, Rasbian 10

Configuration

No response

Relevant log output

2023-02-07 09:40:49,117 - root - 344 - WARNING - main - ***** STARTING SERVER *****
2023-02-07 09:40:49,118 - root - 348 - WARNING - main - Server /home/matrix/synapse/env37/lib/python3.7/site-packages/synapse/app/homeserver.py version 1.76.0
2023-02-07 09:40:51,594 - synapse.metrics.background_process_metrics - 246 - ERROR - _handle_new_device_update_async-0 - Background process '_handle_new_device_update_async' threw an exception
Traceback (most recent call last):
  File "/home/matrix/synapse/env37/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration: []

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/matrix/synapse/env37/lib/python3.7/site-packages/synapse/metrics/background_process_metrics.py", line 242, in run
    return await func(*args, **kwargs)
  File "/home/matrix/synapse/env37/lib/python3.7/site-packages/synapse/handlers/device.py", line 726, in _handle_new_device_update_async
    assert max_stream_id == stream_id
AssertionError

Anything else that would be useful to know?

No response

@DMRobertson DMRobertson added S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. A-Metrics metrics, measures, stuff we put in Prometheus O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Feb 8, 2023
erikjohnston added a commit that referenced this issue Feb 9, 2023
@erikjohnston
Copy link
Member

I think this is due to us inserting a stream ID into device_lists_changes_converted_stream_position which wasn't persisted in any of the other tables (which is valid, though I'm a bit surprised anyone has hit that case).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Metrics metrics, measures, stuff we put in Prometheus O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants