mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: David Ahern <dsahern@gmail.com>
Cc: linux-kernel@vger.kernel.org, psuriset@linux.vnet.ibm.com,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Ingo Molnar <mingo@kernel.org>, Namhyung Kim <namhyung@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] perf kvm: fix segfault with default guest arguments
Date: Mon, 25 Jun 2012 18:08:47 +0200	[thread overview]
Message-ID: <20120625160847.GE30293@krava.brq.redhat.com> (raw)
In-Reply-To: <1340599286-89757-1-git-send-email-dsahern@gmail.com>

On Sun, Jun 24, 2012 at 10:41:26PM -0600, David Ahern wrote:
> (This time with actual backtrace; forgot to remove the leading '#' on the frames.)
> 
> File generated with:
> $ perf kvm --host --guest --guestkallsyms=/tmp/guest-kallsyms
>     --guestmodules=/tmp/guest-modules record -a
> 
> The report command:
> $ perf kvm --host --guest --guestkallsyms=/tmp/guest-kallsyms
>     --guestmodules=/tmp/guest-modules report
> 
> dies with a SEGFAULT:
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000000046dd7b in machine__mmap_name (self=0x0, bf=0x7fffffffbd20 "q\021", size=4096) at util/map.c:715
> 715			snprintf(bf, size, "[%s.%d]", "guest.kernel.kallsyms", self->pid);
> 
> (gdb) bt
> 0  0x000000000046dd7b in machine__mmap_name (self=0x0, bf=0x7fffffffbd20 "q\021", size=4096) at util/map.c:715
> 1  0x0000000000444161 in perf_event__process_kernel_mmap (tool=0x7fffffffdd80, event=0x7ffff7fb4120, machine=0x0) at util/event.c:562
> 2  0x0000000000444642 in perf_event__process_mmap (tool=0x7fffffffdd80, event=0x7ffff7fb4120, sample=0x7fffffffd210, machine=0x0)
>     at util/event.c:668
> 3  0x0000000000470e0b in perf_session_deliver_event (session=0x915ca0, event=0x7ffff7fb4120, sample=0x7fffffffd210, tool=0x7fffffffdd80,
>     file_offset=8480) at util/session.c:979
> 4  0x000000000047032e in flush_sample_queue (s=0x915ca0, tool=0x7fffffffdd80) at util/session.c:679
> 5  0x0000000000471c8d in __perf_session__process_events (session=0x915ca0, data_offset=400, data_size=150448, file_size=150848, tool=
>     0x7fffffffdd80) at util/session.c:1363
> 6  0x0000000000471d42 in perf_session__process_events (self=0x915ca0, tool=0x7fffffffdd80) at util/session.c:1379
> 7  0x000000000042484a in __cmd_report (rep=0x7fffffffdd80) at builtin-report.c:368
> 8  0x0000000000425bf1 in cmd_report (argc=0, argv=0x915b00, prefix=0x0) at builtin-report.c:756
> 9  0x0000000000438505 in __cmd_report (argc=4, argv=0x7fffffffe260) at builtin-kvm.c:84
> 10 0x000000000043882a in cmd_kvm (argc=4, argv=0x7fffffffe260, prefix=0x0) at builtin-kvm.c:131
> 11 0x00000000004152cd in run_builtin (p=0x7a54e8, argc=9, argv=0x7fffffffe260) at perf.c:273
> 12 0x00000000004154c7 in handle_internal_command (argc=9, argv=0x7fffffffe260) at perf.c:345
> 13 0x0000000000415613 in run_argv (argcp=0x7fffffffe14c, argv=0x7fffffffe140) at perf.c:389
> 14 0x0000000000415899 in main (argc=9, argv=0x7fffffffe260) at perf.c:487
> 
> If no samples hit within a guest module then no build id events are written
> to the header during the record. On the report side this cases no 'machine'
> to be generated for the default guest (pid == 0) leading to a
> machine == NULL in perf_session_deliver_event.
> 
> perf's handling of default kallsyms and guest-modules needs to be reworked.
agreed ;) any plans on that?

jirka

  parent reply	other threads:[~2012-06-25 16:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25  4:41 David Ahern
2012-06-25  8:39 ` Namhyung Kim
2012-06-25 12:51   ` David Ahern
2012-06-25 19:04     ` David Ahern
2012-06-26  0:35       ` Namhyung Kim
2012-06-25 16:08 ` Jiri Olsa [this message]
2012-06-25 18:44   ` David Ahern
     [not found] ` <20120628144418.GG4038@infradead.org>
2012-06-28 14:51   ` David Ahern
2012-06-28 14:52   ` David Ahern
2012-06-30  0:40   ` David Ahern
2012-07-01 22:16 ` David Ahern
  -- strict thread matches above, loose matches on Subject: below --
2012-06-25  4:37 David Ahern

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=20120625160847.GE30293@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@gmail.com \
    --cc=peterz@infradead.org \
    --cc=psuriset@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®