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

ValueError: Stop argument for islice() must be None or an integer: 0 <= x <= sys.maxsize. #10610

Closed
clokep opened this issue Aug 16, 2021 · 0 comments · Fixed by #10611
Closed
Assignees
Labels
A-Spaces Hierarchical organization of rooms T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@clokep
Copy link
Member

clokep commented Aug 16, 2021

See https://sentry.matrix.org/sentry/synapse-matrixorg/issues/222815/?query=is%3Aunresolved

Happening at synapse.handlers.space_summary in _summarize_local_room. Seems to be due to max_rooms_per_space being passed a -1 via federation. The stack is:

ValueError: Stop argument for islice() must be None or an integer: 0 <= x <= sys.maxsize.
  File "synapse/http/server.py", line 258, in _async_render_wrapper
    callback_return = await self._async_render(request)
  File "synapse/http/server.py", line 446, in _async_render
    callback_return = await raw_callback_return
  File "synapse/federation/transport/server.py", line 369, in new_func
    origin, content, request.args, *args, **kwargs
  File "synapse/federation/transport/server.py", line 1944, in on_POST
    origin, room_id, suggested_only, max_rooms_per_space, exclude_rooms
  File "synapse/handlers/space_summary.py", line 289, in federation_space_summary
    None, origin, room_id, suggested_only, max_rooms_per_space
  File "synapse/handlers/space_summary.py", line 357, in _summarize_local_room
    for edge_event in itertools.islice(child_events, max_children):
@clokep clokep added T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. A-Spaces Hierarchical organization of rooms labels Aug 16, 2021
@clokep clokep self-assigned this Aug 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Spaces Hierarchical organization of rooms T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant