From: Andreas Dilger <adilger@turbolinux.com>
To: Keith Owens <kaos@ocs.com.au>
Cc: Andi Kleen <ak@suse.de>, Andreas Dilger <adilger@turbolinux.com>,
linux-kernel@vger.kernel.org
Subject: Re: [CHECKER] large stack variables (>=1K) in 2.4.4 and 2.4.4-ac8
Date: Fri, 25 May 2001 00:33:56 -0600 (MDT) [thread overview]
Message-ID: <200105250633.f4P6Xuj2017833@webber.adilger.int> (raw)
In-Reply-To: <23182.990768020@kao2.melbourne.sgi.com> "from Keith Owens at May 25, 2001 03:20:20 pm"
Keith Owens writes:
> Andi Kleen <ak@suse.de> wrote:
> >At one time someone had a script to grep objdump -S vmlinux for the
> >stack allocations generated by gcc and check them.
>
> ftp://ftp.ocs.com.au/pub/kernel.stack.gz. ix86 specific, probably gcc
> specific and it only picks up code that you compile. The Stanford
> checker is much better.
I would probably agree. Dawson said in a separate email that it would
be possible to enhance the checker to follow the call chains to measure
total stack usage. Combining this with potential interrupt stack usage,
we may be able to eliminate some rare problems otherwise hard to find.
> >> On a side note, does anyone know if the kernel does checking if the
> >> stack overflowed at any time?
> >
> >You normally get a silent hang or worse a stack fault exception
> >(which linux/x86 without kdb cannot recover from) which gives you instant
> >reboot.
>
> You cannot recover from a kernel stack overflow even with kdb. The
> exception handler and kdb use the stack that just overflowed.
If it at least tells you that the stack has overflowed, and a backtrace
of the stack up to that point, that would at least be useful for fixing
the functions which caused the problem.
Also, allowing a config option to zero the stack at allocation would at
least allow the SysRQ-T code to tell you how much of the stack has
previously been in use so we can get an idea if we are close or not.
Given that the Stanford checker has discovered several individual 3kB+
stack allocations, it would surprise me if we didn't have stack overflows.
It may well be that people get mysterious hangs in these cases and have
no way to even diagnose the problem. Maybe they are blaming the rare
hangs on hardware instead of software.
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
next prev parent reply other threads:[~2001-05-25 6:35 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-24 21:10 [CHECKER] large stack variables (>=1K) in 2.4.4 and 2.4.4-ac8 Dawson Engler
2001-05-24 22:40 ` Anton Altaparmakov
2001-05-24 23:08 ` Andreas Dilger
2001-05-24 23:33 ` Andi Kleen
2001-05-25 5:20 ` Keith Owens
2001-05-25 6:33 ` Andreas Dilger [this message]
2001-05-25 6:53 ` Keith Owens
2001-05-25 8:20 ` Andi Kleen
2001-05-25 8:31 ` Keith Owens
2001-05-25 8:39 ` Andi Kleen
2001-05-25 14:03 ` Oliver Neukum
2001-05-25 14:07 ` Andi Kleen
2001-05-25 15:45 ` dean gaudet
2001-05-25 16:34 ` Jonathan Lundell
2001-05-25 18:37 ` dean gaudet
2001-05-25 17:49 ` Jeff Dike
2001-05-25 7:11 ` David Welch
2001-05-25 8:08 ` Keith Owens
2001-05-25 15:31 ` dean gaudet
2001-05-25 15:49 ` Keith Owens
2001-05-25 18:46 ` dean gaudet
2001-05-25 8:14 ` Andi Kleen
2001-05-25 8:25 ` Keith Owens
2001-05-25 8:27 ` Andi Kleen
2001-05-25 8:37 ` Keith Owens
2001-05-25 8:17 ` Andi Kleen
2001-05-25 11:52 ` Brian Gerst
2001-05-25 11:53 ` Andi Kleen
2001-05-25 12:07 ` Brian Gerst
2001-05-25 3:38 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2001-05-24 23:01 Mikael Pettersson
2001-05-25 2:48 ` Dawson Engler
2001-05-25 3:00 ` Alexander Viro
2001-05-25 3:07 ` Dawson Engler
2001-05-25 4:23 Dunlap, Randy
2001-07-03 9:15 VDA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200105250633.f4P6Xuj2017833@webber.adilger.int \
--to=adilger@turbolinux.com \
--cc=ak@suse.de \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.