lttng-ust:stable-2.11

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

Branch merges

Branch information

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

Recent commits

a39fd86... by Mathieu Desnoyers on 2019-10-22

Fix: uninitialized variable in lib_ring_buffer_reserve_committed

This internal function implemented in libringbuffer is not used within
lttng-ust actually, but uses an uninitialized variable:

As reported by clang:

        ./frontend_internal.h:263:75: warning: variable 'idx' is uninitialized when used here [-Wuninitialized]
                struct commit_counters_hot *cc_hot = shmp_index(handle, buf->commit_hot, idx);
                                                                                         ^~~
        ./shm.h:74:86: note: expanded from macro 'shmp_index'
                        ____ptr_ret = (__typeof__(____ptr_ret)) _shmp_offset((handle)->table, &(ref)._ref, index, sizeof(*____ptr_ret)); \
                                                                                                           ^~~~~
        ./frontend_internal.h:262:27: note: initialize the variable 'idx' to silence this warning
                unsigned long offset, idx, commit_count;
                                         ^
                                          = 0
        In file included from ring_buffer_backend.c:29:
        In file included from ./backend.h:33:
        ./frontend_internal.h:263:75: warning: variable 'idx' is uninitialized when used here [-Wuninitialized]
                struct commit_counters_hot *cc_hot = shmp_index(handle, buf->commit_hot, idx);
                                                                                         ^~~
        ./shm.h:74:86: note: expanded from macro 'shmp_index'
                        ____ptr_ret = (__typeof__(____ptr_ret)) _shmp_offset((handle)->table, &(ref)._ref, index, sizeof(*____ptr_ret)); \
                                                                                                           ^~~~~
        ./frontend_internal.h:262:27: note: initialize the variable 'idx' to silence this warning
                unsigned long offset, idx, commit_count;
                                         ^
                                          = 0

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

e3097de... by Michael Jeanson <email address hidden> on 2019-10-21

Fix: document proper liburcu version dependency

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

0acead7... by Michael Jeanson <email address hidden> on 2019-10-21

Fix: Add missing files to distribution

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

a2d048f... by Mathieu Desnoyers on 2019-10-17

Version 2.11.0

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

5d80279... by Mathieu Desnoyers on 2019-10-11

Version 2.11.0-rc5

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

4ed2629... by Mathieu Desnoyers on 2019-10-07

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>

82192e5... by Mathieu Desnoyers on 2019-10-11

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

This reverts commit 01be959de2f1879fcd54a47a74ff443e2ef12f90.

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

01be959... by Mathieu Desnoyers on 2019-10-07

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

8ca5fb4... by Mathieu Desnoyers on 2019-10-04

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>

c838629... by Mathieu Desnoyers on 2019-10-04

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>