unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Edgar Gonçalves" <edgar.goncalves@gmail.com>
Cc: David Reitter <david.reitter@gmail.com>, 7920@debbugs.gnu.org
Subject: bug#7920: 24.0.50; Crash in balance_an_interval + 26
Date: Thu, 27 Jan 2011 12:37:35 -0500	[thread overview]
Message-ID: <jwvwrlqjm5l.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <B3AEB224-FDF5-4505-BC93-962D239B6265@gmail.com> ("Edgar Gonçalves"'s message of "Thu, 27 Jan 2011 16:32:55 +0000")

> sent the email... But in short, this has been happening when I'm using slime
> to connect to an emacs-launched clojure shell process.  In particular, it
> happens when clojure hangs, and I don't know how to collect more details at
> this point - next time it happens I'll provide you with more.

Thanks.

> Hmm, this may be indeed the case that my max-specdpl-size is too high.
> This is in part due to me not knowing what "too high" means for my
> machine - how can I calculate the optimal value? I remember having set
> it up to 100000 to be able to use a cedet/javasee function (guided by
> some solution posted on a blog whose name, i'm afraid, i can't
> recall).

Try to set it to a much lower value.  The current default is somewhere
around 1000.  It's not completely abnormal if it turns out to be too low
for some cases, but when you set it higher, be careful to do it in small
increments, at most doubling each time.

> Why should Emacs set this value to anything lower than the
> maximum supported value, does it affect the system
> performance/resources?

There is no "correct" value, sadly.  Basically the value should be set
to "OS-enforced-max-stack-size / expected-stack-frame-size-of-recursion".
AFAIK Emacs doesn't try to find out neither the numerator nor the
denominator, and I don't think the denominator is fixed: it depends on
the exact pattern of recursion.
We should replace (or complete) this test with something that really
tests whether we're running out of stack space: patches welcome.

> It has been working thus far, though, except with this occasional infinite
> recursion using slime. I've now set that variable's value to the default
> (removing my customization), and I'll see if I run into more problems.

Make sure you run with debug-on-error set to t, so that if you bump into
this problem, you should get a (Lisp) backtrace which should help figure
out where's that inf-recursion.


        Stefan





  reply	other threads:[~2011-01-27 17:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <B4C0695C-5EDB-4196-A9A9-7ACF2A695634@gmail.com>
2011-01-26 15:14 ` bug#7920: 24.0.50; Crash in balance_an_interval + 26 David Reitter
2011-01-27  3:31   ` Stefan Monnier
2011-01-27 16:32     ` Edgar Gonçalves
2011-01-27 17:37       ` Stefan Monnier [this message]
2012-03-27  0:29         ` Glenn Morris

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/emacs/

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

  git send-email \
    --in-reply-to=jwvwrlqjm5l.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=7920@debbugs.gnu.org \
    --cc=david.reitter@gmail.com \
    --cc=edgar.goncalves@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).