unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Geoff Shannon <geoffpshannon@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 17713@debbugs.gnu.org
Subject: bug#17713: First portion of `bt full`
Date: Fri, 6 Jun 2014 01:51:42 -0700	[thread overview]
Message-ID: <CA+pAvvwgKamJQsJEEAV_bRa-Jxqz-6eyu_VaeQehXh6YDOcpAg@mail.gmail.com> (raw)
In-Reply-To: <83egz24fec.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2025 bytes --]

On Fri, Jun 6, 2014 at 1:21 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Geoff Shannon <geoffpshannon@gmail.com>
> > Date: Fri, 6 Jun 2014 01:06:43 -0700
> > Cc: 17713@debbugs.gnu.org
> >
> > > Did you customize any GC-related options, like gc-cons-threshold?
> >
> > I didn't personally, but I use emacs Prelude which does this:
> >
> > (setq gc-cons-threshold 50000000)
>
> That's 50MB!  The default is 400000 (400K).
>
> > I'm guessing that's likely the cause of this?
>
> Could well be.  It means Emacs invokes GC after it has created at
> least 50MB worth of Lisp objects.  Wading through all of them and
> finding those which can be discarded will indeed take a while.
>
> I suggest you remove that customization.  The default is well tuned,
> and you will hardly ever notice GC going on.
>

I'm very on board with using the default, especially if this is a possible
result.

Also, some more evidence which seems to my gc-cons-threshold as the problem:
It appears that the 'hung' emacs is still responsive, _occasionally_.  As
in, during a
random test for responsive-ness (i.e. mashing on the keyboard) I got the
cursor to
move one space forwards.  Then no more.

My theory is that the GC is running (which takes a while because it was
allowed to get
so big).  Then because it's not getting much smaller (am I correct in
thinking that emacs
does conservative GC?), it almost immediately goes back to trying to GC,
which
again takes a while.

Basically, since the number of lisp objects is so large, the GC takes up
way too much
time since it takes so long to run. So the trade-off for putting that limit
so high is
no garbage collection for a LONG time, and then after that garbage
collection takes
all the available time...  Not good.

So, if this theory is correct, then the reproduction of this bug should be
to use emacs for
a while with the gc-cons-threshold turned up high.  And eventually this
should happen again.

Seems like this can probably be closed as 'User error'.

-- 
Geoff

Nothing is ever easy.

[-- Attachment #2: Type: text/html, Size: 3233 bytes --]

  reply	other threads:[~2014-06-06  8:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-06  7:08 bug#17713: 24.3.91; Emacs hung in GC? Geoff Shannon
2014-06-06  7:13 ` bug#17713: First Portion of 'backtrace` Geoff Shannon
2014-06-06  7:14 ` bug#17713: First portion of `bt full` Geoff Shannon
2014-06-06  7:49   ` Eli Zaretskii
2014-06-06  7:57     ` Geoff Shannon
2014-06-06  8:00       ` Eli Zaretskii
2014-06-06  8:06         ` Geoff Shannon
2014-06-06  8:21           ` Eli Zaretskii
2014-06-06  8:51             ` Geoff Shannon [this message]
2014-06-06 13:46               ` Stefan Monnier
2014-06-06  7:32 ` bug#17713: Compressed Forms of 'backtrace' and 'bt full' output Geoff Shannon
2014-06-06  7:56   ` Eli Zaretskii
2014-06-06  7:59     ` Geoff Shannon
2014-06-06  8:04       ` Eli Zaretskii
2014-06-06 13:41       ` Stefan Monnier
2014-06-06 15:34 ` bug#17713: 24.3.91; Emacs hung in GC? Stefan Monnier
2014-06-08 22:01   ` Geoff Shannon

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=CA+pAvvwgKamJQsJEEAV_bRa-Jxqz-6eyu_VaeQehXh6YDOcpAg@mail.gmail.com \
    --to=geoffpshannon@gmail.com \
    --cc=17713@debbugs.gnu.org \
    --cc=eliz@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.
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).