lkml.org 
[lkml]   [2009]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Detailed Stack Information Patch [0/3]
From
Date
Stefani Seibold <stefani@seibold.net> writes:
>
> - Get out of virtual memory by creating a lot of threads
> (f.e. the developer did assign each of them the default size)

The application just fails then? I don't think that needs
a new monitoring tool.

> - Misuse the thread stack for big temporary data buffers

That would be better checked for at compile time
(except for alloca, but that is quite rare)

> - Thread stack overruns

Your method would be racy at best to determine this because
you don't keep track of the worst case, only the current case.

So e.g. if you monitoring app checks once per second the stack
could overflow between your monitoring intervals, but already
have bounced back before the checker comes in.

gcc has support to generate stack overflow checking code,
that would be more reliable. Alternatively you could keep
track of consumption in the VMA that has the stack, but
that can't handle very large jumps (like f() { char x[1<<30]; } )
The later can only be handled well by the compiler.

-Andi

--
ak@linux.intel.com -- Speaking for myself only.


\
 
 \ /
  Last update: 2009-03-31 17:51    [W:0.141 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site