mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 23:31:40 +02:00
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.
This commit is contained in:
parent
06bf83e0ae
commit
0c0c0a2878
@ -3145,6 +3145,7 @@ static int h1_show_fd(struct buffer *msg, struct connection *conn)
|
|||||||
{
|
{
|
||||||
struct h1c *h1c = conn->ctx;
|
struct h1c *h1c = conn->ctx;
|
||||||
struct h1s *h1s = h1c->h1s;
|
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",
|
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,
|
h1c->flags, h1c->wait_event.events,
|
||||||
@ -3176,12 +3177,14 @@ static int h1_show_fd(struct buffer *msg, struct connection *conn)
|
|||||||
chunk_appendf(&trash, " tl.calls=%d tl.ctx=%p tl.fct=",
|
chunk_appendf(&trash, " tl.calls=%d tl.ctx=%p tl.fct=",
|
||||||
h1s->subs->tasklet->calls,
|
h1s->subs->tasklet->calls,
|
||||||
h1s->subs->tasklet->context);
|
h1s->subs->tasklet->context);
|
||||||
|
if (h1s->subs->tasklet->calls >= 1000000)
|
||||||
|
ret = 1;
|
||||||
resolve_sym_name(&trash, NULL, h1s->subs->tasklet->process);
|
resolve_sym_name(&trash, NULL, h1s->subs->tasklet->process);
|
||||||
chunk_appendf(&trash, ")");
|
chunk_appendf(&trash, ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user