]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: stream: don't use localtime in dumps from a signal handler
authorWilly Tarreau <w@1wt.eu>
Mon, 24 Feb 2025 10:43:15 +0000 (11:43 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 24 Feb 2025 12:40:42 +0000 (13:40 +0100)
commit2e0bac90da0013513969224db94661dda88d7b98
tree039a3fc8d2f9dc23f9be2ef1da60506dca146c1a
parentfb7874c286dbe1594837fc75b9e96783dfe160f5
BUG/MEDIUM: stream: don't use localtime in dumps from a signal handler

In issue #2861, Jarosaw Rzeszótko reported another issue with
"show threads", this time in relation with the conversion of a stream's
accept date to local time. Indeed, if the libc was interrupted in this
same function, it could have been interrupted with a lock held, then
it's no longer possible to dump the date, and we face a deadlock.
This is easy to reproduce with logging enabled.

Let's detect we come from a signal handler and do not try to resolve
the time to localtime in this case.
src/stream.c