[lttng-dev] [PATCH lttng-modules] Fix: use proper pid_ns in the process statedump

2018-02-21 Thread Michael Jeanson
The pid_ns we currently use from the nsproxy struct is not the task's pid_ns but the one that children of this task will use. As stated in include/linux/nsproxy.h : The pid namespace is an exception -- it's accessed using task_active_pid_ns. The pid namespace here is the namespace that chi

[lttng-dev] [PATCH lttng-tools] Fix: Use SOL_SOCKET level for SO_KEEPALIVE on all platform

2018-02-21 Thread Jonathan Rajotte
COMPAT_SOCKET_LEVEL is not needed. Should not have been there in the first place. On Linux, the setsockopt for SO_KEEPALIVE would result in an actual call to: setsockopt(22, SOL_TCP, TCP_DEFER_ACCEPT, [1], 4) Signed-off-by: Jonathan Rajotte --- src/bin/lttng-relayd/tcp_keep_alive.c | 5 +---

Re: [lttng-dev] [PATCH lttng-modules] Fix: use proper pid_ns in the process statedump

2018-02-21 Thread Mathieu Desnoyers
merged into master, 2.10, 2.9, thanks! Mathieu - On Feb 21, 2018, at 4:36 PM, Michael Jeanson mjean...@efficios.com wrote: > The pid_ns we currently use from the nsproxy struct is not the task's > pid_ns but the one that children of this task will use. > > As stated in include/linux/nsproxy

Re: [lttng-dev] [PATCH lttng-tools] Fix: Use SOL_SOCKET level for SO_KEEPALIVE on all platform

2018-02-21 Thread Mathieu Desnoyers
- On Feb 21, 2018, at 4:40 PM, Jonathan Rajotte jonathan.rajotte-jul...@efficios.com wrote: > COMPAT_SOCKET_LEVEL is not needed. Should not have been > there in the first place. This changelog is incomplete. It should state that the linux wrapper had a bug: it mixed up SOL_SOCKET with SOL_TC

[lttng-dev] [PATCH lttng-tools v2] Fix: error out on leftover arguments

2018-02-21 Thread Julien Desfossez
All the commands currently ignore leftover arguments, this can lead to wrong usage of the commands and waste of time debugging. For example, this command enables the vpid context on all channels instead of only on the "mychan" channel: $ lttng add-context -u mychan -t vpid The correct usage is: $

[lttng-dev] [PATCH lttng-tools v2] Fix: Use SOL_SOCKET level for SO_KEEPALIVE on all platform

2018-02-21 Thread Jonathan Rajotte
On Linux, COMPAT_SOCKET_LEVEL was set to SOL_TCP instead of SOL_SOCKET, this resulted in execution of: setsockopt(..., SOL_TCP, TCP_DEFER_ACCEPT, ...) Instead of: setsockopt(..., SOL_SOCKET, SO_KEEPALIVE, ...) Hence, TCP keep alive was not enabled. COMPAT_SOCKET_LEVEL is not needed. All

[lttng-dev] [PATCH lttng-ust] Fix: destructors do not run on probe provider dlclose

2018-02-21 Thread Francis Deslauriers
Calling dlclose on a probe provider library does not unregister the probes from the callsites as the destructors are not executed. The __tracepoints__disable_destructors weak symbol was exposed by probe providers, liblttng-ust.so and liblttng-ust-tracepoint.so libraries. If a probe provider was lo