linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: perf seg fault
       [not found] <0cad7834-07b4-ec2f-13b5-d6a10b21ce48@intel.com>
@ 2020-05-12 14:58 ` Adrian Hunter
  2020-05-12 15:10   ` Jiri Olsa
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian Hunter @ 2020-05-12 14:58 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Jiri Olsa, LKML

Forgot to cc mailing list

On 12/05/20 5:50 pm, Adrian Hunter wrote:
> Hi
> 
> I am getting a seg fault from your perf/core branch, as follows:
> 
> # perf record uname
> Linux
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.005 MB perf.data (7 samples) ]
> perf: Segmentation fault
> Obtained 6 stack frames.
> [0x4e75b4]
> [0x5d1ad0]
> [0x5c9860]
> [0x4a6e5c]
> [0x5cb39b]
> [0x76c89f]
> Segmentation fault
> 
> It goes away with --no-bpf-event:
> 
> # perf record --no-bpf-event uname
> Linux
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.005 MB perf.data (7 samples) ]
> #
> 
> kernel is from the same branch
> 
> # uname -a
> Linux buildroot 5.7.0-rc2-00028-g0fdddf5a583a #165 SMP Tue May 12 16:27:53
> EEST 2020 x86_64 GNU/Linux
> 
> # perf version --build-options
> perf version 5.6.g0fdddf5a583a
>                  dwarf: [ OFF ]  # HAVE_DWARF_SUPPORT
>     dwarf_getlocations: [ OFF ]  # HAVE_DWARF_GETLOCATIONS_SUPPORT
>                  glibc: [ on  ]  # HAVE_GLIBC_SUPPORT
>                   gtk2: [ OFF ]  # HAVE_GTK2_SUPPORT
>          syscall_table: [ on  ]  # HAVE_SYSCALL_TABLE_SUPPORT
>                 libbfd: [ on  ]  # HAVE_LIBBFD_SUPPORT
>                 libelf: [ on  ]  # HAVE_LIBELF_SUPPORT
>                libnuma: [ OFF ]  # HAVE_LIBNUMA_SUPPORT
> numa_num_possible_cpus: [ OFF ]  # HAVE_LIBNUMA_SUPPORT
>                libperl: [ OFF ]  # HAVE_LIBPERL_SUPPORT
>              libpython: [ OFF ]  # HAVE_LIBPYTHON_SUPPORT
>               libslang: [ on  ]  # HAVE_SLANG_SUPPORT
>              libcrypto: [ on  ]  # HAVE_LIBCRYPTO_SUPPORT
>              libunwind: [ OFF ]  # HAVE_LIBUNWIND_SUPPORT
>     libdw-dwarf-unwind: [ OFF ]  # HAVE_DWARF_SUPPORT
>                   zlib: [ OFF ]  # HAVE_ZLIB_SUPPORT
>                   lzma: [ OFF ]  # HAVE_LZMA_SUPPORT
>              get_cpuid: [ on  ]  # HAVE_AUXTRACE_SUPPORT
>                    bpf: [ OFF ]  # HAVE_LIBBPF_SUPPORT
>                    aio: [ on  ]  # HAVE_AIO_SUPPORT
>                   zstd: [ OFF ]  # HAVE_ZSTD_SUPPORT
> 
> 
> Any thoughts?
> 
> Regards
> Adrian
> 
> 


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

* Re: perf seg fault
  2020-05-12 14:58 ` perf seg fault Adrian Hunter
@ 2020-05-12 15:10   ` Jiri Olsa
  2020-05-12 15:41     ` Arnaldo Carvalho de Melo
  2020-05-12 15:45     ` Adrian Hunter
  0 siblings, 2 replies; 6+ messages in thread
From: Jiri Olsa @ 2020-05-12 15:10 UTC (permalink / raw)
  To: Adrian Hunter; +Cc: Arnaldo Carvalho de Melo, LKML

On Tue, May 12, 2020 at 05:58:29PM +0300, Adrian Hunter wrote:
> Forgot to cc mailing list
> 
> On 12/05/20 5:50 pm, Adrian Hunter wrote:
> > Hi
> > 
> > I am getting a seg fault from your perf/core branch, as follows:
> > 
> > # perf record uname
> > Linux
> > [ perf record: Woken up 1 times to write data ]
> > [ perf record: Captured and wrote 0.005 MB perf.data (7 samples) ]
> > perf: Segmentation fault
> > Obtained 6 stack frames.
> > [0x4e75b4]
> > [0x5d1ad0]
> > [0x5c9860]
> > [0x4a6e5c]
> > [0x5cb39b]
> > [0x76c89f]
> > Segmentation fault
> > 
> > It goes away with --no-bpf-event:
> > 
> > # perf record --no-bpf-event uname
> > Linux
> > [ perf record: Woken up 1 times to write data ]
> > [ perf record: Captured and wrote 0.005 MB perf.data (7 samples) ]
> > #
> > 
> > kernel is from the same branch
> > 
> > # uname -a
> > Linux buildroot 5.7.0-rc2-00028-g0fdddf5a583a #165 SMP Tue May 12 16:27:53
> > EEST 2020 x86_64 GNU/Linux
> > 
> > # perf version --build-options
> > perf version 5.6.g0fdddf5a583a
> >                  dwarf: [ OFF ]  # HAVE_DWARF_SUPPORT
> >     dwarf_getlocations: [ OFF ]  # HAVE_DWARF_GETLOCATIONS_SUPPORT
> >                  glibc: [ on  ]  # HAVE_GLIBC_SUPPORT
> >                   gtk2: [ OFF ]  # HAVE_GTK2_SUPPORT
> >          syscall_table: [ on  ]  # HAVE_SYSCALL_TABLE_SUPPORT
> >                 libbfd: [ on  ]  # HAVE_LIBBFD_SUPPORT
> >                 libelf: [ on  ]  # HAVE_LIBELF_SUPPORT
> >                libnuma: [ OFF ]  # HAVE_LIBNUMA_SUPPORT
> > numa_num_possible_cpus: [ OFF ]  # HAVE_LIBNUMA_SUPPORT
> >                libperl: [ OFF ]  # HAVE_LIBPERL_SUPPORT
> >              libpython: [ OFF ]  # HAVE_LIBPYTHON_SUPPORT
> >               libslang: [ on  ]  # HAVE_SLANG_SUPPORT
> >              libcrypto: [ on  ]  # HAVE_LIBCRYPTO_SUPPORT
> >              libunwind: [ OFF ]  # HAVE_LIBUNWIND_SUPPORT
> >     libdw-dwarf-unwind: [ OFF ]  # HAVE_DWARF_SUPPORT
> >                   zlib: [ OFF ]  # HAVE_ZLIB_SUPPORT
> >                   lzma: [ OFF ]  # HAVE_LZMA_SUPPORT
> >              get_cpuid: [ on  ]  # HAVE_AUXTRACE_SUPPORT
> >                    bpf: [ OFF ]  # HAVE_LIBBPF_SUPPORT
> >                    aio: [ on  ]  # HAVE_AIO_SUPPORT
> >                   zstd: [ OFF ]  # HAVE_ZSTD_SUPPORT
> > 
> > 
> > Any thoughts?

hum, I don't see that, do you reproduce with DEBUG=1?
to get more verbose backtrace

jirka


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

* Re: perf seg fault
  2020-05-12 15:10   ` Jiri Olsa
@ 2020-05-12 15:41     ` Arnaldo Carvalho de Melo
  2020-05-12 15:45     ` Adrian Hunter
  1 sibling, 0 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-05-12 15:41 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: Adrian Hunter, LKML

Em Tue, May 12, 2020 at 05:10:43PM +0200, Jiri Olsa escreveu:
> On Tue, May 12, 2020 at 05:58:29PM +0300, Adrian Hunter wrote:
> > Forgot to cc mailing list
> > 
> > On 12/05/20 5:50 pm, Adrian Hunter wrote:
> > > Hi
> > > 
> > > I am getting a seg fault from your perf/core branch, as follows:
> > > 
> > > # perf record uname
> > > Linux
> > > [ perf record: Woken up 1 times to write data ]
> > > [ perf record: Captured and wrote 0.005 MB perf.data (7 samples) ]
> > > perf: Segmentation fault
> > > Obtained 6 stack frames.
> > > [0x4e75b4]
> > > [0x5d1ad0]
> > > [0x5c9860]
> > > [0x4a6e5c]
> > > [0x5cb39b]
> > > [0x76c89f]
> > > Segmentation fault
> > > 
> > > It goes away with --no-bpf-event:
> > > 
> > > # perf record --no-bpf-event uname
> > > Linux
> > > [ perf record: Woken up 1 times to write data ]
> > > [ perf record: Captured and wrote 0.005 MB perf.data (7 samples) ]
> > > #
> > > 
> > > kernel is from the same branch
> > > 
> > > # uname -a
> > > Linux buildroot 5.7.0-rc2-00028-g0fdddf5a583a #165 SMP Tue May 12 16:27:53
> > > EEST 2020 x86_64 GNU/Linux
> > > 
> > > # perf version --build-options
> > > perf version 5.6.g0fdddf5a583a
> > >                  dwarf: [ OFF ]  # HAVE_DWARF_SUPPORT
> > >     dwarf_getlocations: [ OFF ]  # HAVE_DWARF_GETLOCATIONS_SUPPORT
> > >                  glibc: [ on  ]  # HAVE_GLIBC_SUPPORT
> > >                   gtk2: [ OFF ]  # HAVE_GTK2_SUPPORT
> > >          syscall_table: [ on  ]  # HAVE_SYSCALL_TABLE_SUPPORT
> > >                 libbfd: [ on  ]  # HAVE_LIBBFD_SUPPORT
> > >                 libelf: [ on  ]  # HAVE_LIBELF_SUPPORT
> > >                libnuma: [ OFF ]  # HAVE_LIBNUMA_SUPPORT
> > > numa_num_possible_cpus: [ OFF ]  # HAVE_LIBNUMA_SUPPORT
> > >                libperl: [ OFF ]  # HAVE_LIBPERL_SUPPORT
> > >              libpython: [ OFF ]  # HAVE_LIBPYTHON_SUPPORT
> > >               libslang: [ on  ]  # HAVE_SLANG_SUPPORT
> > >              libcrypto: [ on  ]  # HAVE_LIBCRYPTO_SUPPORT
> > >              libunwind: [ OFF ]  # HAVE_LIBUNWIND_SUPPORT
> > >     libdw-dwarf-unwind: [ OFF ]  # HAVE_DWARF_SUPPORT
> > >                   zlib: [ OFF ]  # HAVE_ZLIB_SUPPORT
> > >                   lzma: [ OFF ]  # HAVE_LZMA_SUPPORT
> > >              get_cpuid: [ on  ]  # HAVE_AUXTRACE_SUPPORT
> > >                    bpf: [ OFF ]  # HAVE_LIBBPF_SUPPORT


Humm, maybe this?

make -C tools clean
rm -rf /tmp/build/perf
mkdir -p /tmp/build/perf
make -C tools/perf O=/tmp/build/perf install-bin

[root@five ~]# perf -vv
perf version 5.7.rc2.g2dbd8814c26b
                 dwarf: [ on  ]  # HAVE_DWARF_SUPPORT
    dwarf_getlocations: [ on  ]  # HAVE_DWARF_GETLOCATIONS_SUPPORT
                 glibc: [ on  ]  # HAVE_GLIBC_SUPPORT
                  gtk2: [ on  ]  # HAVE_GTK2_SUPPORT
         syscall_table: [ on  ]  # HAVE_SYSCALL_TABLE_SUPPORT
                libbfd: [ on  ]  # HAVE_LIBBFD_SUPPORT
                libelf: [ on  ]  # HAVE_LIBELF_SUPPORT
               libnuma: [ on  ]  # HAVE_LIBNUMA_SUPPORT
numa_num_possible_cpus: [ on  ]  # HAVE_LIBNUMA_SUPPORT
               libperl: [ on  ]  # HAVE_LIBPERL_SUPPORT
             libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
              libslang: [ on  ]  # HAVE_SLANG_SUPPORT
             libcrypto: [ on  ]  # HAVE_LIBCRYPTO_SUPPORT
             libunwind: [ on  ]  # HAVE_LIBUNWIND_SUPPORT
    libdw-dwarf-unwind: [ on  ]  # HAVE_DWARF_SUPPORT
                  zlib: [ on  ]  # HAVE_ZLIB_SUPPORT
                  lzma: [ on  ]  # HAVE_LZMA_SUPPORT
             get_cpuid: [ on  ]  # HAVE_AUXTRACE_SUPPORT
                   bpf: [ OFF ]  # HAVE_LIBBPF_SUPPORT
                   aio: [ on  ]  # HAVE_AIO_SUPPORT
                  zstd: [ on  ]  # HAVE_ZSTD_SUPPORT
[root@five ~]# perf record uname
Linux
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.029 MB perf.data (7 samples) ]
perf: Segmentation fault
Obtained 6 stack frames.
perf(sighandler_dump_stack+0x3e) [0x4fc7be]
/lib64/libc.so.6(+0x3c6af) [0x7f073b8a16af]
perf(perf_mmap__read_init+0x20) [0x5d9570]
perf() [0x4c7758]
/lib64/libpthread.so.0(+0x94e1) [0x7f073c28a4e1]
/lib64/libc.so.6(clone+0x42) [0x7f073b9666a2]
Segmentation fault (core dumped)
[root@five ~]#

?

> > >                    aio: [ on  ]  # HAVE_AIO_SUPPORT
> > >                   zstd: [ OFF ]  # HAVE_ZSTD_SUPPORT
> > > 
> > > 
> > > Any thoughts?
> 
> hum, I don't see that, do you reproduce with DEBUG=1?
> to get more verbose backtrace

[root@five ~]# uname -a
Linux five 5.7.0-rc2 #1 SMP Tue Apr 21 11:06:25 -03 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@five ~]# perf record uname
Linux
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.030 MB perf.data (7 samples) ]
[root@five ~]# uname -a
Linux five 5.7.0-rc2 #1 SMP Tue Apr 21 11:06:25 -03 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@five ~]#

[root@five ~]# uname -a
Linux five 5.7.0-rc2 #1 SMP Tue Apr 21 11:06:25 -03 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@five ~]# perf -vv
perf version 5.7.rc2.g2dbd8814c26b
                 dwarf: [ on  ]  # HAVE_DWARF_SUPPORT
    dwarf_getlocations: [ on  ]  # HAVE_DWARF_GETLOCATIONS_SUPPORT
                 glibc: [ on  ]  # HAVE_GLIBC_SUPPORT
                  gtk2: [ on  ]  # HAVE_GTK2_SUPPORT
         syscall_table: [ on  ]  # HAVE_SYSCALL_TABLE_SUPPORT
                libbfd: [ on  ]  # HAVE_LIBBFD_SUPPORT
                libelf: [ on  ]  # HAVE_LIBELF_SUPPORT
               libnuma: [ on  ]  # HAVE_LIBNUMA_SUPPORT
numa_num_possible_cpus: [ on  ]  # HAVE_LIBNUMA_SUPPORT
               libperl: [ on  ]  # HAVE_LIBPERL_SUPPORT
             libpython: [ on  ]  # HAVE_LIBPYTHON_SUPPORT
              libslang: [ on  ]  # HAVE_SLANG_SUPPORT
             libcrypto: [ on  ]  # HAVE_LIBCRYPTO_SUPPORT
             libunwind: [ on  ]  # HAVE_LIBUNWIND_SUPPORT
    libdw-dwarf-unwind: [ on  ]  # HAVE_DWARF_SUPPORT
                  zlib: [ on  ]  # HAVE_ZLIB_SUPPORT
                  lzma: [ on  ]  # HAVE_LZMA_SUPPORT
             get_cpuid: [ on  ]  # HAVE_AUXTRACE_SUPPORT
                   bpf: [ on  ]  # HAVE_LIBBPF_SUPPORT
                   aio: [ on  ]  # HAVE_AIO_SUPPORT
                  zstd: [ on  ]  # HAVE_ZSTD_SUPPORT
[root@five ~]#

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

* Re: perf seg fault
  2020-05-12 15:10   ` Jiri Olsa
  2020-05-12 15:41     ` Arnaldo Carvalho de Melo
@ 2020-05-12 15:45     ` Adrian Hunter
  2020-05-12 15:55       ` Jiri Olsa
  1 sibling, 1 reply; 6+ messages in thread
From: Adrian Hunter @ 2020-05-12 15:45 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: Arnaldo Carvalho de Melo, LKML

On 12/05/20 6:10 pm, Jiri Olsa wrote:
> On Tue, May 12, 2020 at 05:58:29PM +0300, Adrian Hunter wrote:
>> Forgot to cc mailing list
>>
>> On 12/05/20 5:50 pm, Adrian Hunter wrote:
>>> Hi
>>>
>>> I am getting a seg fault from your perf/core branch, as follows:
>>>
>>> # perf record uname
>>> Linux
>>> [ perf record: Woken up 1 times to write data ]
>>> [ perf record: Captured and wrote 0.005 MB perf.data (7 samples) ]
>>> perf: Segmentation fault
>>> Obtained 6 stack frames.
>>> [0x4e75b4]
>>> [0x5d1ad0]
>>> [0x5c9860]
>>> [0x4a6e5c]
>>> [0x5cb39b]
>>> [0x76c89f]
>>> Segmentation fault
>>>
>>> It goes away with --no-bpf-event:
>>>
>>> # perf record --no-bpf-event uname
>>> Linux
>>> [ perf record: Woken up 1 times to write data ]
>>> [ perf record: Captured and wrote 0.005 MB perf.data (7 samples) ]
>>> #
>>>
>>> kernel is from the same branch
>>>
>>> # uname -a
>>> Linux buildroot 5.7.0-rc2-00028-g0fdddf5a583a #165 SMP Tue May 12 16:27:53
>>> EEST 2020 x86_64 GNU/Linux
>>>
>>> # perf version --build-options
>>> perf version 5.6.g0fdddf5a583a
>>>                  dwarf: [ OFF ]  # HAVE_DWARF_SUPPORT
>>>     dwarf_getlocations: [ OFF ]  # HAVE_DWARF_GETLOCATIONS_SUPPORT
>>>                  glibc: [ on  ]  # HAVE_GLIBC_SUPPORT
>>>                   gtk2: [ OFF ]  # HAVE_GTK2_SUPPORT
>>>          syscall_table: [ on  ]  # HAVE_SYSCALL_TABLE_SUPPORT
>>>                 libbfd: [ on  ]  # HAVE_LIBBFD_SUPPORT
>>>                 libelf: [ on  ]  # HAVE_LIBELF_SUPPORT
>>>                libnuma: [ OFF ]  # HAVE_LIBNUMA_SUPPORT
>>> numa_num_possible_cpus: [ OFF ]  # HAVE_LIBNUMA_SUPPORT
>>>                libperl: [ OFF ]  # HAVE_LIBPERL_SUPPORT
>>>              libpython: [ OFF ]  # HAVE_LIBPYTHON_SUPPORT
>>>               libslang: [ on  ]  # HAVE_SLANG_SUPPORT
>>>              libcrypto: [ on  ]  # HAVE_LIBCRYPTO_SUPPORT
>>>              libunwind: [ OFF ]  # HAVE_LIBUNWIND_SUPPORT
>>>     libdw-dwarf-unwind: [ OFF ]  # HAVE_DWARF_SUPPORT
>>>                   zlib: [ OFF ]  # HAVE_ZLIB_SUPPORT
>>>                   lzma: [ OFF ]  # HAVE_LZMA_SUPPORT
>>>              get_cpuid: [ on  ]  # HAVE_AUXTRACE_SUPPORT
>>>                    bpf: [ OFF ]  # HAVE_LIBBPF_SUPPORT
>>>                    aio: [ on  ]  # HAVE_AIO_SUPPORT
>>>                   zstd: [ OFF ]  # HAVE_ZSTD_SUPPORT
>>>
>>>
>>> Any thoughts?
> 
> hum, I don't see that, do you reproduce with DEBUG=1?
> to get more verbose backtrace

It will require a kernel with support for bpf events otherwise the
--no-bpf-event option would have no effect.

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

* Re: perf seg fault
  2020-05-12 15:45     ` Adrian Hunter
@ 2020-05-12 15:55       ` Jiri Olsa
  2020-05-12 16:17         ` Adrian Hunter
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Olsa @ 2020-05-12 15:55 UTC (permalink / raw)
  To: Adrian Hunter; +Cc: Arnaldo Carvalho de Melo, LKML

On Tue, May 12, 2020 at 06:45:24PM +0300, Adrian Hunter wrote:
> On 12/05/20 6:10 pm, Jiri Olsa wrote:
> > On Tue, May 12, 2020 at 05:58:29PM +0300, Adrian Hunter wrote:
> >> Forgot to cc mailing list
> >>
> >> On 12/05/20 5:50 pm, Adrian Hunter wrote:
> >>> Hi
> >>>
> >>> I am getting a seg fault from your perf/core branch, as follows:
> >>>
> >>> # perf record uname
> >>> Linux
> >>> [ perf record: Woken up 1 times to write data ]
> >>> [ perf record: Captured and wrote 0.005 MB perf.data (7 samples) ]
> >>> perf: Segmentation fault
> >>> Obtained 6 stack frames.
> >>> [0x4e75b4]
> >>> [0x5d1ad0]
> >>> [0x5c9860]
> >>> [0x4a6e5c]
> >>> [0x5cb39b]
> >>> [0x76c89f]
> >>> Segmentation fault
> >>>
> >>> It goes away with --no-bpf-event:
> >>>
> >>> # perf record --no-bpf-event uname
> >>> Linux
> >>> [ perf record: Woken up 1 times to write data ]
> >>> [ perf record: Captured and wrote 0.005 MB perf.data (7 samples) ]
> >>> #
> >>>
> >>> kernel is from the same branch
> >>>
> >>> # uname -a
> >>> Linux buildroot 5.7.0-rc2-00028-g0fdddf5a583a #165 SMP Tue May 12 16:27:53
> >>> EEST 2020 x86_64 GNU/Linux
> >>>
> >>> # perf version --build-options
> >>> perf version 5.6.g0fdddf5a583a
> >>>                  dwarf: [ OFF ]  # HAVE_DWARF_SUPPORT
> >>>     dwarf_getlocations: [ OFF ]  # HAVE_DWARF_GETLOCATIONS_SUPPORT
> >>>                  glibc: [ on  ]  # HAVE_GLIBC_SUPPORT
> >>>                   gtk2: [ OFF ]  # HAVE_GTK2_SUPPORT
> >>>          syscall_table: [ on  ]  # HAVE_SYSCALL_TABLE_SUPPORT
> >>>                 libbfd: [ on  ]  # HAVE_LIBBFD_SUPPORT
> >>>                 libelf: [ on  ]  # HAVE_LIBELF_SUPPORT
> >>>                libnuma: [ OFF ]  # HAVE_LIBNUMA_SUPPORT
> >>> numa_num_possible_cpus: [ OFF ]  # HAVE_LIBNUMA_SUPPORT
> >>>                libperl: [ OFF ]  # HAVE_LIBPERL_SUPPORT
> >>>              libpython: [ OFF ]  # HAVE_LIBPYTHON_SUPPORT
> >>>               libslang: [ on  ]  # HAVE_SLANG_SUPPORT
> >>>              libcrypto: [ on  ]  # HAVE_LIBCRYPTO_SUPPORT
> >>>              libunwind: [ OFF ]  # HAVE_LIBUNWIND_SUPPORT
> >>>     libdw-dwarf-unwind: [ OFF ]  # HAVE_DWARF_SUPPORT
> >>>                   zlib: [ OFF ]  # HAVE_ZLIB_SUPPORT
> >>>                   lzma: [ OFF ]  # HAVE_LZMA_SUPPORT
> >>>              get_cpuid: [ on  ]  # HAVE_AUXTRACE_SUPPORT
> >>>                    bpf: [ OFF ]  # HAVE_LIBBPF_SUPPORT
> >>>                    aio: [ on  ]  # HAVE_AIO_SUPPORT
> >>>                   zstd: [ OFF ]  # HAVE_ZSTD_SUPPORT
> >>>
> >>>
> >>> Any thoughts?
> > 
> > hum, I don't see that, do you reproduce with DEBUG=1?
> > to get more verbose backtrace
> 
> It will require a kernel with support for bpf events otherwise the
> --no-bpf-event option would have no effect.

