summaryrefslogtreecommitdiffstats
path: root/src/debug.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:20:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:20:34 +0000
commitf3bb08bb1d94c77704371f8546a739119f0a05b4 (patch)
tree5dfb47fa424ecde655f8950098411a311e9296e6 /src/debug.c
parentReleasing progress-linux version 2.9.6-1~progress7.99u1. (diff)
downloadhaproxy-f3bb08bb1d94c77704371f8546a739119f0a05b4.tar.xz
haproxy-f3bb08bb1d94c77704371f8546a739119f0a05b4.zip
Merging upstream version 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)) {