lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 28 Jan 2015 17:37:56 -0500
From:	Jérémie Galarneau 
	<jeremie.galarneau@...icios.com>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	Alexandre Montplaisir <alexmonthy@...populi.im>,
	linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	David Ahern <dsahern@...il.com>,
	Dominique Toupin <dominique.toupin@...csson.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jeremie Galarneau <jgalar@...icios.com>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Namhyung Kim <namhyung@...il.com>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
	Tom Zanussi <tzanussi@...il.com>
Subject: Re: [PATCHv3 0/8] perf tools: Add perf data CTF conversion

On Sun, Jan 25, 2015 at 8:43 AM, Jiri Olsa <jolsa@...hat.com> wrote:
> On Fri, Jan 16, 2015 at 11:46:36AM -0500, Jérémie Galarneau wrote:
>> On Fri, Jan 16, 2015 at 10:26 AM, Alexandre Montplaisir
>> <alexmonthy@...populi.im> wrote:
>> > On 2015-01-15 03:57 PM, Alexandre Montplaisir wrote:
>> >>
>> >> Hi,
>> >>
>> >> I'm a developer for the Trace Compass tool (see links [3], [4] in Jiri's
>> >> email). I can confirm that the generated CTF can be read correctly by our
>> >> tool, which enables many views and analyses (Control Flow, CPU usage view,
>> >> etc.) that were previously only available for LTTng traces.
>> >>
>> >> Some of our users also use perf extensively, and are looking forward to
>> >> this feature! Is there any ETA as to when this will be merged upstream?
>> >>
>> >> Thanks,
>> >> Alexandre
>> >
>> >
>> > That was a bit too fast, it seems there are issues with very recent versions
>> > of Babeltrace. You can follow the discussion at
>> > http://lists.linuxfoundation.org/pipermail/diamon-discuss/2015-January/000007.html
>> >
>>
>> It's a regression introduced by a commit that was pushed to master
>> yesterday. I'm working on a fix.
>> In the meantime, testing against Babeltrace master 3baf0856 should be alright.
>
> even on this HEAD I'm still getting the 3rd issue I described in earlier email:
>
>     ---
>     the bt_ctf_trace_create_stream function tries to set ID on
>     stream_class which gets frozen just few moments ago in
>     bt_ctf_stream_create call..
>
>     this trigers failure and close up of stream fd which is not set yet:
>
>         if (close(stream->pos.fd)) {
>                 perror("close");
>         }
>
>     hence the 'close: Bad file descriptor' message
>     so this one looks like a bug to me, but we might be misusing the API also..
>     ---
>
> I need attached patch in perf code.. any idea?
>

I have merged a patch addressing this problem. Thanks for reporting!

commit 29d9d76c476cbf3fdf6fa709bfbdc24309974f06
Author: Jérémie Galarneau <jeremie.galarneau@...icios.com>
Date:   Wed Jan 28 16:52:28 2015 -0500

    Fix: lock stream class after assigning stream id

    Fixes a bug that was introduced by 2f100782 which made it possible
    to set custom stream class IDs.

    The stream class is frozen when a stream of its type is instanciated.
    However, the trace or writer must still assign a unique ID to the stream
    class if none were set prior. This modification moves the stream class
    locking (freeze) after the ID assignment check.

    Reported-by: Jiri Olsa <jolsa@...hat.com>
    Signed-off-by: Jérémie Galarneau <jeremie.galarneau@...icios.com>

Jérémie

> thanks,
> jirka
>
>
> ---
> diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
> index bdb493febff6..0d75e1ed348c 100644
> --- a/tools/perf/util/data-convert-bt.c
> +++ b/tools/perf/util/data-convert-bt.c
> @@ -960,6 +960,11 @@ static int ctf_writer__init(struct ctf_writer *cw, const char *path)
>                 goto err_cleanup;
>         }
>
> +       if (bt_ctf_stream_class_set_id(stream_class, 0)) {
> +               pr("Failed to set CTF stream class ID.\n");
> +               goto err_cleanup;
> +       }
> +
>         cw->stream_class = stream_class;
>
>         /* CTF clock stream setup */



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