This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
run_in_background
calls whose return value is discarded can re-start finished logging contexts
#13090
Labels
S-Tolerable
Minor significance, cosmetic issues, low or no impact to users.
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
A more general version of #12987.
When we launch a task using
run_in_background
, the task inherits the current logging context. If we neglect to await the task, we may finish our current logging context while the background task is still using it. We ought to either await such background tasks or give them their own logging contexts.clokep notes that we can find such calls using
grep -r " run_in_background" synapse
and there are a few places we do so.Note that it does not make sense to write
await make_deferred_yieldable(run_in_background(f, ...))
, as it could be written asawait f(...)
.The text was updated successfully, but these errors were encountered: