From 5fe86682929affd9c0703d14c0129d048a4eb1f6 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 21 Jan 2021 09:13:35 +0100 Subject: [PATCH] MINOR: mux-h1/show_fd: report as suspicious an entry with too many calls An FD entry that maps to an H1 connection whose stream was woken up more than 1M times is now flagged as suspicious. (cherry picked from commit 0c0c0a287834283eaaf5f25437a39a8f059e9878) Signed-off-by: Willy Tarreau --- src/mux_h1.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mux_h1.c b/src/mux_h1.c index 7b07bb7..94006e6 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -2900,6 +2900,7 @@ static int h1_show_fd(struct buffer *msg, struct connection *conn) { struct h1c *h1c = conn->ctx; struct h1s *h1s = h1c->h1s; + int ret = 0; chunk_appendf(msg, " h1c.flg=0x%x .sub=%d .ibuf=%u@%p+%u/%u .obuf=%u@%p+%u/%u", h1c->flags, h1c->wait_event.events, @@ -2931,12 +2932,14 @@ static int h1_show_fd(struct buffer *msg, struct connection *conn) chunk_appendf(&trash, " tl.calls=%d tl.ctx=%p tl.fct=", h1s->subs->tasklet->calls, h1s->subs->tasklet->context); + if (h1s->subs->tasklet->calls >= 1000000) + ret = 1; resolve_sym_name(&trash, NULL, h1s->subs->tasklet->process); chunk_appendf(&trash, ")"); } } } - return 0; + return ret; } -- 1.7.10.4