BUG/MINOR: debug: Don't dump the lua stack if it is not initialized
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 24 Jul 2020 17:08:05 +0000 (19:08 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 27 Jul 2020 07:49:22 +0000 (09:49 +0200)
commit1641153b210f9cc6a7d0f0650a4a5313d0fb8919
treea142c5ae89f8c40a3dda903024da968405099189
parentf281501e19a5c114e5daf3a51f903d03137b79a8
BUG/MINOR: debug: Don't dump the lua stack if it is not initialized

When the watchdog is fired because of the lua, the stack of the corresponding
lua context is dumped. But we must be sure the lua context is fully initialized
to do so. If we are blocked on the global lua lock, during the lua context
initialization, the lua stask may be NULL.

This patch should fix the issue #776. It must be backported as far as 2.0.

(cherry picked from commit 471425f51d71d1214abeee40439a51a2a3217102)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit f9f875213809d0d08857def5ce4f76d6b747fbd6)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/debug.c