Re: [3.4-rc3] Thread overran stack, or stack corrupted

From: Dave Jones
Date: Tue Apr 17 2012 - 23:16:05 EST


On Tue, Apr 17, 2012 at 10:27:05PM -0400, Steven Rostedt wrote:

> Note we have something that checks the stack, even on leaf functions.
>
> Enable CONFIG_STACK_TRACER
>
> and then enable it with the following:
>
> # echo 1 > /proc/sys/kernel/stack_tracer_enabled
> # cat /sys/kernel/debug/tracing/stack_trace
> Depth Size Location (40 entries)
> ----- ---- --------
> 0) 3056 208 select_task_rq_fair+0x30b/0x8b2
> 1) 2848 96 try_to_wake_up+0xc7/0x30e

That looks handy. Doesn't seem to work for me though on my test box.
(config option is enabled.)

# echo 1 > /proc/sys/kernel/stack_tracer_enabled
# cat /sys/kernel/debug/tracing/stack_trace
Depth Size Location (-1 entries)
----- ---- --------

That's all she wrote.

Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/