lttng-ust:stable-2.13

Last commit made on 2024-05-09
Get this branch:
git clone -b stable-2.13 https://git.launchpad.net/lttng-ust

Branch merges

Branch information

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

Recent commits

706227c... by Mathieu Desnoyers

ust-fd: Add close_range declaration

Old libc headers do not contain a declaration of close_range(). Emit our
own declaration to prevent compiler warnings.

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

8f17282... by Kienan Stewart <email address hidden>

docs: Correct GitHub URLs in lttng-ust.3

The branches follow the format `stable-X.YZ` rather than `vX.YZ`.

Furthermore, when rendering the man pages from source, the URLs were
omitted completely as the subsitution `{lttng_version}` was not
defined. This hasn't been an issue for the published HTML versions as
those are produced via a different script in the `lttng-www` project
which presumably sets the substitution properly.

Change-Id: Ib96c99df13ddf724e128f95e7ce7c74b2c10c766
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

2960600... by Mathieu Desnoyers

fix: handle EINTR correctly in get_cpu_mask_from_sysfs

If the read() in get_cpu_mask_from_sysfs() fails with EINTR, the code is
supposed to retry, but the while loop condition has (bytes_read > 0),
which is false when read() fails with EINTR. The result is that the code
exits the loop, having only read part of the string.

Use (bytes_read != 0) in the while loop condition instead, since the
(bytes_read < 0) case is already handled in the loop.

Original fix in liburcu from Benjamin Marzinski <email address hidden>:

  commit 9922f33e2986 ("fix: handle EINTR correctly in get_cpu_mask_from_sysfs")

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

5a8c530... by Mathieu Desnoyers

Version 2.13.8

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

d6fbc3f... by Mathieu Desnoyers

Add close_range wrapper to liblttng-ust-fd.so

glibc 2.34 implements close_range(2), which is used by the ssh client
(amongst others). This needs to be overridden to make sure ssh does not
close lttng-ust file descriptors.

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

9261aea... by Olivier Dion <email address hidden>

ust-tracepoint-event: Add static check of sequences length type

Enforce required unsigned type for length of sequence at compile time.

Change-Id: Ia8668a80eb0c0b81e8c03b208d7581e34af313fd
Signed-off-by: Olivier Dion <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

6088a1b... by Olivier Dion <email address hidden>

lttng-ust(3): Fix wrong len_type for sequence

`len_type' of a sequence field must be of type unsigned integer. Some
provided examples in the man page were incorrectly using a type signed
integer, resulting in correct compilation, but error while decoding.

Change-Id: Icc685b330d0704660b36f703075f453d71c5e4cb
Signed-off-by: Olivier Dion <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

5db715e... by Mathieu Desnoyers

Fix: libc wrapper: use initial-exec for malloc_nesting TLS

Use the initial-exec TLS model for the malloc_nesting nesting guard
variable to ensure that the glibc implementation of the TLS access don't
trigger infinite recursion by calling the memory allocator wrapper
functions, which can happen with global-dynamic.

Considering that the libc wrapper is meant to be loaded with LD_PRELOAD
anyway (never with dlopen(3)), we always expect the libc to have enough
space to hold the malloc_nesting variable.

In addition to change the malloc_nesting from global-dynamic to
initial-exec, this removes the URCU TLS compatibility layer from the
libc wrapper, which is a good thing: this compatibility layer relies
on pthread key and calloc internally, which makes it a bad fit for TLS
accesses guarding access to malloc wrappers, due to possible infinite
recursion.

Link: https://lists.lttng.org/pipermail/lttng-dev/2024-January/030697.html
Reported-by: Florian Weimer <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I72c42bc09c1a06e2922b184b85abeb9c94200ee2

04b0e69... by Mathieu Desnoyers

Version 2.13.7

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

e489457... by Kienan Stewart <email address hidden>

fix: invoke MKDIR_P before changing directories

In autoconf < 2.72d `AC_PROG_MKDIR_P` may fall back to using
`install-sh` and that may be referenced as a relative path.

To avoid issues with relative paths causing the command to not be
found, the build directories are created before changing the working
directory.

One way to to test the behaviour prior to this commit is to configure
the build similar to the following:

    ./configure MKDIR_P="$(realpath --relative-to="$(pwd)" \
    $(command -v mkdir))" BUILD_EXAMPLES_FROM_TREE=1

Fixes https://bugs.lttng.org/issues/1404

Change-Id: I2d66254cd8c208f9236d55c6ef1b83c580560c7c
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>