Fix: relayd: session trace chunk is copied too late
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 12 Nov 2019 04:38:25 +0000 (23:38 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 12 Nov 2019 22:01:02 +0000 (17:01 -0500)
In per-pid buffering mode, a viewer can attach to a session while it
is active and find it has been closed by the time it requests new
streams. The viewer session's trace chunk is created as a side-effect
of the "get_new_streams" command and can find that the relay_session's
trace chunk has now been closed, causing the creation of the viewer
session trace chunk to fail.

This results in an unexpected error being reported to the live client.
This fix moves the creation of the viewer session's trace chunk to the
"attach" command. If the creation fails, the session is reported as
being "unknown".

Reported-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Tested-by: Francis Deslauriers <francis.deslauriers@efficios.com>

No differences found
This page took 0.027409 seconds and 5 git commands to generate.