[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150330234533.GA9438@kernel.org>
Date: Mon, 30 Mar 2015 20:45:33 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: David Ahern <dsahern@...il.com>
Cc: Stephane Eranian <eranian@...gle.com>,
Jiri Olsa <jolsa@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [BUG] perf script segfault
Em Mon, Mar 30, 2015 at 04:51:34PM -0600, David Ahern escreveu:
> Surprised Stephane has not hit this one yet:
>
> $ perf record -e <any-event> -a | perf script
> Segmentation fault (core dumped)
>
> It's the second one that core dumps.
>
> $ gdb perf core.16704
> ...
> [New LWP 16704]
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib64/libthread_db.so.1".
> Core was generated by `/tmp/perf/perf script'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0 perf_tool__fill_defaults (tool=tool@...ry=0x0) at util/session.c:259
> 259 if (tool->sample == NULL)
> ...
> (gdb) bt
> #0 perf_tool__fill_defaults (tool=tool@...ry=0x0) at util/session.c:259
> #1 0x00000000004a5baa in __perf_session__process_pipe_events
> (session=0x2178b80) at util/session.c:1178
> #2 perf_session__process_events (session=0x2178b80) at util/session.c:1416
> #3 0x000000000043c5dc in __cmd_script (script=0x7fffc7a4d840) at
> builtin-script.c:803
> #4 cmd_script (argc=<optimized out>, argv=<optimized out>,
> prefix=<optimized out>) at builtin-script.c:1840
> ...
>
> tool was moved to ordered_events and is not initialized for pipe mode. I
> don't have time to look into it more than that before PTO on Wednesday.
I guess this one is enough, no? Checking with your example...
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index adf0740c563b..f0c8dc519db0 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -139,6 +139,7 @@ struct perf_session *perf_session__new(struct perf_data_file *file,
tool->ordered_events && !perf_evlist__sample_id_all(session->evlist)) {
dump_printf("WARNING: No sample_id_all support, falling back to unordered processing\n");
tool->ordered_events = false;
+ session->ordered_events.tool = tool;
} else {
ordered_events__init(&session->ordered_events, &session->machines,
session->evlist, tool, ordered_events__deliver_event);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists