diff options
author | wangmy <wangmy@fujitsu.com> | 2021-10-25 22:26:56 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-27 09:46:41 +0100 |
commit | 24df057854f010b796ce470fa25f11669dd9195a (patch) | |
tree | fc7ca5b7ac002048ee4888eb6635d11d2e02d584 /meta/recipes-kernel | |
parent | ddeb19361d7d7986609fd7035916950423b85f30 (diff) | |
download | poky-24df057854f010b796ce470fa25f11669dd9195a.tar.gz |
lttng-tools: upgrade 2.13.0 -> 2.13.1
2021-10-18 lttng-tools 2.13.1 (National Chocolate Cupcake Day)
Fix: ust: app stuck on recv message during UST comm timeout scenario
Fix: ust: UST communication can return -EAGAIN
Fix: ust: segfault on lttng start on filter bytecode copy
Fix: sessiond: previously created channel cannot be enabled
Build fix: Missing message in LTTNG_DEPRECATED invocation
Fix: notification-thread: handling event from a removed tracer event src
include: add missing "extern"
include: remove spurious spaces in condition/session-rotation.h
tests: fix header of regression/ust/getcpu-override/run-getcpu-override
fix: wrong define used for GCC version check
Fix: userspace-probe: unreported error on string copy error
Fix: userspace-probe: truncating binary path for SDT
Fix: lttng: add-trigger: don't provide a default event rule type
Fix: statements with side-effects in assert statements
Fix: lttng_trace_archive_location_serialize is called on freed memory
Fix: sessiond: ust session is inactive during ust_app_global_update
Fix: common: error query for trigger action protocol error
Fix: common: un-hide two rate policy functions
Fix: include: remove unneeded declaration of lttng_session_descriptor_get_session_name
Fix: Tests: race condition in test_ns_contexts_change
Fix: Tests: race condition in test_event_tracker
Fix: man: lttng-rotate: trace file count/size limitation does not apply
Fix: runas: less-than-zero comparison of an unsigned value
Fix: runas: supplementary groups are ignored on lttng save
Docs: lttng-event-rule(7): --exclude does not exist, use --exclude-name
sessiond: logging typo: {triger, triggger} -> trigger
Fix: lttng: free sessions in cmd_destroy
Fix: lttng: free domains and channels in get_session_stats_str
0001-Fix-Tests-race-condition-in-test_event_tracker.patch
0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch
are removed since they're included in 2.13.1
(From OE-Core rev: 9541cac079b0fa4961328f610e3df3ccf5316cea)
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-tools/0001-Fix-Tests-race-condition-in-test_event_tracker.patch | 221 | ||||
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch | 46 | ||||
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-tools_2.13.1.bb (renamed from meta/recipes-kernel/lttng/lttng-tools_2.13.0.bb) | 4 |
3 files changed, 1 insertions, 270 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-Tests-race-condition-in-test_event_tracker.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-Tests-race-condition-in-test_event_tracker.patch deleted file mode 100644 index 10020e1ecf..0000000000 --- a/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-Tests-race-condition-in-test_event_tracker.patch +++ /dev/null | |||
@@ -1,221 +0,0 @@ | |||
1 | From d3392e4850532c02e53e3c3ff1cc27df7e51c941 Mon Sep 17 00:00:00 2001 | ||
2 | From: Francis Deslauriers <francis.deslauriers@efficios.com> | ||
3 | Date: Tue, 7 Sep 2021 17:10:31 -0400 | ||
4 | Subject: [PATCH 1/2] Fix: Tests: race condition in test_event_tracker | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Background | ||
10 | ========== | ||
11 | The `test_event_tracker` file contains test cases when the event | ||
12 | generating app in executed in two distinct steps. Those two steps are | ||
13 | preparation and execution. | ||
14 | 1. the preparation is the launching the app in the background, and | ||
15 | 2. the execution is actually generating the event that should or | ||
16 | should not be traced depending on the test case. | ||
17 | |||
18 | This is useful to test the tracker feature since we want to ensure that | ||
19 | already running apps are notified properly when changing their tracking | ||
20 | status. | ||
21 | |||
22 | Issue | ||
23 | ===== | ||
24 | The `test_event_vpid_track_untrack` test case suffers from a race | ||
25 | condition that is easy to reproduce on Yocto. | ||
26 | |||
27 | The issue is that sometimes events are end up the trace when none is | ||
28 | expected. | ||
29 | |||
30 | This is due to the absence of synchronization point at the launch of the | ||
31 | app which leads to the app being scheduled in-between the track-untrack | ||
32 | calls leading to events being recorded to the trace. | ||
33 | |||
34 | It's easy to reproduce this issue on my machine by adding a `sleep 5` | ||
35 | between the track and untrack calls and setting the `NR_USEC_WAIT` | ||
36 | variable to 1. | ||
37 | |||
38 | Fix | ||
39 | === | ||
40 | Using the testapp `--sync-before-last-event-touch` flag to make the app | ||
41 | create a file when all but the last event are executed. We then have the | ||
42 | app wait until we create a file (`--sync-before-last-event`) to generate | ||
43 | that last event. This way, we are sure no event will be generated when | ||
44 | running the track and untrack commands. | ||
45 | |||
46 | Notes | ||
47 | ===== | ||
48 | - This issue affects other test cases in this file. | ||
49 | - This commit fixes a typo in the test header. | ||
50 | - This commit adds `diag` calls to help tracking to what test the output | ||
51 | relates to when reading the log. | ||
52 | |||
53 | Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com> | ||
54 | Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> | ||
55 | Change-Id: Ia2b68128dc9a805526f9748f31ec2c2d95566f31 | ||
56 | Upstream-Status: Backport | ||
57 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
58 | --- | ||
59 | .../tools/tracker/test_event_tracker | 56 ++++++++++++++----- | ||
60 | 1 file changed, 42 insertions(+), 14 deletions(-) | ||
61 | |||
62 | diff --git a/tests/regression/tools/tracker/test_event_tracker b/tests/regression/tools/tracker/test_event_tracker | ||
63 | index feb3787..cc0f698 100755 | ||
64 | --- a/tests/regression/tools/tracker/test_event_tracker | ||
65 | +++ b/tests/regression/tools/tracker/test_event_tracker | ||
66 | @@ -5,7 +5,7 @@ | ||
67 | # | ||
68 | # SPDX-License-Identifier: GPL-2.0-only | ||
69 | |||
70 | -TEST_DESC="LTTng - Event traker test" | ||
71 | +TEST_DESC="LTTng - Event tracker test" | ||
72 | |||
73 | CURDIR=$(dirname "$0")/ | ||
74 | TESTDIR="$CURDIR/../../.." | ||
75 | @@ -15,7 +15,7 @@ TESTAPP_KERNEL_NAME="gen-kernel-test-events" | ||
76 | TESTAPP_BIN="$TESTAPP_PATH/$TESTAPP_NAME/$TESTAPP_NAME" | ||
77 | TESTAPP_KERNEL_BIN="$TESTAPP_PATH/$TESTAPP_KERNEL_NAME/$TESTAPP_KERNEL_NAME" | ||
78 | SESSION_NAME="tracker" | ||
79 | -NR_ITER=100 | ||
80 | +NR_ITER=1 | ||
81 | NUM_GLOBAL_TESTS=2 | ||
82 | NUM_UST_TESTS=283 | ||
83 | NUM_KERNEL_TESTS=462 | ||
84 | @@ -30,27 +30,41 @@ SCRIPT_GROUPNAME="$(id -gn)" | ||
85 | |||
86 | CHILD_PID=-1 | ||
87 | WAIT_PATH= | ||
88 | -AFTER_FIRST_PATH= | ||
89 | -BEFORE_LAST_PATH= | ||
90 | +TOUCH_BEFORE_LAST_PATH= | ||
91 | +SYNC_BEFORE_LAST_PATH= | ||
92 | |||
93 | source $TESTDIR/utils/utils.sh | ||
94 | |||
95 | +# Launch the testapp and execute it up until right before the last event. It is | ||
96 | +# useful to do it in two seperate steps in order to test tracking and | ||
97 | +# untracking on an active app. | ||
98 | function prepare_ust_app | ||
99 | { | ||
100 | - AFTER_FIRST_PATH=$(mktemp --tmpdir -u tmp.${FUNCNAME[0]}_sync_after_first.XXXXXX) | ||
101 | - BEFORE_LAST_PATH=$(mktemp --tmpdir -u tmp.${FUNCNAME[0]}_sync_before_last.XXXXXX) | ||
102 | + TOUCH_BEFORE_LAST_PATH=$(mktemp --tmpdir -u tmp.${FUNCNAME[0]}_touch_before_last.XXXXXX) | ||
103 | + SYNC_BEFORE_LAST_PATH=$(mktemp --tmpdir -u tmp.${FUNCNAME[0]}_sync_before_last.XXXXXX) | ||
104 | + | ||
105 | + $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT \ | ||
106 | + --sync-before-last-event-touch "$TOUCH_BEFORE_LAST_PATH" \ | ||
107 | + --sync-before-last-event "$SYNC_BEFORE_LAST_PATH" & | ||
108 | |||
109 | - $TESTAPP_BIN -i $NR_ITER -w $NR_USEC_WAIT -a "$AFTER_FIRST_PATH" -b "$BEFORE_LAST_PATH" & | ||
110 | CHILD_PID=$! | ||
111 | + | ||
112 | + # Wait for the app to execute all the way to right before the last | ||
113 | + # event. | ||
114 | + while [ ! -f "${TOUCH_BEFORE_LAST_PATH}" ]; do | ||
115 | + sleep 0.5 | ||
116 | + done | ||
117 | } | ||
118 | |||
119 | +# Generate the last event. | ||
120 | function trace_ust_app | ||
121 | { | ||
122 | - touch "$BEFORE_LAST_PATH" | ||
123 | - wait | ||
124 | + # Ask the test app to generate the last event. | ||
125 | + touch "$SYNC_BEFORE_LAST_PATH" | ||
126 | + wait "$CHILD_PID" | ||
127 | ok $? "Traced application stopped." | ||
128 | - rm "$BEFORE_LAST_PATH" | ||
129 | - rm "$AFTER_FIRST_PATH" | ||
130 | + rm "$SYNC_BEFORE_LAST_PATH" | ||
131 | + rm "$TOUCH_BEFORE_LAST_PATH" | ||
132 | } | ||
133 | |||
134 | function prepare_kernel_app | ||
135 | @@ -64,7 +78,7 @@ function prepare_kernel_app | ||
136 | function trace_kernel_app | ||
137 | { | ||
138 | touch "$WAIT_PATH" | ||
139 | - wait | ||
140 | + wait "$CHILD_PID" | ||
141 | ok $? "Traced application stopped." | ||
142 | rm "$WAIT_PATH" | ||
143 | } | ||
144 | @@ -78,6 +92,8 @@ function test_event_tracker() | ||
145 | local tracker="$4" | ||
146 | local channel='' | ||
147 | |||
148 | + diag "${FUNCNAME[0]} $*" | ||
149 | + | ||
150 | trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX) | ||
151 | |||
152 | create_lttng_session_ok $SESSION_NAME "$trace_path" | ||
153 | @@ -117,6 +133,8 @@ function test_event_vpid_tracker() | ||
154 | local wildcard="$3" | ||
155 | local channel='' | ||
156 | |||
157 | + diag "${FUNCNAME[0]} $*" | ||
158 | + | ||
159 | trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX) | ||
160 | |||
161 | create_lttng_session_ok $SESSION_NAME "$trace_path" | ||
162 | @@ -160,6 +178,8 @@ function test_event_pid_tracker() | ||
163 | local wildcard="$3" | ||
164 | local channel='' | ||
165 | |||
166 | + diag "${FUNCNAME[0]} $*" | ||
167 | + | ||
168 | trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX) | ||
169 | |||
170 | create_lttng_session_ok $SESSION_NAME "$trace_path" | ||
171 | @@ -203,6 +223,8 @@ function test_event_tracker_fail() | ||
172 | local wildcard="$2" | ||
173 | local tracker="$3" | ||
174 | |||
175 | + diag "${FUNCNAME[0]} $*" | ||
176 | + | ||
177 | trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX) | ||
178 | |||
179 | create_lttng_session_ok $SESSION_NAME "$trace_path" | ||
180 | @@ -222,6 +244,8 @@ function test_event_track_untrack() | ||
181 | local tracker="$4" | ||
182 | local channel='' | ||
183 | |||
184 | + diag "${FUNCNAME[0]} $*" | ||
185 | + | ||
186 | trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX) | ||
187 | |||
188 | create_lttng_session_ok $SESSION_NAME "$trace_path" | ||
189 | @@ -262,6 +286,8 @@ function test_event_vpid_track_untrack() | ||
190 | local wildcard="$3" | ||
191 | local channel='' | ||
192 | |||
193 | + diag "${FUNCNAME[0]} $*" | ||
194 | + | ||
195 | trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX) | ||
196 | |||
197 | create_lttng_session_ok $SESSION_NAME "$trace_path" | ||
198 | @@ -302,6 +328,8 @@ function test_event_pid_track_untrack() | ||
199 | local wildcard="$3" | ||
200 | local channel='' | ||
201 | |||
202 | + diag "${FUNCNAME[0]} $*" | ||
203 | + | ||
204 | trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX) | ||
205 | |||
206 | create_lttng_session_ok $SESSION_NAME "$trace_path" | ||
207 | @@ -336,9 +364,9 @@ function test_event_pid_track_untrack() | ||
208 | |||
209 | function test_event_ust_vpid_untrack_snapshot() | ||
210 | { | ||
211 | - local trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX) | ||
212 | + diag "${FUNCNAME[0]} $*" | ||
213 | |||
214 | - diag "Test_event_ust_vpid_untrack_snapshot" | ||
215 | + local trace_path=$(mktemp --tmpdir -d tmp.${FUNCNAME[0]}_trace_path.XXXXXX) | ||
216 | |||
217 | create_lttng_session_ok $SESSION_NAME "$trace_path" "--snapshot" | ||
218 | |||
219 | -- | ||
220 | 2.20.1 | ||
221 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch b/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch deleted file mode 100644 index a8d983105a..0000000000 --- a/meta/recipes-kernel/lttng/lttng-tools/0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From d284752e616dfc4c9288be3bb21c04ea78cdd967 Mon Sep 17 00:00:00 2001 | ||
2 | From: Francis Deslauriers <francis.deslauriers@efficios.com> | ||
3 | Date: Wed, 8 Sep 2021 10:16:23 -0400 | ||
4 | Subject: [PATCH 2/2] Fix: Tests: race condition in test_ns_contexts_change | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Issue | ||
10 | ===== | ||
11 | The test script doesn't wait for the test application to complete before | ||
12 | stopping the tracing session. The race is that depending on the | ||
13 | scheduling the application is not always done generating events when the | ||
14 | session is stopped. | ||
15 | |||
16 | Fix | ||
17 | === | ||
18 | Make the test script wait for the termination of the test app before | ||
19 | stopping the session. | ||
20 | |||
21 | Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com> | ||
22 | Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> | ||
23 | Change-Id: I29d9b41d2a2ed60a6c42020509c2067442ae332c | ||
24 | Upstream-Status: Backport | ||
25 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
26 | --- | ||
27 | tests/regression/ust/namespaces/test_ns_contexts_change | 3 +++ | ||
28 | 1 file changed, 3 insertions(+) | ||
29 | |||
30 | diff --git a/tests/regression/ust/namespaces/test_ns_contexts_change b/tests/regression/ust/namespaces/test_ns_contexts_change | ||
31 | index c0af15e..8a4b62c 100755 | ||
32 | --- a/tests/regression/ust/namespaces/test_ns_contexts_change | ||
33 | +++ b/tests/regression/ust/namespaces/test_ns_contexts_change | ||
34 | @@ -79,6 +79,9 @@ function test_ns() | ||
35 | |||
36 | touch "$file_sync_before_last" | ||
37 | |||
38 | + # Wait for the test app to generate all expected events and exit. | ||
39 | + wait $app_pid | ||
40 | + | ||
41 | # stop and destroy | ||
42 | stop_lttng_tracing_ok "$session_name" | ||
43 | destroy_lttng_session_ok "$session_name" | ||
44 | -- | ||
45 | 2.20.1 | ||
46 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.13.0.bb b/meta/recipes-kernel/lttng/lttng-tools_2.13.1.bb index 1491aff618..063d8e8c2d 100644 --- a/meta/recipes-kernel/lttng/lttng-tools_2.13.0.bb +++ b/meta/recipes-kernel/lttng/lttng-tools_2.13.1.bb | |||
@@ -37,11 +37,9 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ | |||
37 | file://lttng-sessiond.service \ | 37 | file://lttng-sessiond.service \ |
38 | file://determinism.patch \ | 38 | file://determinism.patch \ |
39 | file://0001-src-common-correct-header-location.patch \ | 39 | file://0001-src-common-correct-header-location.patch \ |
40 | file://0001-Fix-Tests-race-condition-in-test_event_tracker.patch \ | ||
41 | file://0002-Fix-Tests-race-condition-in-test_ns_contexts_change.patch \ | ||
42 | " | 40 | " |
43 | 41 | ||
44 | SRC_URI[sha256sum] = "8dc894f9a7a840e943c1c344345c75f001a9529daa9157f1a0e6175c081c29e6" | 42 | SRC_URI[sha256sum] = "cfe6df7da831fc07fd07ce46b442c2ec1074c167af73f3a1b1d2fba0c453c8b5" |
45 | 43 | ||
46 | inherit autotools ptest pkgconfig useradd python3-dir manpages systemd | 44 | inherit autotools ptest pkgconfig useradd python3-dir manpages systemd |
47 | 45 | ||