Fix: sessiond: don't allocate buffers and files for inactive sessions
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 19 Nov 2018 21:13:58 +0000 (16:13 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 12 Dec 2018 19:23:25 +0000 (14:23 -0500)
commit0498a00cbc6b5b40609016d0c5e695cd50efc01f
treeff022b06c3026874b95492941d7bb27cb76a8a1c
parentbb2452c85ee39c793838f637f830620b0603dc7d
Fix: sessiond: don't allocate buffers and files for inactive sessions

When tracing is inactive (before start/after stop), the current behavior
is to track all applications registered as UST data producers and
allocate buffers and files.

However, we guarantee that the trace is readable (invariant) after a
"stop" command has waited for data pending to complete. Unfortunately,
tracking additional applications (and adding their files) after tracing
is stopped (for each pid in per-pid buffers, for new uid in per-uid
buffers) does not respect this guarantee.

Fix this by *not* allocating channels, events, contexts when tracing
is inactive, but rather allocate those lazily just before tracing
starts.

One reason why this was not originally done was to ensure we could
have a fast start command. There are however other ways to achieve this
in the future that will respect the stop invariant guarantees.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-app.c
This page took 0.026541 seconds and 5 git commands to generate.