Fix context mismatch across UST version due to legacy array context field
Observed issue
==============
Tracing applications linked against both LTTng-UST 2.12.x and 2.13.1 in
the same session fails with:
"Error: Registering application channel due to context field mismatch"
for some applications with the "procname" context enabled.
Cause
=====
The procname context uses the legacy array field type prior to LTTng-UST
2.13, and uses the array_nestable field type starting from LTTng-UST
2.13. The field comparison in lttng-sessiond is unaware of the fact that
they map to the exact same binary trace layout and are therefore
compatible.
Solution
========
Introduce a new fixup function "ust_app_fixup_legacy_context_fields" in
lttng-sessiond for channel context fields, which detects the presence of
the legacy array, struct and variant types, and rewrites them as
array_nestable, struct_nestable, and variant_nestable types.
Reject the legacy sequence type in channel context fields because it is
not used by LTTng-UST 2.12 and older.
Rewriting those legacy context types as the new "nestable" types ensures
that field comparison functions will correctly handle a mix of 2.12 and
2.13 LTTng-UST tracers using a procname context to a given session's
channel.
Known Drawbacks
===============
None.
Fixes: fb2772932 ("Validate channel context mismatch across UST applications")
Change-Id: Ic51b92130ae8e1f7b510924f78ff46459dc2f578
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.026442 seconds and 4 git commands to generate.