All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	"linux-perf-use." <linux-perf-users@vger.kernel.org>,
	Hendrik Brueckner <brueckner@linux.vnet.ibm.com>,
	kernel-team@lge.com
Subject: Re: perf buildild-list -H dumps core
Date: Tue, 17 Oct 2017 09:28:31 +0900	[thread overview]
Message-ID: <20171017002831.GA2244@sejong> (raw)
In-Reply-To: <0dbfaac2-46dc-8c63-05b7-004f3604b8c3@linux.vnet.ibm.com>

Hello,

On Mon, Oct 16, 2017 at 08:52:27AM +0200, Thomas-Mich Richter wrote:
> On 10/13/2017 04:48 PM, Arnaldo Carvalho de Melo wrote:
> 
> Here is the load of perf using gdb:
> 
>  
> 
> [root@s35lp76 core-dump-buildid]# gdb ~/linux/tools/perf/perf
> GNU gdb (GDB) Fedora 7.12.1-48.fc25
> Copyright (C) 2017 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "s390x-redhat-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from /root/linux/tools/perf/perf...done.
> 
> 
> 
> This is the command:
> (gdb) r buildid-list -H 
> Starting program: /root/linux/tools/perf/perf buildid-list -H
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib64/libthread_db.so.1".
> Detaching after fork from child process 249033.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000000000 in ?? ()
> Missing separate debuginfos, use: dnf debuginfo-install audit-libs-2.7.7-1.fc25.s390x bzip2-libs-1.0.6-21.fc25.s390x elfutils-libelf-0.169-1.fc25.s390x elfutils-libs-0.169-1.fc25.s390x libcap-ng-0.7.8-1.fc25.s390x numactl-libs-2.0.11-2.ibm.fc25.s390x openssl-libs-1.1.0e-1.1.ibm.fc25.s390x perl-libs-5.24.1-386.fc25.s390x python-libs-2.7.13-2.fc25.s390x slang-2.3.0-7.fc25.s390x xz-libs-5.2.3-2.fc25.s390x zlib-1.2.8-10.fc25.s390x
> (gdb) where
> #0  0x0000000000000000 in ?? ()
> #1  0x00000000010fad6a in machines__deliver_event (machines=<optimized out>, machines@entry=0x2c6fd18, 
>     evlist=<optimized out>, event=event@entry=0x3fffdf00470, sample=0x3ffffffe880, sample@entry=0x3ffffffe888, 
>     tool=tool@entry=0x1312968 <build_id.mark_dso_hit_ops>, file_offset=1136) at util/session.c:1287
> #2  0x00000000010fbf4e in perf_session__deliver_event (file_offset=1136, tool=0x1312968 <build_id.mark_dso_hit_ops>, 
>     sample=0x3ffffffe888, event=0x3fffdf00470, session=0x2c6fc30) at util/session.c:1340
> #3  perf_session__process_event (session=0x2c6fc30, session@entry=0x0, event=event@entry=0x3fffdf00470, 
>     file_offset=file_offset@entry=1136) at util/session.c:1522
> #4  0x00000000010fddde in __perf_session__process_events (file_size=11880, data_size=<optimized out>, 
>     data_offset=<optimized out>, session=0x0) at util/session.c:1899
> #5  perf_session__process_events (session=0x0, session@entry=0x2c6fc30) at util/session.c:1953
> #6  0x000000000103b2ac in perf_session__list_build_ids (with_hits=<optimized out>, force=<optimized out>)
>     at builtin-buildid-list.c:83
> #7  cmd_buildid_list (argc=<optimized out>, argv=<optimized out>) at builtin-buildid-list.c:115
> #8  0x00000000010a026c in run_builtin (p=0x1311f78 <commands+24>, argc=argc@entry=2, argv=argv@entry=0x3fffffff3c0)
>     at perf.c:296
> #9  0x000000000102bc00 in handle_internal_command (argv=<optimized out>, argc=2) at perf.c:348
> #10 run_argv (argcp=<synthetic pointer>, argv=<synthetic pointer>) at perf.c:392
> #11 main (argc=<optimized out>, argv=0x3fffffff3c0) at perf.c:536
> (gdb) 

Looks like due to a NULL namespace event handler.  Does patch below
fix it?

Thanks,
Namhyung


diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index ceac0848469d..b3fd62f7e4c9 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -374,6 +374,8 @@ void perf_tool__fill_defaults(struct perf_tool *tool)
                tool->mmap2 = process_event_stub;
        if (tool->comm == NULL)
                tool->comm = process_event_stub;
+       if (tool->namespaces == NULL)
+               tool->namespaces = process_event_stub;
        if (tool->fork == NULL)
                tool->fork = process_event_stub;
        if (tool->exit == NULL)

  reply	other threads:[~2017-10-17  0:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13  7:33 perf buildild-list -H dumps core Thomas-Mich Richter
2017-10-13 14:48 ` Arnaldo Carvalho de Melo
2017-10-16  6:52   ` Thomas-Mich Richter
2017-10-17  0:28     ` Namhyung Kim [this message]
2017-10-17  6:15       ` Thomas-Mich Richter
2017-10-17 12:01       ` Arnaldo Carvalho de Melo
2017-10-17 13:29         ` [PATCH] perf tools: Fix crash on buildid-list with namespace Namhyung Kim
2017-10-17 14:05           ` Arnaldo Carvalho de Melo
2017-10-18  0:07             ` Namhyung Kim
2017-10-20  7:20           ` [tip:perf/urgent] perf buildid-list: Fix crash when processing PERF_RECORD_NAMESPACE tip-bot for Namhyung Kim
2017-10-16  7:00   ` perf buildild-list -H dumps core Thomas-Mich Richter

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=20171017002831.GA2244@sejong \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=brueckner@linux.vnet.ibm.com \
    --cc=kernel-team@lge.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=tmricht@linux.vnet.ibm.com \
    /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 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.