Fix: filter attach vs event enable race
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 12 Nov 2014 23:08:04 +0000 (18:08 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 12 Nov 2014 23:15:55 +0000 (18:15 -0500)
commit353c9dc0b929bf980baabc384ac6a15d1fe856ea
treed9e8947596ebb57fea754705c17491e01bd428fc
parentf336dfb6fab57a78abf36ee83fa2818338aaa680
Fix: filter attach vs event enable race

In order to correctly handle the use-case where events are enabled
_after_ trace is started, and _after_ applications are already being
traced, the event should be created in a "disabled" state, so that it
does not trace events until its filter is attached.

This fix needs to be done both in lttng-tools and lttng-ust. In order to
keep ABI compatibility between tools and ust within a stable release
cycle, we introduce a new "disabled" within struct lttng_ust_event
padding (previously zeroed). Newer LTTng-UST checks this flag, and
fallback on the old racy behavior (enabling the event on creation) if it
is unset.

Therefore, old session daemon works with newer lttng-ust of the same
stable release, and vice-versa. However, building lttng-tools requires
an upgraded lttng-ust, which contains the communication protocol with
the new "disabled" field.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-abi.h
liblttng-ust-ctl/ustctl.c
liblttng-ust/lttng-events.c
This page took 0.025151 seconds and 4 git commands to generate.