linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* perf, percpu: panic in account_event
@ 2013-08-05 21:19 Sasha Levin
  2013-08-12  9:23 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2013-08-05 21:19 UTC (permalink / raw)
  To: Peter Zijlstra, paulus, Ingo Molnar, acme, Tejun Heo, cl
  Cc: LKML, linux-mm, trinity

Hi all,

While fuzzing with trinity inside a KVM tools guest running latest -next kernel,
I've stumbled on the following spew.

It seems to happen on the following line in account_event():

	if (event->attr.freq)
		atomic_inc(&per_cpu(perf_freq_events, cpu));  <--- here

Which was recently introduced in commit ("perf: Account freq events per cpu"). Although
the commit is new, it's very simple and straightforward - I can't see anything wrong with
it so maybe the fault is in percpu?

[ 4299.619701] BUG: unable to handle kernel paging request at 0000000f001d1ed6
[ 4299.620150] IP: [<ffffffff8120afb4>] account_event+0xe4/0x100
[ 4299.620150] PGD 5f30f067 PUD 0
[ 4299.620150] Oops: 0002 [#1] PREEMPT SMP DEBUG_PAGEALLOC
[ 4299.620150] Modules linked in:
[ 4299.620150] CPU: 14 PID: 15329 Comm: trinity-child56 Tainted: G        W 
3.11.0-rc4-next-20130805-sasha-00003-g07015f7 #3976
[ 4299.620150] task: ffff880176510000 ti: ffff8800c624a000 task.ti: ffff8800c624a000
[ 4299.620150] RIP: 0010:[<ffffffff8120afb4>]  [<ffffffff8120afb4>] account_event+0xe4/0x100
[ 4299.620150] RSP: 0018:ffff8800c624be68  EFLAGS: 00010212
[ 4299.620150] RAX: ffffffffffffffff RBX: 0000000000000000 RCX: 0000000000000000
[ 4299.627928] RDX: 0000000f001d1ed6 RSI: 00000000001dbbf8 RDI: ffff880179a437b0
[ 4299.627928] RBP: ffff8800c624be68 R08: 00000000e26ec8c5 R09: 0000000000000001
[ 4299.627928] R10: 0000000000000001 R11: 0000000000000000 R12: ffff880176510000
[ 4299.627928] R13: ffff880179a437b0 R14: 0000000000000000 R15: 0000000000000000
[ 4299.627928] FS:  00007fe6a0bbb700(0000) GS:ffff880226200000(0000) knlGS:0000000000000000
[ 4299.627928] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4299.627928] CR2: 0000000f001d1ed6 CR3: 0000000059995000 CR4: 00000000000006e0
[ 4299.627928] Stack:
[ 4299.627928]  ffff8800c624bf68 ffffffff81215fe8 0000000000000000 ffff880176510610
[ 4299.627928]  0000000000000001 ffffffff81a37a00 ffff880176510610 0000000000000000
[ 4299.627928]  0000000000000000 0000014584098985 0000004000000001 0000000000000004
[ 4299.627928] Call Trace:
[ 4299.627928]  [<ffffffff81215fe8>] SYSC_perf_event_open+0x4e8/0x910
[ 4299.627928]  [<ffffffff81a37a00>] ? do_raw_spin_unlock+0xd0/0xe0
[ 4299.627928]  [<ffffffff81216419>] SyS_perf_event_open+0x9/0x10
[ 4299.627928]  [<ffffffff840a14ec>] tracesys+0xdd/0xe2
[ 4299.627928] Code: c7 c2 c0 1e 1d 00 48 03 14 cd 80 7b 60 86 f0 ff 02 f6 87 c9 00 00 00 04 74 1d 
48 98 48 c7 c2 c8 1e 1d 00 48 03 14 c5 80 7b 60 86 <f0> ff 02 66 0f 1f 84 00 00 00 00 00 c9 c3 66 66 
66 66 66 2e 0f
[ 4299.627928] RIP  [<ffffffff8120afb4>] account_event+0xe4/0x100
[ 4299.627928]  RSP <ffff8800c624be68>
[ 4299.627928] CR2: 0000000f001d1ed6


Thanks,
Sasha

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: perf, percpu: panic in account_event
  2013-08-05 21:19 perf, percpu: panic in account_event Sasha Levin
@ 2013-08-12  9:23 ` Peter Zijlstra
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2013-08-12  9:23 UTC (permalink / raw)
  To: Sasha Levin
  Cc: paulus, Ingo Molnar, acme, Tejun Heo, cl, LKML, linux-mm, trinity

On Mon, Aug 05, 2013 at 05:19:18PM -0400, Sasha Levin wrote:
> Hi all,
> 
> While fuzzing with trinity inside a KVM tools guest running latest -next kernel,
> I've stumbled on the following spew.
> 
> It seems to happen on the following line in account_event():
> 
> 	if (event->attr.freq)
> 		atomic_inc(&per_cpu(perf_freq_events, cpu));  <--- here
> 

Right, Frederic even send a fix for this already. I suppose holidays got
in the way of getting it merged quickly though, sorry for that.

Merged his fix, will hopefully get it into tip soon.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-12  9:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-05 21:19 perf, percpu: panic in account_event Sasha Levin
2013-08-12  9:23 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).