]> git.lttng.org Git - lttng-tools.git/commit
Fix: deadlock between UST registry lock and consumer lock
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 23 Jan 2015 16:29:00 +0000 (11:29 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 26 Jan 2015 15:39:59 +0000 (10:39 -0500)
commit941f616b15a3dc32c0ade6e04da7ae57b40bf394
tree9b07f5c924b02a838c299e80d0977408a2682e5e
parent67b2c4af41ce6bc89f4707947743c43d00d7583e
Fix: deadlock between UST registry lock and consumer lock

Reorganize locking of ust registry and consumer socket communication.

commit ce34fcd0 "Fix: per-uid flush and ust registry locking" attempted
to fix locking related to the UST registry, but doing so introduced a
deadlock. The actual solution is to reverse the order in which the UST
registry and the consumer lock nest: the UST registry will now to
responsible for serializing the registry content, and the consumer lock
will only protect communication with the consumer, as it should. This
deals with a TODO in the code.

The reason why this was not done from the beginning is that there was
originally an intent to make sure the ust registry lock is not held for
a long time, thus not while communicating with the consumer daemon.
However, when live has been implemented, it required communication with
the consumer daemon while the ust registry is held anyway. Therefore,
there is not much point anymore in trying to make sure this lock is not
held across the communication with consumerd in push_metadata. This
allows us to greatly simplify locking of the UST registry.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Conflicts:
src/bin/lttng-sessiond/ust-app.c
src/bin/lttng-sessiond/consumer.c
src/bin/lttng-sessiond/ust-app.c
src/bin/lttng-sessiond/ust-consumer.c
src/bin/lttng-sessiond/ust-registry.h
This page took 0.029588 seconds and 4 git commands to generate.