Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was 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

@benbz

Description

@benbz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions