Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1336836 > unrolled thread

Re: [RFC][PATCH 12/12] perf: Collapse and fix event_function_call() users

Started bySasha Levin <sasha.levin@oracle.com>
First post2016-02-17 23:50 +0100
Last post2016-02-18 13:40 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC][PATCH 12/12] perf: Collapse and fix event_function_call()  users Sasha Levin <sasha.levin@oracle.com> - 2016-02-17 23:50 +0100
    Re: [RFC][PATCH 12/12] perf: Collapse and fix event_function_call()  users Peter Zijlstra <peterz@infradead.org> - 2016-02-18 08:50 +0100
      Re: [RFC][PATCH 12/12] perf: Collapse and fix event_function_call()  users Peter Zijlstra <peterz@infradead.org> - 2016-02-18 13:40 +0100

#1336836 — Re: [RFC][PATCH 12/12] perf: Collapse and fix event_function_call() users

FromSasha Levin <sasha.levin@oracle.com>
Date2016-02-17 23:50 +0100
SubjectRe: [RFC][PATCH 12/12] perf: Collapse and fix event_function_call() users
Message-ID<r3j4Z-4A2-13@gated-at.bofh.it>
On 01/11/2016 11:25 AM, Peter Zijlstra wrote:
> There is one common bug left in all the event_function_call() users,
> between loading ctx->task and getting to the remote_function(),
> ctx->task can already have been changed.
> 
> Therefore we need to double check and retry if ctx->task != current.
> 
> Insert another trampoline specific to event_function_call() that
> checks for this and further validates state. This also allows getting
> rid of the active/inactive functions.
> 
> 
> Note: Stephane, can you please look at __perf_event_enable()?
> 
> Cc: Stephane Eranian <eranian@google.com>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>

Hey Peter,

I seem to be hitting a warning added by this patch:

[  258.890172] WARNING: CPU: 5 PID: 14801 at kernel/events/core.c:226 event_function+0x3a7/0x550()
[  258.891356] Modules linked in:[  258.892440] CPU: 5 PID: 14801 Comm: syz-executor Not tainted 4.5.0-rc4-next-20160217-sasha-00024-g888c008-dirty #2976
[  258.893818]  1ffff1006c57bf07 ffff880362bdf8c0 ffffffffa43d511d ffffffff00000005
[  258.895071]  fffffbfff60265b8 0000000041b58ab3 ffffffffafb1d490 ffffffffa43d4f85
[  258.896127]  ffffffffa25984c0 0000000000000038 0000000000000282 ffff880362bdf898
[  258.897182] Call Trace:
[  258.897559]  [<ffffffffa43d511d>] dump_stack+0x198/0x21b
[  258.898258]  [<ffffffffa43d4f85>] ? arch_local_irq_restore+0x5f/0x5f
[  258.899099]  [<ffffffffa25984c0>] ? is_module_text_address+0x20/0x20
[  258.899934]  [<ffffffffa23a6851>] warn_slowpath_common+0xe1/0x160
[  258.900723]  [<ffffffffa268cf07>] ? event_function+0x3a7/0x550
[  258.901473]  [<ffffffffa23a6a99>] warn_slowpath_null+0x29/0x30
[  258.902186]  [<ffffffffa268cf07>] event_function+0x3a7/0x550
[  258.902913]  [<ffffffffa268cb60>] ? perf_event_read_event+0x3c0/0x3c0
[  258.906328]  [<ffffffffa267d7a0>] ? free_ctx+0x70/0x70
[  258.907633]  [<ffffffffa267d8ea>] remote_function+0x14a/0x200
[  258.908776]  [<ffffffffa2582cb8>] generic_exec_single+0x2e8/0x5a0
[  258.913186]  [<ffffffffa258314d>] smp_call_function_single+0x1dd/0x350
[  258.917536]  [<ffffffffa267bc83>] task_function_call+0x123/0x160
[  258.938733]  [<ffffffffa267dbdb>] event_function_call+0x23b/0x440
[  258.949427]  [<ffffffffa267df7f>] _perf_event_enable+0xbf/0x100
[  258.952368]  [<ffffffffa267e04c>] _perf_event_refresh+0x8c/0xd0
[  258.953776]  [<ffffffffa26aa49f>] perf_ioctl+0x2af/0x870
[  258.963056]  [<ffffffffa28fcc60>] do_vfs_ioctl+0x1b0/0x1250
[  258.975817]  [<ffffffffa28fdd8f>] SyS_ioctl+0x8f/0xc0
[  258.976277]  [<ffffffffad5c96c0>] entry_SYSCALL_64_fastpath+0x23/0xc1


Thanks,
Sasha

[toc] | [next] | [standalone]


#1337100

FromPeter Zijlstra <peterz@infradead.org>
Date2016-02-18 08:50 +0100
Message-ID<r3rvz-2gQ-1@gated-at.bofh.it>
In reply to#1336836
On Wed, Feb 17, 2016 at 05:38:43PM -0500, Sasha Levin wrote:
> Hey Peter,
> 
> I seem to be hitting a warning added by this patch:
> 
> [  258.890172] WARNING: CPU: 5 PID: 14801 at kernel/events/core.c:226 event_function+0x3a7/0x550()

Yes, I've been chasing this one for the past few days.

I have a bunch of traces that make absolutely no sense what so ever, and
a patch that appears to make it go away, but I'm not confident.

I'll cleanup and share what I have.

[toc] | [prev] | [next] | [standalone]


#1337317

FromPeter Zijlstra <peterz@infradead.org>
Date2016-02-18 13:40 +0100
Message-ID<r3w2f-5u1-23@gated-at.bofh.it>
In reply to#1337100
On Thu, Feb 18, 2016 at 08:46:20AM +0100, Peter Zijlstra wrote:
> On Wed, Feb 17, 2016 at 05:38:43PM -0500, Sasha Levin wrote:
> > Hey Peter,
> > 
> > I seem to be hitting a warning added by this patch:
> > 
> > [  258.890172] WARNING: CPU: 5 PID: 14801 at kernel/events/core.c:226 event_function+0x3a7/0x550()
> 
> Yes, I've been chasing this one for the past few days.
> 
> I have a bunch of traces that make absolutely no sense what so ever, and
> a patch that appears to make it go away, but I'm not confident.
> 
> I'll cleanup and share what I have.

*sigh*, all cleaned up and debug cruft removed it hits again :/


Back to poking at it I suppose...

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web