All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] perf report core dump
@ 2011-06-10 23:15 Arun Sharma
  2011-06-11 16:24 ` Sam Liao
  0 siblings, 1 reply; 3+ messages in thread
From: Arun Sharma @ 2011-06-10 23:15 UTC (permalink / raw)
  To: linux-perf-users; +Cc: Sam Liao


This happens only with --tui. --stdio is ok for some strange reason.

Core was generated by `perf report -g fractal 0.5 caller --sort pid'.
Program terminated with signal 11, Segmentation fault.
#0  symbol__inc_addr_samples (sym=0xacf360, map=<value optimized out>, 
evidx=0, addr=179753205) at util/annotate.c:71
71      util/annotate.c: No such file or directory.
         in util/annotate.c
(gdb) bt
#0  symbol__inc_addr_samples (sym=0xacf360, map=<value optimized out>, 
evidx=0, addr=179753205) at util/annotate.c:71
#1  0x000000000040ec7a in process_sample_event (event=<value optimized 
out>, sample=0x7fff5a631400, evsel=0x7cbed0, session=0x7ca2c0)
     at builtin-report.c:92
#2  0x000000000043e8a4 in __perf_session__process_events 
(session=0x7ca2c0, data_offset=<value optimized out>, data_size=<value 
optimized out>,
     file_size=7730296, ops=0x689340) at util/session.c:511
#3  0x000000000043ee0a in perf_session__process_events (self=0x7ca2c0, 
ops=0x689340) at util/session.c:1117
#4  0x000000000040ef40 in cmd_report (argc=0, argv=<value optimized 
out>, prefix=<value optimized out>) at builtin-report.c:272
#5  0x000000000040565b in handle_internal_command (argc=5, 
argv=0x7fff5a632830) at perf.c:286
(gdb) x /i $rip
0x41e3cd <symbol__inc_addr_samples+173>:        mov    0x8(%rdx,%rcx,8),%rax
(gdb) p /x addr - sym->start
$9 = 0xffffffffdc290285

util/annotate.c

  68         offset = addr - sym->start;
  69         h = annotation__histogram(notes, evidx);
  70         h->sum++;
  71         h->addr[offset]++;

Not sure why offset is negative here. We might need some extra checks.

  -Arun

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] perf report core dump
  2011-06-10 23:15 [BUG] perf report core dump Arun Sharma
@ 2011-06-11 16:24 ` Sam Liao
  2011-06-13 20:16   ` Arun Sharma
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Liao @ 2011-06-11 16:24 UTC (permalink / raw)
  To: Arun Sharma; +Cc: linux-perf-users

On Sat, Jun 11, 2011 at 7:15 AM, Arun Sharma <asharma@fb.com> wrote:
>
> This happens only with --tui. --stdio is ok for some strange reason.
>
> Core was generated by `perf report -g fractal 0.5 caller --sort pid'.
> Program terminated with signal 11, Segmentation fault.
> #0  symbol__inc_addr_samples (sym=0xacf360, map=<value optimized out>,
> evidx=0, addr=179753205) at util/annotate.c:71
> 71      util/annotate.c: No such file or directory.
>        in util/annotate.c
> (gdb) bt
> #0  symbol__inc_addr_samples (sym=0xacf360, map=<value optimized out>,
> evidx=0, addr=179753205) at util/annotate.c:71
> #1  0x000000000040ec7a in process_sample_event (event=<value optimized out>,
> sample=0x7fff5a631400, evsel=0x7cbed0, session=0x7ca2c0)
>    at builtin-report.c:92
> #2  0x000000000043e8a4 in __perf_session__process_events (session=0x7ca2c0,
> data_offset=<value optimized out>, data_size=<value optimized out>,
>    file_size=7730296, ops=0x689340) at util/session.c:511
> #3  0x000000000043ee0a in perf_session__process_events (self=0x7ca2c0,
> ops=0x689340) at util/session.c:1117
> #4  0x000000000040ef40 in cmd_report (argc=0, argv=<value optimized out>,
> prefix=<value optimized out>) at builtin-report.c:272
> #5  0x000000000040565b in handle_internal_command (argc=5,
> argv=0x7fff5a632830) at perf.c:286
> (gdb) x /i $rip
> 0x41e3cd <symbol__inc_addr_samples+173>:        mov    0x8(%rdx,%rcx,8),%rax
> (gdb) p /x addr - sym->start
> $9 = 0xffffffffdc290285
>
> util/annotate.c
>
>  68         offset = addr - sym->start;
>  69         h = annotation__histogram(notes, evidx);
>  70         h->sum++;
>  71         h->addr[offset]++;
>
> Not sure why offset is negative here. We might need some extra checks.
>
>  -Arun
>

I noticed similar error, but It seems it leads by the "-s pid" option
instead added "caller/callee" specifier. Remove this patch, symptom
also showed up.

I made some debug, and find the root cause is that the hist->ms.sym
has no relationship with sample's al.sym when we group sampels with
only "-s pid", so we can not compare the addr with
hist->ms.sym.start/end. if you run the program with ./perf -s
pid,symbol, then it's okay. I think here is another bug we need fix.
(or, maybe we can't do annotation when group samples without symbol)


-Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] perf report core dump
  2011-06-11 16:24 ` Sam Liao
@ 2011-06-13 20:16   ` Arun Sharma
  0 siblings, 0 replies; 3+ messages in thread
From: Arun Sharma @ 2011-06-13 20:16 UTC (permalink / raw)
  To: Sam Liao; +Cc: linux-perf-users

On 6/11/11 9:24 AM, Sam Liao wrote:

> I noticed similar error, but It seems it leads by the "-s pid" option
> instead added "caller/callee" specifier. Remove this patch, symptom
> also showed up.

Yes - the bug doesn't seem to be caused by your patch, but it affects 
the primary use case with  -g graph,0.5,caller --sort pid.

builtin-report.c:

         /*
          * Only in the newt browser we are doing integrated annotation,
          * so we don't allocated the extra space needed because the stdio
          * code will not use it.
          */
         if (al->sym != NULL && use_browser > 0) {

makes it clear why it hits the --tui case, but not --stdio. I'll 
probably just disable this code path for now, until there is a better 
solution.

  -Arun

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-06-13 20:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-10 23:15 [BUG] perf report core dump Arun Sharma
2011-06-11 16:24 ` Sam Liao
2011-06-13 20:16   ` Arun Sharma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.