ok, reproduced..  I think we need to think about better way,
but this fixes the issue for me now

jirka


---
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 4d4502b7fea0..173012a25df3 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -2564,6 +2564,10 @@ int cmd_record(int argc, const char **argv)
 	if (quiet)
 		perf_quiet_option();
 
+#ifndef HAVE_LIBBPF_SUPPORT
+	rec->opts.no_bpf_event = true;
+#endif
+
 	/* Make system wide (-a) the default target. */
 	if (!argc && target__none(&rec->opts.target))
 		rec->opts.target.system_wide = true;


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

* Re: perf seg fault
  2020-05-12 15:55       ` Jiri Olsa
@ 2020-05-12 16:17         ` Adrian Hunter
  0 siblings, 0 replies; 6+ messages in thread
From: Adrian Hunter @ 2020-05-12 16:17 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: Arnaldo Carvalho de Melo, LKML

On 12/05/20 6:55 pm, Jiri Olsa wrote:
> On Tue, May 12, 2020 at 06:45:24PM +0300, Adrian Hunter wrote:
>> On 12/05/20 6:10 pm, Jiri Olsa wrote:
>>> On Tue, May 12, 2020 at 05:58:29PM +0300, Adrian Hunter wrote:
>>>> Forgot to cc mailing list
>>>>
>>>> On 12/05/20 5:50 pm, Adrian Hunter wrote:
>>>>> Hi
>>>>>
>>>>> I am getting a seg fault from your perf/core branch, as follows:
>>>>>
>>>>> # perf record uname
>>>>> Linux
>>>>> [ perf record: Woken up 1 times to write data ]
>>>>> [ perf record: Captured and wrote 0.005 MB perf.data (7 samples) ]
>>>>> perf: Segmentation fault
>>>>> Obtained 6 stack frames.
>>>>> [0x4e75b4]
>>>>> [0x5d1ad0]
>>>>> [0x5c9860]
>>>>> [0x4a6e5c]
>>>>> [0x5cb39b]
>>>>> [0x76c89f]
>>>>> Segmentation fault
>>>>>
>>>>> It goes away with --no-bpf-event:
>>>>>
>>>>> # perf record --no-bpf-event uname
>>>>> Linux
>>>>> [ perf record: Woken up 1 times to write data ]
>>>>> [ perf record: Captured and wrote 0.005 MB perf.data (7 samples) ]
>>>>> #
>>>>>
>>>>> kernel is from the same branch
>>>>>
>>>>> # uname -a
>>>>> Linux buildroot 5.7.0-rc2-00028-g0fdddf5a583a #165 SMP Tue May 12 16:27:53
>>>>> EEST 2020 x86_64 GNU/Linux
>>>>>
>>>>> # perf version --build-options
>>>>> perf version 5.6.g0fdddf5a583a
>>>>>                  dwarf: [ OFF ]  # HAVE_DWARF_SUPPORT
>>>>>     dwarf_getlocations: [ OFF ]  # HAVE_DWARF_GETLOCATIONS_SUPPORT
>>>>>                  glibc: [ on  ]  # HAVE_GLIBC_SUPPORT
>>>>>                   gtk2: [ OFF ]  # HAVE_GTK2_SUPPORT
>>>>>          syscall_table: [ on  ]  # HAVE_SYSCALL_TABLE_SUPPORT
>>>>>                 libbfd: [ on  ]  # HAVE_LIBBFD_SUPPORT
>>>>>                 libelf: [ on  ]  # HAVE_LIBELF_SUPPORT
>>>>>                libnuma: [ OFF ]  # HAVE_LIBNUMA_SUPPORT
>>>>> numa_num_possible_cpus: [ OFF ]  # HAVE_LIBNUMA_SUPPORT
>>>>>                libperl: [ OFF ]  # HAVE_LIBPERL_SUPPORT
>>>>>              libpython: [ OFF ]  # HAVE_LIBPYTHON_SUPPORT
>>>>>               libslang: [ on  ]  # HAVE_SLANG_SUPPORT
>>>>>              libcrypto: [ on  ]  # HAVE_LIBCRYPTO_SUPPORT
>>>>>              libunwind: [ OFF ]  # HAVE_LIBUNWIND_SUPPORT
>>>>>     libdw-dwarf-unwind: [ OFF ]  # HAVE_DWARF_SUPPORT
>>>>>                   zlib: [ OFF ]  # HAVE_ZLIB_SUPPORT
>>>>>                   lzma: [ OFF ]  # HAVE_LZMA_SUPPORT
>>>>>              get_cpuid: [ on  ]  # HAVE_AUXTRACE_SUPPORT
>>>>>                    bpf: [ OFF ]  # HAVE_LIBBPF_SUPPORT
>>>>>                    aio: [ on  ]  # HAVE_AIO_SUPPORT
>>>>>                   zstd: [ OFF ]  # HAVE_ZSTD_SUPPORT
>>>>>
>>>>>
>>>>> Any thoughts?
>>>
>>> hum, I don't see that, do you reproduce with DEBUG=1?
>>> to get more verbose backtrace
>>
>> It will require a kernel with support for bpf events otherwise the
>> --no-bpf-event option would have no effect.
> 
> ok, reproduced..  I think we need to think about better way,
> but this fixes the issue for me now
> 
> jirka
> 
> 
> ---
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index 4d4502b7fea0..173012a25df3 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -2564,6 +2564,10 @@ int cmd_record(int argc, const char **argv)
>  	if (quiet)
>  		perf_quiet_option();
>  
> +#ifndef HAVE_LIBBPF_SUPPORT
> +	rec->opts.no_bpf_event = true;
> +#endif
> +
>  	/* Make system wide (-a) the default target. */
>  	if (!argc && target__none(&rec->opts.target))
>  		rec->opts.target.system_wide = true;
> 


Thank you!


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

end of thread, other threads:[~2020-05-12 16:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <0cad7834-07b4-ec2f-13b5-d6a10b21ce48@intel.com>
2020-05-12 14:58 ` perf seg fault Adrian Hunter
2020-05-12 15:10   ` Jiri Olsa
2020-05-12 15:41     ` Arnaldo Carvalho de Melo
2020-05-12 15:45     ` Adrian Hunter
2020-05-12 15:55       ` Jiri Olsa
2020-05-12 16:17         ` Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).