[lttng-dev] [PATCH babeltrace-1.5 3/6] Fix: lttng-live: lttng_live_open_trace_read memory leak

2019-12-04 Thread Mathieu Desnoyers
Signed-off-by: Mathieu Desnoyers --- formats/lttng-live/lttng-live-plugin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/formats/lttng-live/lttng-live-plugin.c b/formats/lttng-live/lttng-live-plugin.c index ed52a995..0bebdd89 100644 --- a/formats/lttng-live/lttng-live-plugin.c +++ b/forma

[lttng-dev] [PATCH babeltrace-1.5 0/6] Babeltrace 1.5 lttng-live with per-pid ust buffers

2019-12-04 Thread Mathieu Desnoyers
This series of fixes comes from testing babeltrace 1.5 lttng-live under valgrind with per-pid lttng buffers. This was done in the context of testing of the "lttng clear" feature. Thanks, Mathieu Mathieu Desnoyers (6): Fix: lttng-live: use-after-free in get_next_index() Fix: trace-collection:

[lttng-dev] [PATCH babeltrace-1.5 1/6] Fix: lttng-live: use-after-free in get_next_index()

2019-12-04 Thread Mathieu Desnoyers
Running babeltrace under valgrind with a test-cases doing per-pid lttng tracing in live mode triggers this use-after-free in get_next_index() when stream is hung up. Signed-off-by: Mathieu Desnoyers --- formats/lttng-live/lttng-live-comm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[lttng-dev] [PATCH babeltrace-1.5 2/6] Fix: trace-collection: trace clock use after free

2019-12-04 Thread Mathieu Desnoyers
The trace collection should copy the trace clock object rather than take a reference to the first trace's trace clock, because it may be freed when the trace is removed (e.g. application going away in per-pid live tracing). Signed-off-by: Mathieu Desnoyers --- lib/trace-collection.c | 21 +++

[lttng-dev] [PATCH babeltrace-1.5 4/6] Fix: lib/iterator.c: unbalanced ctx put (leak)

2019-12-04 Thread Mathieu Desnoyers
Missing context put in iterator init error path. Signed-off-by: Mathieu Desnoyers --- lib/iterator.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/iterator.c b/lib/iterator.c index 639a2d29..77093217 100644 --- a/lib/iterator.c +++ b/lib/iterator.c @@ -778,6 +778,8 @@ int bt_iter_in

[lttng-dev] [PATCH babeltrace-1.5 5/6] Fix: lttng-live: ctf_live_packet_seek stream hang up handling

2019-12-04 Thread Mathieu Desnoyers
When get_next_index sets the index position to EOF, ctf_live_packet_seek() should in turn set the stream position to EOF to propagate the hung up state. Signed-off-by: Mathieu Desnoyers --- formats/lttng-live/lttng-live-comm.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --gi

[lttng-dev] [PATCH babeltrace-1.5 6/6] Fix: lttng-live format: do not error out on empty streams hang up

2019-12-04 Thread Mathieu Desnoyers
Attaching to a stream hung up before providing any trace packet causes ctf_open_mmap_stream_read() to return an error. This kind of scenario can happen with the upcoming "lttng clear" feature. Signed-off-by: Mathieu Desnoyers --- formats/ctf/ctf.c | 7 ++- 1 file changed, 6 insertions(+), 1