Quantcast
Channel: Serverphorums.com - HAProxy
Viewing all articles
Browse latest Browse all 5112

Interactive stats socket broken on master (no replies)

$
0
0
It appears the following commit broke the interactive stats socket.
When this commit is applied the stats socket disconnects after typing
prompt and hitting enter.

This breaks applications such as hatop. We found the breaking commit using
git bisect.

Please let me know if I can help debug further.

commit 5cfa3bcc22708571b674a40f1d9cdfa0657ab33e
Author: Willy Tarreau <w@1wt.eu>
Date: Fri Sep 25 20:08:51 2015 +0200

MINOR: cli: do not call the release handler on internal error.

It's dangerous to call this on internal state error, because it risks
to perform a double-free. This can only happen when a state is not
handled. Note that the switch/case currently doesn't offer any option
for missed states since they're all declared. Better fix this anyway.
The fix was tested by commenting out some entries in the switch/case.

diff --git a/src/dumpstats.c b/src/dumpstats.c
index 87e62eb..bdfb7e3 100644
--- a/src/dumpstats.c
+++ b/src/dumpstats.c
@@ -2554,8 +2554,7 @@ static void cli_io_handler(struct appctx *appctx)
break;
#endif
default: /* abnormal state */
- cli_release_handler(appctx);
- appctx->st0 = STAT_CLI_PROMPT;
+ si->flags |= SI_FL_ERR;
break;
}

Thanks, Jesse

Viewing all articles
Browse latest Browse all 5112

Trending Articles