Re: perf-4.8.0-rc3: Segmentation fault

From: Arnaldo Carvalho de Melo
Date: Mon Aug 29 2016 - 16:02:47 EST


Em Mon, Aug 29, 2016 at 11:44:50AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Aug 25, 2016 at 01:49:41PM +0300, Alexey Dobriyan escreveu:
> > I profiled kernel allmodconfig build (don't ask) and perf tui reliably
> > segfaults when trying to enter annotation mode for any of the
> > individual functions. It segfaults immediately before even showing
> > menu with choices.
> >
> > perf: Segmentation fault
> > -------- backtrace --------
> > perf[0x5451fb]
> > /lib64/libc.so.6(+0x33290)[0x7fcec0a80290]
> > perf(__map__is_kernel+0x26)[0x4bbcd6]
> > perf[0x54287c]
> > perf(perf_evlist__tui_browse_hists+0x94)[0x543e84]
> > perf(cmd_report+0x1a34)[0x434884]
> > perf[0x478471]
> > perf(main+0x6c6)[0x4237e6]
> > /lib64/libc.so.6(__libc_start_main+0xf0)[0x7fcec0a6d630]
> > perf(_start+0x29)[0x4238e9]
> >
> > Steps to reproduce:
> > rm -rf ../xxx
> > mkdir ../xxx
> > make O=../xxx ARCH=x86_64 allmodconfig
> > perf record -e cycles make O=../xxx -k -j5
> > perf report
> >
> > perf.data is 1.23 GB long , so be prepared.
>
> Thanks for the report, trying to reproduce this.

So, I built the kernel with my normal .config, using your command line and got:

[acme@jouet linux]$ perf report --header-only perf.data
# ========
# captured on: Mon Aug 29 15:48:10 2016
# hostname : jouet
# os release : 4.8.0-rc3+
# perf version : 4.8.rc2.g21a116
# arch : x86_64
# nrcpus online : 4
# nrcpus avail : 4
# cpudesc : Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
# cpuid : GenuineIntel,6,61,4
# total memory : 7869032 kB
# cmdline : /home/acme/bin/perf record -e cycles make O=../build/v4.8.0-rc4 -j -j5
# event : name = cycles:u, , size = 112, { sample_period, sample_freq } = 4000, sample_type = IP|TID|TIME|PERIOD, disabled = 1, inherit = 1, exclude_kernel =
# HEADER_CPU_TOPOLOGY info available, use -I to display
# HEADER_NUMA_TOPOLOGY info available, use -I to display
# pmu mappings: intel_pt = 7, intel_bts = 6, uncore_arb = 12, cstate_pkg = 15, breakpoint = 5, uncore_cbox_1 = 11, power = 13, cpu = 4, software = 1, uncore_i
# HEADER_CACHE info available, use -I to display
# ========
#

But it didn't crash:

[acme@jouet linux]$ ls -lah perf.data
-rw-------. 1 acme acme 1.8G Aug 29 13:00 perf.data
[acme@jouet linux]$

[acme@jouet linux]$ perf --version
perf version 4.8.rc4.g3eab88

And this was with:

[acme@jouet linux]$ git log --oneline | head -5
3eab887a5542 Linux 4.8-rc4
25d0d91af770 Merge tag 'drm-fixes-for-4.8-rc4' of git://people.freedesktop.org/~airlied/linux
add1fa751012 drm/atomic: Don't potentially reset color_mgmt_changed on successive property updates.
908e373f1c81 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
5d84ee796448 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[acme@jouet linux]$

I.e. 4.8-rc4 from git.

- Arnaldo

- Arnaldo