lttng-ust:stable-2.10

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

Branch merges

Branch information

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

Recent commits

f5630de... 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>

b404c54... 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>

58bd2e4... by Mathieu Desnoyers on 2019-10-17

Version 2.10.6

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

b6c0b19... 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>

54b348a... by Mathieu Desnoyers on 2019-10-11

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

This reverts commit ee6b2e664563927c55539f6a5190d7281ef47c3b.

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

ee6b2e6... 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

5932ab6... 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>

c97a0b6... 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>

791bf27... by Mathieu Desnoyers on 2019-10-04

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>

f975e2d... by .eepp on 2018-05-22

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>