BUG/MINOR: stream: do not call co_data() from __strm_dump_to_buffer()
authorWilly Tarreau <w@1wt.eu>
Fri, 21 Feb 2025 16:18:00 +0000 (17:18 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 28 Feb 2025 15:23:05 +0000 (16:23 +0100)
commite96a1a644bc4e3acee7af79dd2c0888b902c90c3
tree0d9321d38f5725c976bf0fc19761a962d806a550
parente5057a90eb505d3a8f98d655bf669e6943a62861
BUG/MINOR: stream: do not call co_data() from __strm_dump_to_buffer()

co_data() was instrumented to detect cases where c->output > data and
emits a warning if that's not correct. The problem is that it happens
quite a bit during "show threads" if it interrupts traffic anywhere,
and that in some environments building with -DDEBUG_STRICT_ACTION=3,
it will kill the process.

Let's just open-code the channel functions that make access to co_data(),
there are not that many and the operations remain very simple.

This can be backported to 3.1. It didn't trigger in earlier versions
because they didn't have this CHECK_IF_HOT() test.

(cherry picked from commit 9d5bd47634707963ac6be4fc90e64feded174d0a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/stream.c