lttng-tools:stable-2.10

Last commit made on 2020-04-16
Get this branch:
git clone -b stable-2.10 https://git.launchpad.net/lttng-tools

Branch merges

Branch information

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

Recent commits

ff64fe9... by =?utf-8?q?J=C3=A9r=C3=A9mie_Galarneau?= <email address hidden>

Update version to v2.10.11

Signed-off-by: Jérémie Galarneau <email address hidden>

7825f43... by Simon Marchi <email address hidden>

Fix: common: add `void` parameter to log_add_time declaration

It makes it match the definition and fixes this warning:

      CC error.lo
    /home/smarchi/src/lttng-tools/src/common/error.c:33:13: error: no previous prototype for ‘log_add_time’ [-Werror=missing-prototypes]
     const char *log_add_time(void)
                 ^~~~~~~~~~~~

Change-Id: Ibbf5eebd8171504bc7050c754e2a5d113b6b5387
Signed-off-by: Simon Marchi <email address hidden>
Signed-off-by: Jérémie Galarneau <email address hidden>

b2b6920... by =?utf-8?q?J=C3=A9r=C3=A9mie_Galarneau?= <email address hidden>

Fix: lttng-list: don't warn when the kernel domain has no channels

Some commands beside lttng-enable-channel have the side-effect of
creating a domain. For instance, the lttng-track and lttng-untrack
commands will implicitly create their target domains if they don't
exist. Thus, it is not unexpected for a domain to exist without
channels.

Currently, tracking process attributes in the user space and kernel
domains will result in a warning being printed when lttng-status
(or lttng-list `the_session`) is invoked.

Example output:
Tracing session arielle_bolduc: [inactive]
    Trace output: /home/jgalar/lttng-traces/arielle_bolduc-20200323-191128

=== Domain: Linux kernel ===

Tracked process attributes
  Process IDs: all
  Virtual Process IDs: 12365, 526, 41
  User IDs: all
  Virtual User IDs: all
  Group IDs: all
  Virtual Group IDs: all

Warning: No kernel channel
=== Domain: User space ===

Buffering scheme: per-user

Tracked process attributes
  Virtual Process IDs: 12365, 526, 41
  Virtual User IDs: all
  Virtual Group IDs: all

The warning is removed since it can only confuse users.

Signed-off-by: Jérémie Galarneau <email address hidden>
Change-Id: I733ee6c3d8c1d297194842c7bdbdf3f237661e51

8ea7fcf... by =?utf-8?q?J=C3=A9r=C3=A9mie_Galarneau?= <email address hidden>

Fix: sessiond: occasional badfd error on repeated SIGTERM

The session daemon occasionally prints the following messages
when it received multiple SIGTERM signals:

PERROR - 16:50:18.505585257 [49845/49845]: write poll pipe: Bad file
descriptor (in notify_thread_pipe() at utils.c:35)

This is caused by a (somewhat inevitable) race between the teardown of
the daemon and the closing of its quit pipe. This happens more often
when kernel modules take a long time to be unloaded and the user
spams ctrl+c in the hope of convincing the daemon process to close
faster since modules are unloaded after closing the quit pipe.

Setting closed pipe fds to '-1' is safe anyway and is already
handled by the notify_thread_pipe() util.

Signed-off-by: Jérémie Galarneau <email address hidden>
Change-Id: If08a455c65055dcb56ffbad3703173e6a45cfba5

7f9bbb9... by =?utf-8?q?J=C3=A9r=C3=A9mie_Galarneau?= <email address hidden>

Fix: lttng: incorrect domain list printed when no domain is provided

The following commands make use of a common utility function to
validate the count of domains specified and print an error when it
is invalid:
  - lttng-enable-event,
  - lttng-disable-event,
  - lttng-track,
  - lttng-untrack,
  - lttng-add-context,
  - lttng-enable-channel,
  - lttng-disable-channel.

Those commands do not allow the same domains to be used. In fact, they
all expect --kernel or --userspace only, except for the
lttng-enable-event, lttng-disable-event, and lttng-add-context
commands which allow the --log4j, --jul, and --python domain options
to be used.

