This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
log_kv
within _handle_new_device_update_async
is not associated with an opentracing span, causing sentry logspam and large memory usage #12552
Copy link
Copy link
Closed
Labels
A-Device-List-TrackingTelling clients about other devices. Often related to E2EE.Telling clients about other devices. Often related to E2EE.S-MinorBlocks non-critical functionality, workarounds exist.Blocks non-critical functionality, workarounds exist.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.X-RegressionSomething broke which worked on a previous releaseSomething broke which worked on a previous releaseX-Release-BlockerMust be resolved before making a releaseMust be resolved before making a release
Description
This caused rapid memory usage rises on matrix.org.
We suspect it's only noticable if you're using sentry to report errors.
2022-04-26 13:34:43,569 - synapse.logging.opentracing - 347 - ERROR - _handle_new_device_update_async-0 - There was no active span when trying to log. Did you forget to start one or did a context slip?
Stack (most recent call last):
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/synapse/src/synapse/app/homeserver.py", line 460, in <module>
main()
File "/home/synapse/src/synapse/app/homeserver.py", line 456, in main
run(hs)
File "/home/synapse/src/synapse/app/homeserver.py", line 442, in run
logger=logger,
File "/home/synapse/src/synapse/app/_base.py", line 180, in start_reactor
run()
File "/home/synapse/src/synapse/app/_base.py", line 162, in run
run_command()
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/base.py", line 1315, in run
self.mainLoop()
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/base.py", line 1325, in mainLoop
reactorBaseSelf.runUntilCurrent()
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/base.py", line 964, in runUntilCurrent
f(*a, **kw)
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/defer.py", line 661, in callback
self._startRunCallbacks(result)
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/defer.py", line 763, in _startRunCallbacks
self._runCallbacks()
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/defer.py", line 858, in _runCallbacks
current.result, *args, **kwargs
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/defer.py", line 1750, in gotResult
current_context.run(_inlineCallbacks, r, gen, status)
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/defer.py", line 1663, in _inlineCallbacks
status.deferred.callback(getattr(e, "value", None))
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/defer.py", line 661, in callback
self._startRunCallbacks(result)
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/defer.py", line 763, in _startRunCallbacks
self._runCallbacks()
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/defer.py", line 858, in _runCallbacks
current.result, *args, **kwargs
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/defer.py", line 661, in callback
self._startRunCallbacks(result)
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/defer.py", line 763, in _startRunCallbacks
self._runCallbacks()
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/defer.py", line 858, in _runCallbacks
current.result, *args, **kwargs
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/defer.py", line 1750, in gotResult
current_context.run(_inlineCallbacks, r, gen, status)
File "/home/synapse/env-py37/lib/python3.7/site-packages/twisted/internet/defer.py", line 1660, in _inlineCallbacks
result = current_context.run(gen.send, result)
File "/home/synapse/src/synapse/metrics/background_process_metrics.py", line 243, in run
return await func(*args, **kwargs)
File "/home/synapse/src/synapse/handlers/device.py", line 687, in _handle_new_device_update_async
# {"message": "sent device update to host", "host": host}
File "/home/synapse/src/synapse/logging/opentracing.py", line 347, in ensure_active_span_inner_2
stack_info=True,
Metadata
Metadata
Assignees
Labels
A-Device-List-TrackingTelling clients about other devices. Often related to E2EE.Telling clients about other devices. Often related to E2EE.S-MinorBlocks non-critical functionality, workarounds exist.Blocks non-critical functionality, workarounds exist.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.X-RegressionSomething broke which worked on a previous releaseSomething broke which worked on a previous releaseX-Release-BlockerMust be resolved before making a releaseMust be resolved before making a release