[lttng-dev] [PATCH lttng-tools 0/9] lttng-tools fixes

2019-05-03 Thread Mathieu Desnoyers
This is a series of fixes to the lttng-tools tests to properly teardown on ctrl-c. It also changes the uses of select() to the lttng poll compat layer. Thanks, Mathieu Mathieu Desnoyers (9): Improve handling of test SIGTERM/SIGINT Fix: tests: error handling in high throughput limits test F

[lttng-dev] [PATCH lttng-tools 9/9] sessiond: use epoll()/poll() instead of select()

2019-05-03 Thread Mathieu Desnoyers
The select(2) system call is an ancient ABI limited to processes containing at most FD_SETSIZE file descriptors overall (typically 1024). This select call will fail if the target file descriptor is above FD_SETSIZE in a session daemon containing many file descriptors. This is unlikely to happen in

[lttng-dev] [PATCH lttng-tools 3/9] Fix: utils.sh: handle SIGPIPE

2019-05-03 Thread Mathieu Desnoyers
perl prove closes its child pipes before giving it a chance to execute the signal trap handler. This means the child will not be able to complete execution of the trap handler if that handler writes to stdout or stderr. Work-around this situation by redirecting stdin, stdout, and stderr to /dev/nu

[lttng-dev] [PATCH lttng-tools 1/9] Improve handling of test SIGTERM/SIGINT

2019-05-03 Thread Mathieu Desnoyers
The current state of signal handling for test scripts is: on SIGTERM/SIGINT of the tests (e.g. a CTRL-C on the console), session daemon and relay daemon are killed with SIGKILL, thus leaking all their resources, and leaving lttng kernel modules loaded. Revamp the "stop" functions to take a signal

[lttng-dev] [PATCH lttng-tools 6/9] tests: invoke full_cleanup from script trap handlers, use modprobe -r

2019-05-03 Thread Mathieu Desnoyers
Scripts implementing their own trap handlers override the generic one provided by utils.sh (full_cleanup). Invoke it at the end of the handlers to provide the utils cleanup as well. Moreover, change use of "rmmod" to "modprobe -r", which is better in trap handlers because it does not print errors

[lttng-dev] [PATCH lttng-tools 8/9] lttng-ctl: notifications: use epoll()/poll() instead of select()

2019-05-03 Thread Mathieu Desnoyers
The select(2) system call is an ancient ABI limited to processes containing at most FD_SETSIZE file descriptors overall (typically 1024). Those notification APIs will fail if the target file descriptor is above FD_SETSIZE in a process containing many file descriptors. Never use select, use the lt

[lttng-dev] [PATCH lttng-tools 4/9] Fix: test: utils.sh: exit from process on full_cleanup

2019-05-03 Thread Mathieu Desnoyers
Signed-off-by: Mathieu Desnoyers --- tests/utils/utils.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index b8ac88c1..42e78d25 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -66,6 +66,7 @@ function full_cleanup () # The

[lttng-dev] [PATCH lttng-tools 2/9] Fix: tests: error handling in high throughput limits test

2019-05-03 Thread Mathieu Desnoyers
Each individual call to "tc" should be checked for error, else we may fail to catch specific tc errors caused, for instance, by a kernel configuration that only contains some of the required class modules. Also, invoke the utils.sh full_cleanup function from the script-specific interrupt_cleanup t

[lttng-dev] [PATCH lttng-tools 7/9] epoll/poll compat: expose interruptible API

2019-05-03 Thread Mathieu Desnoyers
Some use of the epoll/poll wrapper require interruption by signals to make the poll call return -1, errno EINTR. Expose a new lttng_poll_wait_interruptible API for this purpose. Signed-off-by: Mathieu Desnoyers CC: Yannick Lamarre --- src/common/compat/compat-epoll.c | 9 + src/common/

[lttng-dev] [PATCH lttng-tools 5/9] Cleanup: test: don't stop relayd twice

2019-05-03 Thread Mathieu Desnoyers
Signed-off-by: Mathieu Desnoyers --- tests/regression/tools/live/test_lttng_ust | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/regression/tools/live/test_lttng_ust b/tests/regression/tools/live/test_lttng_ust index 06017d01..830fc783 100755 --- a/tests/regression/too

[lttng-dev] [RELEASE] Babeltrace 2.0.0-pre5

2019-05-03 Thread Jérémie Galarneau
Hi everyone! We are happy to announce the release of Babeltrace 2.0.0-pre5. What's new since pre4? -- - New features -- Trace merging It is now possible to merge CTF traces that share the same UUID to a single CTF trace. This is especially useful when combined with the trac