From: andersg@0x63.nu
To: Andrew Morton <akpm@zip.com.au>
Cc: andersg@0x63.nu, linux-kernel@vger.kernel.org, lvm-devel@sistina.com
Subject: Re: lvm in 2.5.1
Date: Thu, 27 Dec 2001 13:25:20 +0100 [thread overview]
Message-ID: <20011227122520.GA2194@h55p111.delphi.afb.lu.se> (raw)
In-Reply-To: <20011227084304.GA26255@h55p111.delphi.afb.lu.se> <3C2AEADB.24BEFE94@zip.com.au>
In-Reply-To: <3C2AEADB.24BEFE94@zip.com.au>
On Thu, Dec 27, 2001 at 01:33:15AM -0800, Andrew Morton wrote:
> > I'm now running 2.5.1 with lvm. The following patch makes some minor changes
> > for bio-support and removes allocation of a lv_t on the stack, which made
> > the stack overflow and gave me something to spend my last 24 hours
> > debugging.
>
> That's a worry, because an lv_t is only 420 bytes. If that's triggering
> a stack overflow then we're way too close. Think interrupts....
>
> There must be other sources of stack bloat.
>
> lvm_chr_ioctl() calls lvm_do_vg_create(), and it has has another lv_t
> on the stack. That's 840 bytes - still not enough. Maybe lvm_do_vg_create()
> is calling something which uses lots of stack? Can't see it. Odd.
did a calltrace in lvm_do_vg_create and it contains 48 symbols between
Trace; c013c786 <sys_ioctl+16a/184>
and
Trace; c01a78f8 <lvm_chr_ioctl+2b8/670>
which looks like they comes from an old system call as it just contiains
lots of unrelated symbols. That would suggest that lvm_char_ioctl allcates a
big object on the stack that it havn't touched?
Removing these symbols makes the calltrace look like:
>>EIP; c01a8cf2 <lvm_do_vg_create+22/498> <=====
Trace; c01a78f8 <lvm_chr_ioctl+2b8/670>
Trace; c013c786 <sys_ioctl+16a/184>
Trace; c010856a <system_call+32/38>
not many symbols that could allcate stackspace, lets have a look how they
allocates:
0x938 <lvm_blk_ioctl>: sub $0x8,%esp
not much... lets have a look at lvm_do_vg_create then:
with my patch:
0x1830 <lvm_do_vg_create>: sub $0x20,%esp
without my patch:
0x1830 <lvm_do_vg_create>: sub $0x11c4,%esp
whoa! 0x11c4
thats a LOT! much more than sizeof(lv_t)
> Seems that in various places here you've forgotten to free the lv_t storage
> on error paths?
of course, how could i forget.. will put together a new patch with that
fixed in a minute.
--
//anders/g
next prev parent reply other threads:[~2001-12-27 12:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-27 8:43 andersg
2001-12-27 9:33 ` Andrew Morton
2001-12-27 12:25 ` andersg [this message]
2001-12-27 13:54 ` andersg
2001-12-27 15:20 ` Jens Axboe
2001-12-27 16:02 ` andersg
2001-12-27 16:11 ` Jens Axboe
2001-12-27 17:18 ` [lvm-devel] " Andreas Dilger
2001-12-27 19:25 ` Andrew Morton
2001-12-27 19:37 ` andersg
2001-12-27 19:45 ` Andrew Morton
2001-12-27 20:24 ` andersg
2001-12-28 16:45 ` Jan Niehusmann
2001-12-28 20:17 ` [lvm-devel] " Andreas Dilger
2001-12-28 20:43 ` andersg
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=20011227122520.GA2194@h55p111.delphi.afb.lu.se \
--to=andersg@0x63.nu \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=lvm-devel@sistina.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®