Hi, Note that the restriction to prevent an add-context command on a started session is not present in 2.10.2. It is present starting at 2.10.3.
joraj@~/lttng/stable-2.10/lttng-tools [(v2.10.7)][]$ git tag --contains 3aaf55eaa5aee2db6e2a1a46685e45f2395fc15b v2.10.3 v2.10.4 v2.10.5 v2.10.6 v2.10.7 This would explain why you can issue the commands in the order you are issuing them currently (add-context after start). lttng create csim_session_rpup -o /tmp/csim_session_rpup lttng enable-event -u lttng start csim_session_rpup lttng add-context -u -t vpid lttng track -u -s csim_session_rpup --all To comply with this without upgrading, you can swap the order of the add-context and start command. commands: lttng create lttng enable-event -u ... lttng add-context -u -t vpid lttng start lttng track ... I did some experiment using v2.10.2 to reproduce the issue. I used the same sequence of commands you provided: lttng create csim_session_rpup -o /tmp/csim_session_rpup lttng enable-event -u lttng start csim_session_rpup lttng add-context -u -t vpid lttng track -u -s csim_session_rpup --all At first, I tried a scenario where the only instrumented (registered) app is run after the add-context. No other instrumented apps were running at the moment the "lttng start" was issued. The trace produced contained the vpid context. What happen if an instrumented app is already running when the "lttng start" command is issued? The "lttng add-context" does not report any problem yet the resulting trace does not contain any vpid context. In the lttng-sessiond logs we see that the add-context command failed for the app: DEBUG2 - 11:19:43.718781 [9499/9506]: UST app adding context to channel channel0 (in create_ust_app_channel_context() at ust-app.c:2357) DEBUG3 - 11:19:43.718784 [9499/9506]: UST app context 1 allocated (in alloc_ust_app_ctx() at ust-app.c:1146) Error: UST app create channel context failed for app (pid: 7350) with ret -1028 Error: Failed to add context to channel channel0 The first scenario works because we delay the setup of the channel until an app eligible for tracing is present. That should be it. Cheers -- Jonathan Rajotte-Julien EfficiOS _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev