lkml.org 
[lkml]   [2014]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: perf: fuzzer getting stuck with slow memory leak
On Tue, 27 May 2014, Vince Weaver wrote:

> On Tue, 27 May 2014, Vince Weaver wrote:
>
> > OK, the problem is in:
> >
> > kernel/events/core.c find_get_context()
> >
> > retry:
> > perf_lock_task_context() returns NULL.
> > alloc_perf_context()
> > task->perf_event_ctxp[ctxn] is *not* NULL
> > err == EAGAIN so jump to retry
> >

so after sticking some trace_printk()s in the code, it turns out
that for the software PMU

perf_lock_task_context() returns NULL beause
!atomic_inc_not_zero(&ctx->refcount)
is zero, but
task->perf_event_ctxp[ctxn] still has a value.

And since those conditions never change it just loops forever, stuck.

I'm not sure how the reference count is getting messed up.
This is reproducible so if there's anything useful I can turn on
tracing-wise let me know.

Vince


\
 
 \ /
  Last update: 2014-05-27 23:21    [W:0.053 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site