]> git.lttng.org Git - lttng-ust.git/commit
Fix: nestable pthread cancelstate
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 9 Sep 2021 16:49:26 +0000 (12:49 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 9 Dec 2021 17:34:56 +0000 (12:34 -0500)
commit59e57035d48effd595bd68806bd771c85ec7d406
tree397b29a14e400bf2c3ede53667846e263945439c
parent67bd74aab8279961e4da8cd9c48ffb0a100853b6
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 <mathieu.desnoyers@efficios.com>
Change-Id: Ife8b1fee04c7d7c480e59bdfc158abdee771994c
include/Makefile.am
include/lttng/ust-cancelstate.h [new file with mode: 0644]
src/lib/lttng-ust-common/Makefile.am
src/lib/lttng-ust-common/fd-tracker.c
src/lib/lttng-ust-common/ust-cancelstate.c [new file with mode: 0644]
src/lib/lttng-ust/lttng-context-perf-counters.c
src/lib/lttng-ust/lttng-ust-comm.c
This page took 0.029027 seconds and 4 git commands to generate.