Currently, the error message when no domain is specified is incorrect
for all of those commands. The error reads as follows:

`Error: Please specify a domain (-k/-u/-j).`

For most commands, the -j option cannot be used. For those that allow
agent domains, the message is missing the -l and -p domains.

This ensures that the expected domains are printed for each of those
commands.

Moreover, the message is clarified by using the long form option
names.

Signed-off-by: Jérémie Galarneau <email address hidden>
Change-Id: I45aee075dbf6c62c4120bdeb06697b88b2d8716c

eb895a7... by =?utf-8?q?J=C3=A9r=C3=A9mie_Galarneau?= <email address hidden>

Silence `POSIX Yacc` warnings

Flex/Bison warn that we make use of two non-POSIX directives,
%code and %define. Coincidentally, we don't use POSIX Yacc!

From the bison documentation, "[...] -Wno-yacc will hide the warnings
about POSIX Yacc incompatibilities." [1].

Thus, this flag is added to the YFLAGS.

  YACC filter-parser.c
/home/jgalar/EfficiOS/src/lttng-tools/src/lib/lttng-ctl/filter/filter-parser.y:293.1-5:
warning: POSIX Yacc does not support %code [-Wyacc]
  293 | %code provides
      | ^~~~~
/home/jgalar/EfficiOS/src/lttng-tools/src/lib/lttng-ctl/filter/filter-parser.y:301.1-7:
warning: POSIX Yacc does not support %define [-Wyacc]
  301 | %define api.pure
      | ^

[1] https://www.gnu.org/software/bison/manual/html_node/Diagnostics.html

Signed-off-by: Jérémie Galarneau <email address hidden>
Change-Id: Iaf65534bc47514d3a99b97ce414880a6afc723b9

aa0a9e9... by Francis Deslauriers <email address hidden>

Tests: Fix: `wait_on_file()` returns too early

Issue
=====
With the current implementation, when calling the `wait_on_file()`
function with the `file_exist` parameter set to false the function will
return even if the target file exists.

In a scenario where we enter the loop and the targer file exist, the
first call to `stat()` will return 0 and will not enter any of the `if`
and break from the loop directly.

Solution
========
If the file exists, only break from the loop if it's the desired exit
condition.

Signed-off-by: Francis Deslauriers <email address hidden>
Change-Id: Ia3e9c41a2a515815d3ff931d8f7c1c14a52b31ae
Signed-off-by: Jérémie Galarneau <email address hidden>

c70fe89... by Francis Deslauriers <email address hidden>

Fix: Tests: utils.sh: fix unbound variable

When loading `utils.sh`, we test the `LTTNG_TEST_TEARDOWN_TIMEOUT` and
define it to a default value if it's not defined already.

When running bash test scripts with the `-u` option to error out when
encountering unset variables it prints an error and exit

This commit uses a trick found here:
https://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash

Signed-off-by: Francis Deslauriers <email address hidden>
Change-Id: Id24937f974ffd1ab3250296499da9360f97d393d
Signed-off-by: Jérémie Galarneau <email address hidden>

4563f45... by Francis Deslauriers <email address hidden>

Tests: Fix typo: registerd -> registered

Signed-off-by: Francis Deslauriers <email address hidden>
Change-Id: I74f6956d732c41168dfdfa101c6fcad0af6ecebe
Signed-off-by: Jérémie Galarneau <email address hidden>

c8fe343... by Jonathan Rajotte

Fix: force the use of our _FORTIFY_SOURCE definition

Some toolset (ubuntu) already defined the _FORTIFY_SOURCE.

This removes the warning we see if this is the case. Unset the variable and
reset it.

The warning:

make[3]: Entering directory '/home/joraj/lttng/master/lttng-tools/tests/regression/kernel'
  CC select_poll_epoll-select_poll_epoll.o
<command-line>: warning: "_FORTIFY_SOURCE" redefined
<built-in>: note: this is the location of the previous definition
  CCLD select_poll_epoll

Signed-off-by: Jonathan Rajotte <email address hidden>
Change-Id: I2fa0482afa8941705a992f62a2e63657ea9e2b87
Signed-off-by: Jérémie Galarneau <email address hidden>