lkml.org 
[lkml]   [2018]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: perf report segfault
Ok, I can reliably reproduce it by profiling the following program:

#include <math.h>

int main(int argc, char **argv)
{
int i;
double sum;

while (1) {
sum += exp(++i);
}

return 0;
}

compiled with:

$ cc -o test test.c -lm

with the following command:

$ perf record -F 99 -p 20016 --call-graph dwarf sleep 10

Tony
On Tue, Oct 9, 2018 at 1:54 PM Anthony LaTorre <tlatorre9@gmail.com> wrote:
>
> Can you reproduce the segfault from the perf.data file I provided?
>
> Tony
> On Tue, Oct 9, 2018 at 11:47 AM Jiri Olsa <jolsa@redhat.com> wrote:
> >
> > On Tue, Oct 09, 2018 at 11:27:04AM -0500, Anthony LaTorre wrote:
> > > Hi,
> > >
> > > I'm currently running Linux kernel 4.18.10-100.fc27.x86_64 and have a
> > > problem profiling a program that used to work. Currently when I
> > > profile the program with the following command:
> > >
> > > $ perf record -F 99 -p PID --call-graph dwarf sleep 10
> > >
> > > it produces a data file which causes perf report to segfault:
> > >
> > > $ perf report
> > > perf: Segmentation fault
> > > -------- backtrace --------
> > > perf(+0x325302)[0x55860ae79302]
> > > /lib64/libc.so.6(+0x347d0)[0x7fbc8f3987d0]
> > > perf(+0x273e80)[0x55860adc7e80]
> > > perf(unwind__get_entries+0x1d9)[0x55860ae4ace9]
> > > perf(thread__resolve_callchain+0xfd)[0x55860adce7dd]
> > > perf(sample__resolve_callchain+0x58)[0x55860adc45b8]
> > > perf(hist_entry_iter__add+0x98)[0x55860adfa908]
> > > perf(+0x1ab8d9)[0x55860acff8d9]
> > > perf(+0x280603)[0x55860add4603]
> > > perf(+0x283c63)[0x55860add7c63]
> > > perf(+0x280e04)[0x55860add4e04]
> > > perf(perf_session__process_events+0x8ae)[0x55860add6bee]
> > > perf(cmd_report+0x190f)[0x55860ad01a4f]
> > > perf(+0x21a961)[0x55860ad6e961]
> > > perf(+0x21ac6e)[0x55860ad6ec6e]
> > > perf(main+0x361)[0x55860ace8411]
> > > /lib64/libc.so.6(__libc_start_main+0xea)[0x7fbc8f384fea]
> > > perf(_start+0x2a)[0x55860ace889a]
> > >
> > > I've attached the data file which is causing the issue.
> > >
> > > The perf version is:
> > >
> > > $ perf --version
> > > perf version 4.18.10
> > >
> > > and I'm running Fedora 27 if that makes a difference.
> > >
> > > I've tried to reproduce with simpler programs so I could send a
> > > minimal working example, but it doesn't appear to cause the issue.
> >
> > please do, I can't reproduce this
> >
> > thanks,
> > jirka

\
 
 \ /
  Last update: 2018-10-09 22:19    [W:0.184 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site