diff --git a/src/cli.c b/src/cli.c index ab5fe9a15..48146630f 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1061,10 +1061,17 @@ static int cli_io_handler_show_fd(struct appctx *appctx) sv = objt_server(conn->target); px = objt_proxy(conn->target); is_back = conn_is_back(conn); + if (atleast2(fdt.thread_mask)) + suspicious = 1; + if (conn->handle.fd != fd) + suspicious = 1; } else if (fdt.iocb == sock_accept_iocb) li = fdt.owner; + if (!fdt.thread_mask) + suspicious = 1; + chunk_printf(&trash, " %5d : st=0x%02x(R:%c%c W:%c%c) ev=0x%02x(%c%c%c%c%c) [%c%c] tmask=0x%lx umask=0x%lx owner=%p iocb=%p(", fd, @@ -1091,6 +1098,12 @@ static int cli_io_handler_show_fd(struct appctx *appctx) } else if (fdt.iocb == sock_conn_iocb) { chunk_appendf(&trash, ") back=%d cflg=0x%08x", is_back, conn_flags); + + if (conn->handle.fd != fd) { + chunk_appendf(&trash, " fd=%d(BOGUS)", conn->handle.fd); + suspicious = 1; + } + if (px) chunk_appendf(&trash, " px=%s", px->id); else if (sv) @@ -1100,6 +1113,8 @@ static int cli_io_handler_show_fd(struct appctx *appctx) if (mux) { chunk_appendf(&trash, " mux=%s ctx=%p", mux->name, ctx); + if (!ctx) + suspicious = 1; if (mux->show_fd) suspicious |= mux->show_fd(&trash, fdt.owner); } @@ -1124,6 +1139,8 @@ static int cli_io_handler_show_fd(struct appctx *appctx) #ifdef DEBUG_FD chunk_appendf(&trash, " evcnt=%u", fdtab[fd].event_count); + if (fdtab[fd].event_count >= 1000000) + suspicious = 1; #endif chunk_appendf(&trash, "%s\n", suspicious ? " !" : "");