[lttng-dev] [PATCH lttng-tools] Fix: Fail to add several perf_thread context

Jérémie Galarneau jeremie.galarneau at efficios.com
Mon Nov 3 15:28:36 EST 2014


Hi Alexander,

Just to make sure I understand the problem, is your point that "lttng
add-context" should not fail when multiple contexts are added just
because one of them was already present? If not, could you provide a
log demonstrating the issue?

Thanks!
Jérémie

On Sat, Nov 1, 2014 at 7:14 PM, Alexander Grigoriev <alexgri at tbricks.com> wrote:
> In commit aa3514e96f12c13f681a81ea275dc51dd63473c8 not removed old check
> for duplicate context type in create_ust_app_channel_context() function. If
> the one of perf_tread contexts was already added, in the next
> similar operation function returns error code EEXIST "UST context
> already exist".
>
> Signed-off-by: Alexander Grigoriev <alexgri at tbricks.com>
> ---
>  src/bin/lttng-sessiond/ust-app.c | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c
> index f8e9693..7f1594b 100644
> --- a/src/bin/lttng-sessiond/ust-app.c
> +++ b/src/bin/lttng-sessiond/ust-app.c
> @@ -1940,13 +1940,6 @@ int create_ust_app_channel_context(struct ust_app_session *ua_sess,
>
>         DBG2("UST app adding context to channel %s", ua_chan->name);
>
> -       lttng_ht_lookup(ua_chan->ctx, (void *)((unsigned long)uctx->ctx), &iter);
> -       node = lttng_ht_iter_get_node_ulong(&iter);
> -       if (node != NULL) {
> -               ret = -EEXIST;
> -               goto error;
> -       }
> -
>         ua_ctx = alloc_ust_app_ctx(uctx);
>         if (ua_ctx == NULL) {
>                 /* malloc failed */
> --
> 1.9.1
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list