]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: debug: move the "recover now" warn message after the optional notes
authorWilly Tarreau <w@1wt.eu>
Thu, 7 Nov 2024 06:56:13 +0000 (07:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 7 Nov 2024 06:56:13 +0000 (07:56 +0100)
At the end of the too long processing warning added by commit 0950778b3a
("MINOR: debug: add a function to dump a stuck thread"), there can be some
optional notes about lua and memory trimming. However it's a bit awkward
that they appear after the "trying to recover now" message. Let's just move
that message after the notes.

src/debug.c

index 37f5c8d3cc58ceded5af3226a84020110f8d2cdc..67d8ff9321692bce871e04b28b94c60c64307785 100644 (file)
@@ -780,9 +780,6 @@ void ha_stuck_warning(int thr)
                ha_thread_dump_done(NULL, thr);
        }
 
-       chunk_printf(&buf, " => Trying to gracefully recover now.\n");
-       DISGUISE(write(2, buf.area, buf.data));
-
 #ifdef USE_LUA
        if (get_tainted() & TAINTED_LUA_STUCK_SHARED && global.nbthread > 1) {
                chunk_printf(&buf,
@@ -809,6 +806,9 @@ void ha_stuck_warning(int thr)
                             "          'global' section of your configuration to avoid this in the future.\n");
                DISGUISE(write(2, buf.area, buf.data));
        }
+
+       chunk_printf(&buf, " => Trying to gracefully recover now.\n");
+       DISGUISE(write(2, buf.area, buf.data));
 }
 
 /* Complain with message <msg> on stderr. If <counter> is not NULL, it is