unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 17986@debbugs.gnu.org
Subject: bug#17986: 24.3.92; Evaluating (setq default-directory nil) freezes Emacs
Date: Tue, 15 Jul 2014 17:27:48 +0300	[thread overview]
Message-ID: <83fvi28zob.fsf@gnu.org> (raw)
In-Reply-To: <871ttm97e9.fsf@rosalinde.fritz.box>

> From: Stephen Berman <stephen.berman@gmx.net>
> Cc: 17986@debbugs.gnu.org
> Date: Tue, 15 Jul 2014 13:41:02 +0200
> 
> On Sun, 13 Jul 2014 17:54:35 +0300 Eli Zaretskii <eliz@gnu.org> wrote:
> 
> >> From: Stephen Berman <stephen.berman@gmx.net>
> >> Date: Thu, 10 Jul 2014 14:27:30 +0200
> >> 
> >> 0. Start Emacs with -Q or -Q -D
> >> 1. Type (setq default-directory nil) in *scratch* and evaluate it.
> >> => Emacs freezes uninterruptibly and uses up to 90% CPU; I have to kill
> >> it from outside.
> >
> > Should be fixed in revision 117376 on the emacs-24 branch.
> 
> For the record, I confirm that this fixes it; thanks.

Thanks for verification.

> > When Emacs becomes unresponsive, it is best to attach a debugger to a
> > running Emacs process, and then use the procedure described in
> > etc/DEBUG (under "If the symptom of the bug is that Emacs fails to
> > respond") to find out which function infloops; then include this
> > information in the bug report.
> 
> I tried doing this, but neither with `s' nor with `f' did gdb show what
> I could recognize as an infloop (`f' always went straight to frame #0,
> and `s' never got to a loop, though I entered it very many times).  Is
> there something more specific I could do the next time?

etc/DEBUG doesn't say to use `s' and `f', it says to use 'finish' and
'next'.  'f' is not an abbreviation of 'finish', it is an abbreviation
of 'frame'.  Also, 'step', or 's', is not useful in this situation,
because it simply undoes what you did with 'finish', by getting you
deeper and deeper into the code from which you just emerged.

The idea of that procedure is to first find the function where Emacs
loops, by repeated 'finish' commands until 'finish' doesn't return,
i.e. does not print a higher frame number and the value returned by
the lower frame.  Then step with 'next' through the looping function
and see why it loops, i.e. why it fails to return.  (In this case, it
failed to return because displaying the mode line signaled an error,
which immediately triggered another redisplay.)





  reply	other threads:[~2014-07-15 14:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10 12:27 bug#17986: 24.3.92; Evaluating (setq default-directory nil) freezes Emacs Stephen Berman
2014-07-13 14:54 ` Eli Zaretskii
2014-07-15 11:41   ` Stephen Berman
2014-07-15 14:27     ` Eli Zaretskii [this message]
2014-07-15 18:49       ` Stephen Berman

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=83fvi28zob.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=17986@debbugs.gnu.org \
    --cc=stephen.berman@gmx.net \
    /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).