[lttng-dev] [PATCH lttng-tools] Fix: lttng-live: send HUP reply when per-PID streams are gone
Jérémie Galarneau
jeremie.galarneau at efficios.com
Sat May 6 19:50:02 UTC 2017
Merged, thanks!
Jérémie
On 2 May 2017 at 10:37, Mathieu Desnoyers
<mathieu.desnoyers at efficios.com> wrote:
> Currently, the "HUP" reply (hung up) is only sent when a session destroy
> is performed and all data has been sent. However, with per-pid buffers,
> application can come and go during the tracing session, so we need to
> send the HUP reply for each individual stream that is gone.
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
> src/bin/lttng-relayd/live.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c
> index 9e1085f..61acafe 100644
> --- a/src/bin/lttng-relayd/live.c
> +++ b/src/bin/lttng-relayd/live.c
> @@ -1174,10 +1174,13 @@ static int check_index_status(struct relay_viewer_stream *vstream,
> {
> int ret;
>
> - if (trace->session->connection_closed
> + if ((trace->session->connection_closed || rstream->closed)
> && rstream->index_received_seqcount
> == vstream->index_sent_seqcount) {
> - /* Last index sent and session connection is closed. */
> + /*
> + * Last index sent and session connection or relay
> + * stream are closed.
> + */
> index->status = htobe32(LTTNG_VIEWER_INDEX_HUP);
> goto hup;
> } else if (rstream->beacon_ts_end != -1ULL &&
> --
> 2.1.4
>
--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list