This repository has been 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
Logging loop after SIGHUP when a StreamHandler
is configured
#6550
Comments
I thought this used to work, but I just tried the same thing on v0.20.0 (the version that introduced reloading the log config on SIGHUP) and it did the same. |
This seems like yet another reason that redirecting stdio is a terrible idea, and we should implement #1539 (comment). |
neilisfragile
added
z-bug
(Deprecated Label)
z-p2
(Deprecated Label)
A-Logging
Synapse's logs (structured or otherwise). Not metrics.
labels
Dec 17, 2019
richvdh
changed the title
Stack overflow on SIGHUP with default logging config
Stack overflow on SIGHUP when a Jan 8, 2020
StreamHandler
is configured
(the default logging config no longer has a |
as of #8268, you no longer get a stack overflow, but you do get logging that looks like this:
It's worth noting that this (logs-to-stderr plus redirect-stdio-to-logs) is the default configuration for the docker image. |
richvdh
changed the title
Stack overflow on SIGHUP when a
Logging loop after SIGHUP when a Jun 10, 2021
StreamHandler
is configuredStreamHandler
is configured
(a StreamHandler is no longer the default for the non-docker case as of #8040) |
richvdh
added
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
and removed
z-bug
(Deprecated Label)
z-p2
(Deprecated Label)
labels
Jun 10, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If you use the default logging config, which has a
StreamHandler
pointing at sys.stderr, and do not set--no-redirect-stdio
, then when you send synapse a SIGHUP, it will stack overflow and abort.The problem appears to be that when you SIGHUP it, the streamhandler gets repointed at the redirected stderr, which goes back into a logger: so as soon as anything is logged, we get an infinite loop.
The text was updated successfully, but these errors were encountered: