summaryrefslogtreecommitdiffstats
path: root/src/debug.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:20:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:20:30 +0000
commitddfc40eabdbc59a607b568e946fb116dcd3439fd (patch)
treeb3253de65399448dbbf12e5b65d2da56c53d3af6 /src/debug.c
parentAdding upstream version 2.9.6. (diff)
downloadhaproxy-ddfc40eabdbc59a607b568e946fb116dcd3439fd.tar.xz
haproxy-ddfc40eabdbc59a607b568e946fb116dcd3439fd.zip
Adding upstream version 2.9.7.upstream/2.9.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/debug.c b/src/debug.c
index fbaad80..756c194 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -300,9 +300,15 @@ void ha_thread_dump_one(int thr, int from_signal)
if (th_ctx->current &&
th_ctx->current->process == process_stream && th_ctx->current->context) {
const struct stream *s = (const struct stream *)th_ctx->current->context;
- struct hlua *hlua = s ? s->hlua : NULL;
+ struct hlua *hlua = NULL;
- if (hlua && hlua->T) {
+ if (s) {
+ if (s->hlua[0] && HLUA_IS_BUSY(s->hlua[0]))
+ hlua = s->hlua[0];
+ else if (s->hlua[1] && HLUA_IS_BUSY(s->hlua[1]))
+ hlua = s->hlua[1];
+ }
+ if (hlua) {
mark_tainted(TAINTED_LUA_STUCK);
if (hlua->state_id == 0)
mark_tainted(TAINTED_LUA_STUCK_SHARED);
@@ -417,7 +423,9 @@ void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx)
#ifdef USE_LUA
hlua = NULL;
- if (s && (hlua = s->hlua)) {
+ if (s && ((s->hlua[0] && HLUA_IS_BUSY(s->hlua[0])) ||
+ (s->hlua[1] && HLUA_IS_BUSY(s->hlua[1])))) {
+ hlua = (s->hlua[0] && HLUA_IS_BUSY(s->hlua[0])) ? s->hlua[0] : s->hlua[1];
chunk_appendf(buf, "%sCurrent executing Lua from a stream analyser -- ", pfx);
}
else if (task->process == hlua_process_task && (hlua = task->context)) {