Re: WARNING in tracepoint_probe_register_prio (2)

From: Steven Rostedt
Date: Wed Mar 14 2018 - 17:37:54 EST


On Tue, 13 Mar 2018 11:29:51 -0400 (EDT)
Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:

> Here is a WARN_ON() splat in tracepoint.c, which I suspect is caused
> by perf trying to register the same probe twice to the tracepoint API.
> We got another splat on unregister too, which I will forward in a
> separate email.
>
> Thoughts ?

Yes, it looks like it's perf not accounting for registered events
properly.

Peter?

-- Steve



> > RIP: 0010:tracepoint_add_func kernel/tracepoint.c:210 [inline]
> > RIP: 0010:tracepoint_probe_register_prio+0x397/0x9a0 kernel/tracepoint.c:282
> > RSP: 0018:ffff8801bbc87468 EFLAGS: 00010293
> > RAX: ffff8801b5a3c680 RBX: 00000000fffffff4 RCX: ffffffff81735e67
> > RDX: 0000000000000000 RSI: ffffffff86f42a00 RDI: 0000000000000286
> > RBP: ffff8801bbc87570 R08: 1ffff10037790de1 R09: 0000000000000000
> > R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
> > R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8801bbc87548
> > tracepoint_probe_register+0x2a/0x40 kernel/tracepoint.c:303
> > trace_event_reg+0x167/0x320 kernel/trace/trace_events.c:305
> > perf_trace_event_reg kernel/trace/trace_event_perf.c:122 [inline]
> > perf_trace_event_init kernel/trace/trace_event_perf.c:197 [inline]
> > perf_trace_init+0x4ef/0xab0 kernel/trace/trace_event_perf.c:221
> > perf_tp_event_init+0x7d/0xf0 kernel/events/core.c:7979
> > perf_try_init_event+0xc9/0x2a0 kernel/events/core.c:9240
> > perf_init_event kernel/events/core.c:9278 [inline]
> > perf_event_alloc+0x1cc6/0x2b00 kernel/events/core.c:9542
> > SYSC_perf_event_open+0x84e/0x2e00 kernel/events/core.c:9997
> > SyS_perf_event_open+0x39/0x50 kernel/events/core.c:9883
> > do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
> > entry_SYSCALL_64_after_hwframe+0x42/0xb7
>