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

Failed to backfill from <server> because UnboundLocalError("local variable 'result' referenced before assignment") #10123

Closed
benbz opened this issue Jun 4, 2021 · 1 comment · Fixed by #10133

Comments

@benbz
Copy link
Contributor

benbz commented Jun 4, 2021

Description

Python error when backfilling fails.

Steps to reproduce

The final stacktrace is:

UnboundLocalError: local variable 'result' referenced before assignment
  File "synapse/handlers/federation.py", line 1194, in try_backfill
    await self.backfill(
  File "synapse/handlers/federation.py", line 959, in backfill
    state = await self._get_state_for_room(
  File "synapse/handlers/federation.py", line 590, in _get_state_for_room
    await self._get_events_and_persist(
  File "synapse/handlers/federation.py", line 1357, in _get_events_and_persist
    await self._auth_and_persist_events(
  File "synapse/handlers/federation.py", line 2104, in _auth_and_persist_events
    await self.persist_events_and_notify(
  File "synapse/handlers/federation.py", line 3066, in persist_events_and_notify
    return result["max_stream_id"]

I've seen different errors further along though:

  • SynapseError: 401: Failed to find any key to satisfy VerifyJsonRequest(server=sugar-free-jazz.com, key_ids=['ed25519:a_OHOQ'], min_valid=1622756012022)
  • SynapseError: 401: Invalid signature for server pc.koesters.xyz:59003 with key ed25519:key1: Unable to verify signature for pc.koesters.xyz:59003: <class 'nacl.exceptions.BadSignatureError'> Signature was forged or corrupt

Possibly only happens in worker setups?

Version information

  • Homeserver: fosdem.org (& others, all running with workers)
  • Version: 1.35.0 & 1.35.1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant