Fix: lttng-live: send HUP reply when per-PID streams are gone
A message that is not in the archive (sent off-list or not yet received): [email protected]
Jérémie Galarneau
AppliedMerged, thanks!
Jérémie
Quoted 33 lines · Mathieu Desnoyers
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 <[email protected]>--- src/bin/lttng-relayd/live.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)src/bin/lttng-relayd/live.c +5
-3@@ -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
Signature · 7 lines
Jérémie Galarneau EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev