]> 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:43:45 +0000 (12:43 -0500)
commit595c15773def8e249145c4dead560ba7329810c7
treedc4c0bf9ef99d3c2351cf06b8a86e8b66aa701a3
parent1a3b8784434bb597b623100a591aeeb835fccf16
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]
liblttng-ust-comm/Makefile.am
liblttng-ust-comm/lttng-ust-fd-tracker.c
liblttng-ust-comm/ust-cancelstate.c [new file with mode: 0644]
liblttng-ust/lttng-context-perf-counters.c
liblttng-ust/lttng-ust-comm.c
This page took 0.029857 seconds and 4 git commands to generate.