Bug #1190
closedlttng ust statedump unreliable when used with taskset
100%
Description
While trying to create a trace with events only a single cpu I tried to used taskset
and witnessed that lttng_ust_statedump
events are sometimes missing.
I was able to reproduce this issue with the follow commands:
lttng create lttng enable-event -a -u lttng start taskset -c 0 ~/lttng-tools/tests/utils/testapp/gen-ust-nevents/gen-ust-nevents 2 lttng stop lttng view
When running those commands multiple times in loop I see lttng_ust_statedump
events only 1 in 20 runs. All other runs only contain the event directly produced by the app. The lttng_ust_statedump
should be emitted every time a UST app is launched.
Updated by Francis Deslauriers almost 5 years ago
This problem doesn't occur when the app in running with strace
such as:
strace taskset -c 0 ~/lttng-tools/tests/utils/testapp/gen-ust-nevents/gen-ust-nevents 2
Updated by Mathieu Desnoyers almost 5 years ago
I think we need to tweak lttng-ust's constructor_wait semaphore. e.g.:
initialize it to 4,
handle_pending_statedump now depends on ctor_passed <= 2 to execute,
handle_pending_statedump now also posts the semaphore.
This should ensure we postpone main's execution until the statedump is done. Important for short-lived apps, and could explain the issue here.
Updated by Mathieu Desnoyers almost 5 years ago
- Project changed from LTTng-tools to LTTng-UST
Updated by Gabriel Guilbert over 4 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset lttng-ust|eb0e6022d5e2621e0e0e50076ebe014c4e639411.