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

List index out of range in phone_stats_home #6661

Closed
ulope opened this issue Jan 8, 2020 · 3 comments
Closed

List index out of range in phone_stats_home #6661

ulope opened this issue Jan 8, 2020 · 3 comments

Comments

@ulope
Copy link

ulope commented Jan 8, 2020

Description

Recently we've started seeing the following exception appear in our homeserver logs every couple of hours:

2019-12-20 00:35:19,441 synapse.metrics.background_process_metrics(214) [ERROR   ]: phone_stats_home-68 Background process 'phone_stats_home' threw an exception
Traceback (most recent call last):
  File "/synapse-venv/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration: 1530
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/synapse-venv/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration: 1530
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/synapse-venv/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
StopIteration: 1530
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/opt/synapse-develop/synapse/metrics/background_process_metrics.py", line 212, in run
    return (yield result)
  File "/synapse-venv/lib/python3.7/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks
    result = g.send(result)
  File "/opt/synapse-develop/synapse/app/homeserver.py", line 525, in phone_stats_home
    old = stats_process[0]
IndexError: list index out of range

The index in the StopIteration exception varies between different occurrences of the message.

Steps to reproduce

¯\_(ツ)_/¯

Version information

@richvdh
Copy link
Member

richvdh commented Jan 8, 2020

any exceptions from performance_stats_init on startup?

@ulope
Copy link
Author

ulope commented Jan 8, 2020

Indeed:

2019-12-11 12:35:19,455 twisted(172) [CRITICAL]:  Unhandled Error
Traceback (most recent call last):
  File "/opt/synapse-develop/synapse/app/_base.py", line 114, in run
    run_command()
  File "/synapse-venv/lib/python3.7/site-packages/twisted/internet/base.py", line 1283, in run
    self.mainLoop()
  File "/synapse-venv/lib/python3.7/site-packages/twisted/internet/base.py", line 1292, in mainLoop
    self.runUntilCurrent()
  File "/opt/synapse-develop/synapse/metrics/__init__.py", line 434, in f
    ret = func(*args, **kwargs)
--- <exception caught here> ---
  File "/synapse-venv/lib/python3.7/site-packages/twisted/internet/base.py", line 913, in runUntilCurrent
    call.func(*call.args, **call.kw)
  File "/opt/synapse-develop/synapse/util/__init__.py", line 97, in wrapped_callback
    callback(*args, **kwargs)
  File "/opt/synapse-develop/synapse/app/homeserver.py", line 588, in performance_stats_init
    (int(hs.get_clock().time(), resource.getrusage(resource.RUSAGE_SELF)))
builtins.TypeError: 'resource.struct_rusage' object cannot be interpreted as an integer

@richvdh
Copy link
Member

richvdh commented Jan 8, 2020

oh, this was fixed in Synapse 1.6 by #6418.

@richvdh richvdh closed this as completed Jan 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants