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

Sync: list index out of range #4842

Closed
jo-so opened this issue Mar 9, 2019 · 7 comments
Closed

Sync: list index out of range #4842

jo-so opened this issue Mar 9, 2019 · 7 comments
Labels
z-bug (Deprecated Label) z-p2 (Deprecated Label)

Comments

@jo-so
Copy link

jo-so commented Mar 9, 2019

synapse.http.server: [GET-1] Failed handle request via 'SyncRestServlet': <XForwardedForRequest at 0x7f128a7148d0 method='GET' uri='/_matrix/client/r0/sync?filter=8&timeout=0&since=s2306067_35619134_776_1220453_34573_3_6393_222385_7' clientproto='HTTP/1.0' site=8083>
Traceback (most recent call last):
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/storage/_base.py", line 460, in runWithConnection
    defer.returnValue(result)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1362, in returnValue
    raise _DefGen_Return(val)
twisted.internet.defer._DefGen_Return: [{'event_id': '$1552065964328OVvcU:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066385329lPPEE:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066505330fsYfP:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066746331JMGqL:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066866332svCqP:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066988333mUlAF:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067169334RPLby:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067349335CepZv:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067350336PLvyD:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067530337cEmrB:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067530338RZvPe:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067831339YFfdB:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552068072340uNJbE:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552068793341VmIPG:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552068854342CaTAy:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552069936343BeImL:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552069997344LWFsO:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552070117345GMSwS:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552070118346JNrhZ:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552071921353YYKwK:bau-ha.us', 'state_group': 495696}]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/storage/_base.py", line 418, in runInteraction
    defer.returnValue(result)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1362, in returnValue
    raise _DefGen_Return(val)
twisted.internet.defer._DefGen_Return: [{'event_id': '$1552065964328OVvcU:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066385329lPPEE:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066505330fsYfP:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066746331JMGqL:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066866332svCqP:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066988333mUlAF:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067169334RPLby:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067349335CepZv:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067350336PLvyD:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067530337cEmrB:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067530338RZvPe:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067831339YFfdB:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552068072340uNJbE:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552068793341VmIPG:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552068854342CaTAy:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552069936343BeImL:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552069997344LWFsO:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552070117345GMSwS:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552070118346JNrhZ:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552071921353YYKwK:bau-ha.us', 'state_group': 495696}]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/storage/_base.py", line 1061, in _simple_select_many_batch
    defer.returnValue(results)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1362, in returnValue
    raise _DefGen_Return(val)
twisted.internet.defer._DefGen_Return: [{'event_id': '$1552065964328OVvcU:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066385329lPPEE:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066505330fsYfP:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066746331JMGqL:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066866332svCqP:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552066988333mUlAF:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067169334RPLby:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067349335CepZv:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067350336PLvyD:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067530337cEmrB:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067530338RZvPe:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552067831339YFfdB:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552068072340uNJbE:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552068793341VmIPG:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552068854342CaTAy:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552069936343BeImL:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552069997344LWFsO:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552070117345GMSwS:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552070118346JNrhZ:bau-ha.us', 'state_group': 495696}, {'event_id': '$1552071921353YYKwK:bau-ha.us', 'state_group': 495696}]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/storage/state.py", line 931, in _get_state_group_for_events
    defer.returnValue({row["event_id"]: row["state_group"] for row in rows})
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1362, in returnValue
    raise _DefGen_Return(val)
twisted.internet.defer._DefGen_Return: {'$1552065964328OVvcU:bau-ha.us': 495696, '$1552066746331JMGqL:bau-ha.us': 495696, '$1552069936343BeImL:bau-ha.us': 495696, '$1552071921353YYKwK:bau-ha.us': 495696, '$1552067349335CepZv:bau-ha.us': 495696, '$1552070117345GMSwS:bau-ha.us': 495696, '$1552066385329lPPEE:bau-ha.us': 495696, '$1552067350336PLvyD:bau-ha.us': 495696, '$1552067530337cEmrB:bau-ha.us': 495696, '$1552067831339YFfdB:bau-ha.us': 495696, '$1552066505330fsYfP:bau-ha.us': 495696, '$1552070118346JNrhZ:bau-ha.us': 495696, '$1552068072340uNJbE:bau-ha.us': 495696, '$1552066988333mUlAF:bau-ha.us': 495696, '$1552068793341VmIPG:bau-ha.us': 495696, '$1552066866332svCqP:bau-ha.us': 495696, '$1552067530338RZvPe:bau-ha.us': 495696, '$1552069997344LWFsO:bau-ha.us': 495696, '$1552067169334RPLby:bau-ha.us': 495696, '$1552068854342CaTAy:bau-ha.us': 495696}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/storage/state.py", line 843, in get_state_for_events
    defer.returnValue({event: event_to_state[event] for event in event_ids})
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1362, in returnValue
    raise _DefGen_Return(val)
twisted.internet.defer._DefGen_Return: {'$1552067530338RZvPe:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552065964328OVvcU:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552066746331JMGqL:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552069936343BeImL:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552067350336PLvyD:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552070117345GMSwS:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552071921353YYKwK:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552067530337cEmrB:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552067831339YFfdB:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552066866332svCqP:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552067169334RPLby:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552066385329lPPEE:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552066988333mUlAF:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552068793341VmIPG:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552066505330fsYfP:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552067349335CepZv:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552068854342CaTAy:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552068072340uNJbE:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552069997344LWFsO:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552070118346JNrhZ:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}, '$1552072703354YBavQ:bau-ha.us': {('m.room.member', '@joerg:alea.gnuu.de'): <FrozenEvent event_id='$15338368205vCUBH:alea.gnuu.de', type='m.room.member', state_key='@joerg:alea.gnuu.de'>, ('m.room.history_visibility', ''): <FrozenEvent event_id='$1533757910143054HUbhj:matrix.org', type='m.room.history_visibility', state_key=''>}}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/visibility.py", line 215, in filter_events_for_client
    defer.returnValue(list(filtered_events))
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1362, in returnValue
    raise _DefGen_Return(val)
twisted.internet.defer._DefGen_Return: []

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/handlers/sync.py", line 469, in _load_filtered_recents
    limited=limited or newly_joined_room
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1362, in returnValue
    raise _DefGen_Return(val)
twisted.internet.defer._DefGen_Return: TimelineBatch(prev_batch=StreamToken(room_key='s2308503', presence_key=35739576, typing_key=2885, receipt_key=1226004, account_data_key=34577, push_rules_key=3, to_device_key=6398, device_list_key=223357, groups_key=7), events=[], limited=True)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/http/server.py", line 81, in wrapped_request_handler
    yield h(self, request)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/http/server.py", line 316, in _async_render
    callback_return = yield callback(request, **kwargs)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/rest/client/v2_alpha/sync.py", line 167, in on_GET
    full_state=full_state
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/handlers/sync.py", line 239, in wait_for_sync_for_user
    sync_config, since_token, timeout, full_state,
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/handlers/sync.py", line 261, in _wait_for_sync_for_user
    sync_config, since_token, full_state=full_state,
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/handlers/sync.py", line 936, in generate_sync_result
    sync_result_builder, account_data_by_room
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/handlers/sync.py", line 1305, in _generate_sync_entry_for_rooms
    yield concurrently_execute(handle_room_entries, room_entries, 10)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/util/async_helpers.py", line 149, in _concurrently_execute_inner
    yield func(next(it))
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/handlers/sync.py", line 1711, in _generate_room_entry
    full_state=full_state
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/venvs/matrix-synapse/lib/python3.5/site-packages/synapse/handlers/sync.py", line 773, in compute_state_delta
    batch.events[0].event_id, state_filter=state_filter,
IndexError: list index out of range

Version information

  • Version: 0.99.2+stretch1
  • Install method: Debian package from marix.org
  • Platform: Debian stable
@jo-so
Copy link
Author

jo-so commented Mar 9, 2019

I've captured the object that causes this exception:

TimelineBatch(prev_batch=StreamToken(room_key='s2308503',
    presence_key=35739576, typing_key=2885, receipt_key=1226004,
    account_data_key=34577, push_rules_key=3, to_device_key=6398,
    device_list_key=223357, groups_key=7),
  events=[], limited=True)

I've fixed it with

diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index bd97241ab..b20736073 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -767,7 +767,7 @@ class SyncHandler(object):
                     current=current_state_ids,
                     lazy_load_members=lazy_load_members,
                 )
-            elif batch.limited:
+            elif batch.limited and batch.events:
                 state_at_timeline_start = yield self.store.get_state_ids_for_event(
                     batch.events[0].event_id, state_filter=state_filter,
                 )

@jo-so
Copy link
Author

jo-so commented Mar 9, 2019

If you like, I could open a PR.

@richvdh
Copy link
Member

richvdh commented Mar 11, 2019

PR sounds good, thanks

@neilisfragile neilisfragile added z-bug (Deprecated Label) z-p2 (Deprecated Label) labels Mar 12, 2019
jo-so added a commit to jo-so/synapse that referenced this issue Mar 25, 2019
Check if the batch contains events before trying to access them.

Fixes matrix-org#4842
jo-so added a commit to jo-so/synapse that referenced this issue Mar 26, 2019
Check if the batch contains events before trying to access them.

Fixes matrix-org#4842
@richvdh
Copy link
Member

richvdh commented May 9, 2019

I'm just wondering how we could end up with limited set, but no events. I'm a bit worried about fixing the symptoms without understanding the cause, which would lead to more problems down the line. I'd also like us to have a test case to reproduce it, to avoid regressions.

Are you using a custom filter with a limit of 0? Or does this happen when you join a new room?

@jo-so
Copy link
Author

jo-so commented May 9, 2019

I don't remember what happened before the error came up the first time. I think it came without any action from me. Maybe, can I fetch somehow the event data from the database? Can you give me an SQL query?

@richvdh
Copy link
Member

richvdh commented May 9, 2019

Not really, I'm afraid, since I don't have the details of the request that caused the error, or the state of your database at the time...

@richvdh
Copy link
Member

richvdh commented May 15, 2019

ok, given we don't know what caused this issue, and have no way to reproduce it, I'm not sure we can make much progress on it, so I think it's best to close it for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-bug (Deprecated Label) z-p2 (Deprecated Label)
Projects
None yet
Development

No branches or pull requests

3 participants