BUG/MEDIUM: threads: Ignore current thread to end its harmless period
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 14 Apr 2021 12:02:25 +0000 (14:02 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Sat, 17 Apr 2021 09:14:58 +0000 (11:14 +0200)
commitf63a18550073e821976606f9602c261976939ae9
tree59c13736cb36de8d209b823d3182efcb87e4aebf
parentb5f0fac7653651e3632bbf6061b19dcac292d655
BUG/MEDIUM: threads: Ignore current thread to end its harmless period

A previous patch was pushed to fix a deadlock when an isolated thread ends
its harmless period (a9a9e9aac ["BUG/MEDIUM: thread: Fix a deadlock if an
isolated thread is marked as harmless"]). But, unfortunately, the fix is
incomplete. The same must be done in the outer loop, in
thread_harmless_end() function. The current thread must be ignored when
threads_want_rdv_mask mask is tested.

This patch must also be backported as far as 2.0.
include/haproxy/thread.h