[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131210220946.GA6962@home.goodmis.org>
Date: Tue, 10 Dec 2013 17:09:46 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Dave Jones <davej@...hat.com>, Oleg Nesterov <oleg@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Darren Hart <dvhart@...ux.intel.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Mel Gorman <mgorman@...e.de>
Subject: Re: process 'stuck' at exit.
On Tue, Dec 10, 2013 at 04:41:43PM -0500, Dave Jones wrote:
> >
> > OK, thanks. So it doesn't return to user-space.
> >
> > could you do
> >
> > cd /sys/kernel/debug/tracing/
> > echo 10818 >> set_ftrace_pid
> > echo function_graph >> current_tracer
> > echo 1 >> tracing_on
> >
> > and look into "trace" file to find out how exactly it loops?
>
> http://codemonkey.org.uk/junk/trace
Because we are already in the function that is looping, we don't see what
that function is (it's never called).
So you can do either:
trace-cmd record -p function -l get_user_pages_fast --func-stack sleep 5
Which will trace the get_user_pages_fast and spit out a full call trace.
Or if you don't want to use trace-cmd, you can do it by hand.
But be warned! If you don't do this right, you can live lock the system.
Or make it extremely slow. That is, you must have a filter on the
functions you trace before you set the function stack trace flag.
(/me needs to prevent that from happening)
cd /sys/kernel/debug/tracing
echo get_user_pages_fast > set_ftrace_filter
cat set_ftrace_filter
# make sure get_user_pages_fast is there
echo function > current_tracer
echo 1 > options/func_stack_trace
read your trace. Either by:
cat trace
or
trace-cmd show
And then after you recorded that.
echo 0 > options/func_stack_trace
to make sure you don't accidently enable stack tracing on *all*
functions. I haven't had that really live lock the system, but
it took about two minutes to disable it again, as each key stroke
took several seconds to compete.
-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists