lttng-ust:stable-2.9

Last commit made on 2019-10-17
Get this branch:
git clone -b stable-2.9 https://git.launchpad.net/lttng-ust

Branch merges

Branch information

Name:
stable-2.9
Repository:
lp:lttng-ust

Recent commits

1a90cb6... by Mathieu Desnoyers

Version 2.9.7

Signed-off-by: Mathieu Desnoyers <email address hidden>

c216b58... by Mathieu Desnoyers

Fix: lttng perf counter deadlock

Using the ust_lock() to lazily setup the perf counters introduces
a scenario where this lock is nested within the urcu-bp read-side
lock.

However, the LTTNG_UST_WAIT_QUIESCENT ust command requires that
urcu-bp synchronize_rcu() is performed with the ust_lock() held.

This inter-dependency introduces a deadlock:

Thread A Thread B

rcu_read_lock()
                                  ust_lock()
                                  synchronize_rcu() (blocked by rcu
                                                     read-side lock)
ust_lock() <-- deadlock

Introduce a new lttng_perf_lock to protect the lttng perf context
data structures from concurrent modifications and from fork. This
lock can be nested within the ust_lock, but never the opposite.

This removes the circular locking dependency involving urcu bp.

Fixes: #1202
Signed-off-by: Mathieu Desnoyers <email address hidden>

71ac53c... by Mathieu Desnoyers

Revert "Fix: fd tracker: do not allow signal handlers to close lttng-ust FDs"

This reverts commit 8691397af304ca1d25170e04fab54a123362b90e.

Fixes: #1204
Signed-off-by: Mathieu Desnoyers <email address hidden>

8691397... by Mathieu Desnoyers

Fix: fd tracker: do not allow signal handlers to close lttng-ust FDs

Split the thread_fd_tracking state from the ust_fd_mutex_nest used to
track whether a signal handler is nested over a fd tracker lock.

lttng-ust listener threads need to invoke
lttng_ust_fd_tracker_register_thread() so the fd tracker can
distinguish them from application threads.

Otherwise, using ust_fd_mutex_nest to try to distinguish between
ust and application threads makes it possible for signal handlers
to appear as if they are ust listener threads, and thus attempt to
close UST file descriptors.

Signed-off-by: Mathieu Desnoyers <email address hidden>
Fixes: #1199

b3ed6b5... by Mathieu Desnoyers

Fix: fd tracker: provide async-signal-safety for close wrapper

close(3) is part of the async-signal-safe functions. Therefore, it is
expected that the close wrapper provided by liblttng-ust-fd-tracker
behaves in a async-signal-safe way.

Use a similar strategy as ust_lock() does: disable signals when taking
and releasing the lock, and keep track of nesting with a TLS variable.
This ensures signals are restored to their original state when close(3)
ends up being invoked.

Fixes: #1199
Signed-off-by: Mathieu Desnoyers <email address hidden>

8385a01... by Mathieu Desnoyers

Fix: Disable cancellation around fd tracker lock

When using the ust fd tracker LD_PRELOAD library (liblttng-ust-fd.so),
cancelling other threads while they issue "close()" leads to deadlocks.

Fixes: #1201
Signed-off-by: Mathieu Desnoyers <email address hidden>

5734905... by Mathieu Desnoyers

Fix: Lock FD tracker across fork

If fork() is performed while other threads are holding the fd tracker
lock, it will stay in locked state in the child process and eventually
cause a deadlock.

One way to solve this is to hold the fd tracker lock across fork(), in
the same way we do for the ust_lock. This ensures no other threads are
holding that lock in the parent, and therefore provides a consistent
lock state in the child.

Fixes: #1199
Fixes: #1200
Signed-off-by: Mathieu Desnoyers <email address hidden>

9197e7e... by .eepp

doc/man: include build version in GitHub links

Linking to master branch files on GitHub is not safe because files could
be renamed, whereas the layout stays the same for a given version tag.

Signed-off-by: Philippe Proulx <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

2e16161... by Maxime SORIN <email address hidden>

Check if the AR environment variable exists for cross compilation

Signed-off-by: Maxime SORIN <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

de51628... by Mathieu Desnoyers

Version 2.9.6

Signed-off-by: Mathieu Desnoyers <email address hidden>