From: Mathieu Desnoyers Date: Thu, 9 Sep 2021 16:49:26 +0000 (-0400) Subject: Fix: nestable pthread cancelstate X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=d0cd72be0eacd90e56470e9cb954fa129997037e;hp=d0cd72be0eacd90e56470e9cb954fa129997037e;p=lttng-ust.git Fix: nestable pthread cancelstate The pthread cancelstate disable performed to ensure threads are not cancelled while holding mutexes which are used in library destructors does not currently support that those mutexes may be nested. It generates error messages when using the fork and fd helpers when running with LTTNG_UST_DEBUG=1. The effect of this is that the pthread cancelstate can be re-enabled too soon when the first unlock is performed (in a nested lock scenario), thus allowing the thread to be cancelled while still holding a lock, and causing a deadlock on application exit. Signed-off-by: Mathieu Desnoyers Change-Id: Ife8b1fee04c7d7c480e59bdfc158abdee771994c ---