On Mon, 2010-05-10 at 22:03 +0200, Stephane Eranian wrote: > On Mon, May 10, 2010 at 5:52 PM, Peter Zijlstra <pet...@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); ------------------------------------------------------------------------------ _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel