From: Willy Tarreau Date: Mon, 27 Jun 2022 14:13:50 +0000 (+0200) Subject: MINOR: debug: use ltid_bit in ha_thread_dump() X-Git-Tag: v2.7-dev2~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38d0712748b9d05d82677148eefdfdd58d7764f5;p=thirdparty%2Fhaproxy.git MINOR: debug: use ltid_bit in ha_thread_dump() Since commit cc7a11ee3 ("MINOR: threads: set the tid, ltid and their bit in thread_cfg") we ought not use (1UL << thr) to get the group mask for thread , but (ha_thread_info[thr].ltid_bit). ha_thread_dump() needs this. --- diff --git a/src/debug.c b/src/debug.c index 2ee10387d9..50d239e154 100644 --- a/src/debug.c +++ b/src/debug.c @@ -158,7 +158,7 @@ void ha_backtrace_to_stderr(void) */ void ha_thread_dump(struct buffer *buf, int thr, int calling_tid) { - unsigned long thr_bit = 1UL << thr; + unsigned long thr_bit = ha_thread_info[thr].ltid_bit; unsigned long long p = ha_thread_ctx[thr].prev_cpu_time; unsigned long long n = now_cpu_time_thread(thr); int stuck = !!(ha_thread_ctx[thr].flags & TH_FL_STUCK);