lttng-ust:stable-2.12

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

Branch merges

Branch information

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

Recent commits

8791c20... 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

5b46d90... 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>

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

d4126f5... by Mathieu Desnoyers

Version 2.12.10

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

26be141... 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

6b0c6b7... 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>

6d564f0... 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

32b9b7b... by Mathieu Desnoyers

Version 2.12.9

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

1a6b714... 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>

a299ee8... by Michael Jeanson <email address hidden>

fix: clean java inner class files in examples

Java classes that contain inner classes will result in additional class
files being created when compiled in the form of
'Class$InnerClass.class'. Expand the clean target to delete those
additional files.

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