From: Peter Zijlstra <peterz@infradead.org>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
mingo@elte.hu, "Paul Mackerras" <paulus@samba.org>,
"David S. Miller" <davem@davemloft.net>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
perfmon2-devel@lists.sf.net
Subject: Re: [BUG] perf_event: crash in perf_output_begin
Date: Tue, 11 May 2010 09:47:57 +0200 [thread overview]
Message-ID: <1273564077.5605.3489.camel@twins> (raw)
In-Reply-To: <AANLkTinNDC2g79VzfKjpm0bN1LOE5OeuVxvacjrNsz7s@mail.gmail.com>
On Mon, 2010-05-10 at 22:03 +0200, Stephane Eranian wrote:
> On Mon, May 10, 2010 at 5:52 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Mon, 2010-05-10 at 17:33 +0200, Stephane Eranian wrote:
> >> Hi,
> >>
> >> While testing 2.6.34-rc7 I ran into the following issue when
> >> using BTS sampling on Intel Core. It seems like something
> >> is not terminated properly. I am sampling BTS per-thread
> >> on a test program, then hit CTRL-C, one second later my
> >> machine crashes while running bash. Crash dump below:
> >>
> >> [ 750.249109] general protection fault: 0000 [#1] SMP
> >> [ 750.249270] CPU 3
> >> [ 750.249270] Pid: 6132, comm: bash Not tainted 2.6.34-rc7-tip+ #46
> >
> > Can you try and reverting 4fd38e4595e2f6c9d27732c042a0e16b2753049c, I
> > spend most of the day chasing that, and I can't say I'm much wiser.
> >
>
> It seems to avoid my problem. So that means with STATE_FREE, some code
> path is exercised differently and there is leftover state that
> generates spurious
> interrupts, as if some event_sched_out() code was not executed.
You're spot on. I'll send a full new patch Ingo wards as he already
pushed out the revert.
---
kernel/perf_event.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 180151f..91f277e 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1871,6 +1871,7 @@ int perf_event_release_kernel(struct perf_event *event)
{
struct perf_event_context *ctx = event->ctx;
+ perf_event_disable(event);
event->state = PERF_EVENT_STATE_FREE;
WARN_ON_ONCE(ctx->parent_ctx);
prev parent reply other threads:[~2010-05-11 7:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-10 15:33 Stephane Eranian
2010-05-10 15:52 ` Peter Zijlstra
2010-05-10 20:03 ` Stephane Eranian
2010-05-11 7:47 ` Peter Zijlstra [this message]
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=1273564077.5605.3489.camel@twins \
--to=peterz@infradead.org \
--cc=davem@davemloft.net \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=perfmon2-devel@lists.sf.net \
/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®