unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: "Neil Jerram" <neiljerram@googlemail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guile-devel@gnu.org
Subject: Re: Stack calibration
Date: Thu, 2 Oct 2008 23:30:18 +0100	[thread overview]
Message-ID: <49dd78620810021530u8f29699x88fa8c0241105a07@mail.gmail.com> (raw)
In-Reply-To: <49dd78620809301510q173d1777rd26240ce40f204f0@mail.gmail.com>

2008/9/30 Neil Jerram <neiljerram@googlemail.com>:
>
> Well, ideally we should have a solution that works automatically in
> all circumstances...

FWIW, I'm actually thinking now that this stack calibration stuff is
becoming way too tricky, in at least two ways.

1) The concept of the 'stack debug option being expressed in terms of
some other "canonical" combination of OS, compiler and compiler
optimization level.  (I struggle to describe this clearly, here, and
in comments in the code, and I'm sure I would struggle in the manual
too - so that's a bad sign!)

2) The complexity that my latest patch adds to the Guile build
process.  And even with this complexity we still don't cover all the
cases (notably cross compiling).

Reviewing the history, we find that this work was prompted by people
reporting Stack overflow errors when building Guile or when running
make check [1].  We also find that such errors were _still_ reported
by people who had some version of the calibration patch in place [2].
And there was a case, not yet understood, where the error was
apparently caused by configuring without threads [3].

There was also a general discussion of how stack checking is
implemented [4], which I think is sufficient to say that we should
keep it basically in its current form (rather than implement an eval
frame counter, say).

[1] http://www.mail-archive.com/bug-guile@gnu.org/msg04401.html
[2] http://article.gmane.org/gmane.lisp.guile.bugs/3881
[3] http://thread.gmane.org/gmane.lisp.guile.user/6628/focus=6629
[4] http://www.nabble.com/Re:-stack-overflow-td15467458.html

Taking everything together, my thinking now is...

- The problem we actually need to solve is getting a stack overflow
while running make and/or make check, and there may be other ways of
doing that than trying to pick the right number, and to interpret that
number such that it has the same effect on all platforms.

(For example, I think it would be fine if stack checking was disabled
during make and make check, and (post build/install) when loading
boot-9.scm.  We don't need to guard against C stack overflow when
running our own test suite, or when loading boot-9.scm, because
overflow in those contexts isn't going to hurt anyone.  The point of
stack checking is to protect against runaway user/developer code (or
Guile code being called from user/developer code).)

- Based on [2], it sounds like there is part of this issue that we
don't yet understand - i.e. not just the stack growing bigger than the
default 20000 words.

I plan to try and investigate [2] and [3] more, then hopefully propose
something (simpler than my latest patch!).

Regards,
        Neil




  parent reply	other threads:[~2008-10-02 22:30 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <47B2A8DF.9070004@tammer.net>
     [not found] ` <87tzkd8bvz.fsf@gnu.org>
     [not found]   ` <87ejbh8ben.fsf@gnu.org>
     [not found]     ` <47B2D88F.1040505@tammer.net>
     [not found]       ` <87ir0tvx6e.fsf@inria.fr>
2008-02-13 20:40         ` stack overflow Neil Jerram
2008-02-14  8:48           ` Ludovic Courtès
2008-02-14 10:26             ` Mikael Djurfeldt
2008-02-14 11:25               ` Ludovic Courtès
2008-02-14 11:39                 ` Mikael Djurfeldt
2008-02-25 21:52                   ` Neil Jerram
2008-07-16 12:34                     ` Ludovic Courtès
2008-09-12 20:47                     ` Stack calibration Ludovic Courtès
2008-09-27 18:20                       ` Neil Jerram
2008-09-28 20:05                         ` Ludovic Courtès
2008-09-30 22:10                           ` Neil Jerram
2008-10-02  8:25                             ` Andy Wingo
2008-10-02  8:38                               ` Neil Jerram
2008-10-02 22:30                             ` Neil Jerram [this message]
2008-10-06 22:32                               ` Ludovic Courtès
2008-10-06 23:11                                 ` Neil Jerram
2008-10-09 22:53                                   ` Neil Jerram
2008-10-10 13:22                                     ` Greg Troxel
2008-10-10 18:04                                       ` Neil Jerram
2008-10-10 18:28                                         ` Greg Troxel
2008-10-10 18:41                                           ` Neil Jerram
2008-10-11 17:22                                     ` Ludovic Courtès
2008-10-12 15:59                                       ` Neil Jerram
2008-10-12 21:16                                         ` Neil Jerram
2008-10-13 21:37                                           ` Neil Jerram
2008-10-14  7:25                                           ` Ludovic Courtès
2008-10-17 20:49                                             ` Neil Jerram
2008-10-14  7:19                                         ` Ludovic Courtès
2008-09-28 20:07                         ` Ludovic Courtès
2008-09-30 22:11                           ` Neil Jerram
2008-02-17  1:38           ` stack overflow Han-Wen Nienhuys
2008-02-17  9:20             ` Mikael Djurfeldt
2009-03-27 21:19 stack calibration Andy Wingo
2009-03-27 22:04 ` Mike Gran
2009-03-27 22:29   ` Julian Graham
2009-03-30 20:43 ` Neil Jerram
2009-03-31  3:39   ` Andy Wingo
2009-03-31 22:47     ` Neil Jerram
2009-04-03 17:44       ` Andy Wingo
2009-03-31 17:45   ` Greg Troxel
2009-04-17  9:35   ` Andy Wingo
2009-03-31 16:20 ` Ludovic Courtès

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

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49dd78620810021530u8f29699x88fa8c0241105a07@mail.gmail.com \
    --to=neiljerram@googlemail.com \
    --cc=guile-devel@gnu.org \
    --cc=ludo@gnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).