From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>,
mingo@elte.hu, Peter Zijlstra <peterz@infradead.org>,
Andi Kleen <ak@linux.intel.com>,
Vince Weaver <vincent.weaver@maine.edu>
Subject: Re: [BUG] perf/inject: crash in pipe mode
Date: Sat, 26 May 2018 09:09:14 -0300 [thread overview]
Message-ID: <20180526120914.GA11944@redhat.com> (raw)
In-Reply-To: <CABPqkBRi5T2-hqgywLundiu=w1ekbjdAeKCrzRaUUrMSPSxvFw@mail.gmail.com>
Em Fri, May 25, 2018 at 05:19:54PM -0700, Stephane Eranian escreveu:
> Hi,
>
>
> With the latest tip.git perf, if you run
>
> $ perf record -a -o - sleep 2 | perf inject -b -i - | perf buildid-list -i -
> SEGFAULT in perf inject:
> free_dup_event (oe=0x555555d25b88, oe=0x555555d25b88,
> event=0x3030310931303031) at util/ordered-events.c:86
> 86 oe->cur_alloc_size -= event->header.size;
> (gdb) bt
> #0 free_dup_event (oe=0x555555d25b88, oe=0x555555d25b88,
> event=0x3030310931303031) at util/ordered-events.c:86
> #1 ordered_events__free (oe=oe@entry=0x555555d25b88) at
> util/ordered-events.c:310
> #2 0x00005555557964f8 in __perf_session__process_pipe_events
> (session=0x555555d1f910) at util/session.c:1778
> #3 perf_session__process_events (session=session@entry=0x555555d1f910) at
> util/session.c:1958
> #4 0x00005555556ef9b2 in __cmd_inject (inject=0x7fffffffda40) at
> builtin-inject.c:697
> #5 cmd_inject (argc=<optimized out>, argv=<optimized out>) at
> builtin-inject.c:871
> #6 0x000055555572e8b1 in run_builtin (p=0x555555be8f98 <commands+600>,
> argc=4, argv=0x7fffffffe460) at perf.c:303
> #7 0x000055555572ebae in handle_internal_command (argc=4,
> argv=0x7fffffffe460) at perf.c:355
> #8 0x00005555556ae1e1 in run_argv (argcp=<synthetic pointer>,
> argv=<synthetic pointer>) at perf.c:399
> #9 main (argc=<optimized out>, argv=0x7fffffffe460) at perf.c:521
>
> In general I think the pipe mode is not very well tested. I think it could
> be made the default file format. I believe perf can
> autodetect file vs. pipe mode perf.data using the header.size field. This
> would simplify a few things inside perf and ensure
> the pipe mode format is well tested.
I'll investigate and add a test in tools/perf/tests/shell/ so that it
gets tested before sending pull requests to upstreamers.
- Arnaldo
next prev parent reply other threads:[~2018-05-26 12:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-26 0:19 [BUG] perf/inject: crash in pipe mode Stephane Eranian
2018-05-26 12:09 ` Arnaldo Carvalho de Melo [this message]
2018-05-26 12:18 ` Arnaldo Carvalho de Melo
2018-05-29 18:07 ` Stephane Eranian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180526120914.GA11944@redhat.com \
--to=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=vincent.weaver@maine.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox