Willy Tarreau
c07736209d
BUG/MINOR: debug: fix a small race in the thread dumping code
...
If a thread dump is requested from a signal handler, it may interrupt
a thread already waiting for a dump to complete, and may see the
threads_to_dump variable go to zero while others are waiting, steal
the lock and prevent other threads from ever completing. This tends
to happen when dumping many threads upon a watchdog timeout, to threads
waiting for their turn.
Instead now we proceed in two steps :
1) the last dumped thread sets all bits again
2) all threads only wait for their own bit to appear, then clear it
and quit
This way there's no risk that a bit performs a double flip in the same
loop and threads cannot get stuck here anymore.
This should be backported to 2.0 as it clarifies stack traces.
2019-07-31 19:35:31 +02:00
..
2019-07-19 09:24:12 +02:00
2019-04-19 11:45:20 +02:00
2019-05-07 06:54:07 +02:00
2019-04-25 17:26:46 +02:00
2019-07-18 10:45:08 +02:00
2019-06-07 19:32:02 +02:00
2019-05-22 19:47:57 +02:00
2019-07-19 13:50:09 +02:00
2019-01-14 19:32:15 +01:00
2018-11-26 19:50:32 +01:00
2019-07-19 09:46:23 +02:00
2019-07-16 15:23:09 +02:00
2019-07-19 11:39:19 +02:00
2019-07-19 09:24:12 +02:00
2019-01-02 20:12:44 +01:00
2019-07-23 14:37:47 +02:00
2019-06-07 15:37:47 +02:00
2019-07-31 14:12:55 +02:00
2019-05-20 21:14:14 +02:00
2019-07-19 13:50:09 +02:00
2019-07-19 09:24:12 +02:00
2019-07-31 19:35:31 +02:00
2019-06-11 09:54:12 +02:00
2019-07-19 09:24:12 +02:00
2019-07-31 14:54:41 +02:00
2019-07-31 14:54:41 +02:00
2019-07-31 14:54:41 +02:00
2019-07-31 14:54:41 +02:00
2019-07-31 14:54:41 +02:00
2019-07-31 14:54:41 +02:00
2019-07-19 09:24:12 +02:00
2019-07-19 09:24:12 +02:00
2019-07-19 09:24:12 +02:00
2019-07-19 09:24:12 +02:00
2017-10-31 18:01:18 +01:00
2019-07-19 13:50:09 +02:00
2019-07-19 09:24:12 +02:00
2019-07-19 09:18:27 +02:00
2019-07-31 14:12:55 +02:00
2018-03-21 05:04:01 +01:00
2019-06-10 09:42:43 +02:00
2019-05-07 06:58:15 +02:00
2019-07-29 11:17:52 +02:00
2019-04-01 07:44:56 +02:00
2019-04-01 07:44:56 +02:00
2019-04-01 07:44:56 +02:00
2019-04-01 07:44:56 +02:00
2018-11-26 19:50:32 +01:00
2019-07-19 09:24:12 +02:00
2019-07-23 14:58:32 +02:00
2018-11-26 19:50:32 +01:00
2019-07-19 13:50:09 +02:00
2019-07-23 14:58:32 +02:00
2019-07-19 09:24:12 +02:00
2019-07-19 09:46:23 +02:00
2019-07-29 11:17:52 +02:00
2019-07-26 14:12:59 +02:00
2019-07-05 14:26:15 +02:00
2019-06-19 13:55:57 +02:00
2019-05-27 10:29:59 +02:00
2019-03-11 17:02:38 +01:00
2019-07-24 16:45:02 +02:00
2019-07-26 15:46:18 +02:00
2016-01-11 07:31:35 +01:00
2015-02-03 00:24:16 +01:00
2019-04-19 11:35:22 +02:00
2019-07-09 10:40:33 +02:00
2019-07-31 14:12:55 +02:00
2019-07-31 16:18:25 +02:00
2019-07-19 09:18:27 +02:00
2019-07-15 16:43:16 +02:00
2019-06-22 07:57:56 +02:00
2018-11-26 19:50:32 +01:00
2019-06-16 18:40:33 +02:00
2019-07-19 09:24:12 +02:00
2019-07-19 13:50:09 +02:00
2019-04-15 21:55:48 +02:00
2019-07-24 16:45:02 +02:00
2019-07-24 16:45:02 +02:00
2016-04-14 11:18:22 +02:00
2019-07-24 16:45:02 +02:00
2019-07-24 16:45:02 +02:00
2019-07-30 14:02:06 +02:00
2019-07-30 14:02:06 +02:00
2019-06-05 18:03:38 +02:00
2019-05-07 06:58:15 +02:00
2019-06-21 09:48:28 +02:00
2019-07-30 14:02:06 +02:00
2019-07-31 14:12:55 +02:00
2019-04-01 07:44:56 +02:00
2018-12-02 18:40:29 +01:00
2018-12-02 18:39:52 +01:00
2019-07-31 19:35:31 +02:00
2019-06-16 18:16:33 +02:00
2019-07-19 09:18:27 +02:00
2019-07-19 09:24:12 +02:00
2019-07-19 13:50:09 +02:00
2019-07-26 14:56:41 +02:00
2019-07-12 09:07:48 +02:00
2019-07-19 09:24:12 +02:00
2019-06-06 16:50:39 +02:00
2017-10-24 19:54:25 +02:00
2017-11-24 17:19:12 +01:00
2019-07-19 09:24:12 +02:00
2019-01-04 18:20:32 +01:00
2019-05-23 10:20:55 +02:00
2019-07-19 09:24:12 +02:00
2019-06-14 14:42:29 +02:00
2019-04-01 07:44:56 +02:00