From unknown Mon Aug 18 08:27:34 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#17986 <17986@debbugs.gnu.org> To: bug#17986 <17986@debbugs.gnu.org> Subject: Status: 24.3.92; Evaluating (setq default-directory nil) freezes Emacs Reply-To: bug#17986 <17986@debbugs.gnu.org> Date: Mon, 18 Aug 2025 15:27:34 +0000 retitle 17986 24.3.92; Evaluating (setq default-directory nil) freezes Emacs reassign 17986 emacs submitter 17986 Stephen Berman severity 17986 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 10 08:28:13 2014 Received: (at submit) by debbugs.gnu.org; 10 Jul 2014 12:28:14 +0000 Received: from localhost ([127.0.0.1]:51788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5DSL-0000b0-LS for submit@debbugs.gnu.org; Thu, 10 Jul 2014 08:28:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56855) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X5DSF-0000Zv-PZ for submit@debbugs.gnu.org; Thu, 10 Jul 2014 08:28:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5DS3-0004mB-DA for submit@debbugs.gnu.org; Thu, 10 Jul 2014 08:27:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:37508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5DS3-0004m2-A9 for submit@debbugs.gnu.org; Thu, 10 Jul 2014 08:27:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5DRw-0002Jq-AT for bug-gnu-emacs@gnu.org; Thu, 10 Jul 2014 08:27:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5DRj-0004dp-Tr for bug-gnu-emacs@gnu.org; Thu, 10 Jul 2014 08:27:42 -0400 Received: from mout.gmx.net ([212.227.15.18]:50068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5DRj-0004cG-K4 for bug-gnu-emacs@gnu.org; Thu, 10 Jul 2014 08:27:31 -0400 Received: from rosalinde.fritz.box ([89.245.109.192]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MKHtm-1X3Ykm3epa-001jge for ; Thu, 10 Jul 2014 14:27:30 +0200 From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 24.3.92; Evaluating (setq default-directory nil) freezes Emacs Date: Thu, 10 Jul 2014 14:27:30 +0200 Message-ID: <87pphdwg99.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:RL8kaGcdq/NwkGFR/m7HxpC1yAfdkRMAR7P9p0CVjxxNBUhHiXO zV5/hNsX2NAoUofRfL6Mx6cRmRVRf9gy5i7x7Gq1UKi3AVe1wwn2twjCmTeN1JwAaG79EUL AU9lrjW7Ks7eBi2U+f4JqQavDp0r3v99i+W5B5ugD7xJTnButCV9pgesKWhII5weX/fHaAw ahlIIv7bLF3koIQ9I8Zpw== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) 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. This happens in both emacs-24 and the trunk. The C backtrace seems to differ depending on how quickly I type `z' in gdb and whether I start Emacs with -Q or with -Q -D. If no one else can reproduce this, I can supply backtraces. So far, I've gotten as the only Lisp backtrace "redisplay_internal (C function)" (twice with emacs-24 from July 7) and (after updating to current sources) "command-error-default-function" (twice with trunk, once with emacs-24). I know that default-directory is documented as being a string, though its global value is "nil" (and evaluating (setq-default default-directory nil) is unproblematic). Still, Emacs shouldn't just freeze up. FWIW, it hit this problem while testing code that sets default-directory to the value of a variable, which in the course of testing at one point happened to be nil. In GNU Emacs 24.3.92.7 (x86_64-suse-linux-gnu, GTK+ Version 3.10.4) of 2014-07-10 on rosalinde Repository revision: 117368 monnier@iro.umontreal.ca-20140709185406-m0q0fjepl42pcrqx Windowing system distributor `The X.Org Foundation', version 11.0.11403901 System Description: openSUSE 13.1 (Bottle) (x86_64) Configured using: `configure --without-toolkit-scroll-bars CFLAGS=-g3' Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Memory information: ((conses 16 363760 33883) (symbols 48 50640 0) (miscs 40 392 740) (strings 32 91952 9976) (string-bytes 1 3053626) (vectors 16 39068) (vector-slots 8 1553444 171631) (floats 8 853 677) (intervals 56 16382 141) (buffers 960 38) (heap 1024 52675 1862)) From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 13 10:54:35 2014 Received: (at 17986) by debbugs.gnu.org; 13 Jul 2014 14:54:35 +0000 Received: from localhost ([127.0.0.1]:53809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X6LAh-0004Vb-2r for submit@debbugs.gnu.org; Sun, 13 Jul 2014 10:54:35 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:65146) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X6LAe-0004VL-Jx for 17986@debbugs.gnu.org; Sun, 13 Jul 2014 10:54:33 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N8N00000NXZP100@a-mtaout20.012.net.il> for 17986@debbugs.gnu.org; Sun, 13 Jul 2014 17:54:26 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8N00038O2P5U60@a-mtaout20.012.net.il>; Sun, 13 Jul 2014 17:54:26 +0300 (IDT) Date: Sun, 13 Jul 2014 17:54:35 +0300 From: Eli Zaretskii Subject: Re: bug#17986: 24.3.92; Evaluating (setq default-directory nil) freezes Emacs In-reply-to: <87pphdwg99.fsf@rosalinde.fritz.box> X-012-Sender: halo1@inter.net.il To: Stephen Berman Message-id: <834myl9ums.fsf@gnu.org> References: <87pphdwg99.fsf@rosalinde.fritz.box> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17986 Cc: 17986@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stephen Berman > 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. > This happens in both emacs-24 and the trunk. The C backtrace seems to > differ depending on how quickly I type `z' in gdb and whether I start > Emacs with -Q or with -Q -D. If no one else can reproduce this, I can > supply backtraces. So far, I've gotten as the only Lisp backtrace > "redisplay_internal (C function)" (twice with emacs-24 from July 7) and > (after updating to current sources) "command-error-default-function" > (twice with trunk, once with emacs-24). 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. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 14 15:31:57 2014 Received: (at control) by debbugs.gnu.org; 14 Jul 2014 19:31:58 +0000 Received: from localhost ([127.0.0.1]:54943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X6lya-0005YN-H8 for submit@debbugs.gnu.org; Mon, 14 Jul 2014 15:31:57 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:33288 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X6lyT-0005Y4-Mz for control@debbugs.gnu.org; Mon, 14 Jul 2014 15:31:50 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1X6lyT-00031Z-9V for control@debbugs.gnu.org; Mon, 14 Jul 2014 15:31:45 -0400 Date: Mon, 14 Jul 2014 15:31:45 -0400 Message-Id: Subject: control message for bug 17986 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) close 17986 24.3.93 From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 15 07:41:25 2014 Received: (at 17986) by debbugs.gnu.org; 15 Jul 2014 11:41:25 +0000 Received: from localhost ([127.0.0.1]:55310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X716m-0007nd-V7 for submit@debbugs.gnu.org; Tue, 15 Jul 2014 07:41:25 -0400 Received: from mout.gmx.net ([212.227.15.18]:63482) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X716h-0007nI-4L for 17986@debbugs.gnu.org; Tue, 15 Jul 2014 07:41:19 -0400 Received: from rosalinde.fritz.box ([89.245.106.212]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LomuB-1WeotE2aGx-00gnzf; Tue, 15 Jul 2014 13:41:07 +0200 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#17986: 24.3.92; Evaluating (setq default-directory nil) freezes Emacs References: <87pphdwg99.fsf@rosalinde.fritz.box> <834myl9ums.fsf@gnu.org> Date: Tue, 15 Jul 2014 13:41:02 +0200 In-Reply-To: <834myl9ums.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 13 Jul 2014 17:54:35 +0300") Message-ID: <871ttm97e9.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:O5ZR1bNkHGlREMrFu5l3LvKeeB3PcTQpa3lYsXWIw8gonjgEtSc TfCzkoBOzeVncTBLYWozet7jX+9CCcuK/0MLFqt6kFjf/iK9cX9+FnIGBZgfHg0B/+eJn1y Xnqkisj7fSRVMhKbAFGUecyHa5vtX+CTT2EoW1XG031AYIt5GfVvNV9EFA3+5yXp3HrCBnl LNf1m1EtKVzXTaM7bxTvQ== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 17986 Cc: 17986@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Sun, 13 Jul 2014 17:54:35 +0300 Eli Zaretskii wrote: >> From: Stephen Berman >> 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. > 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? Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 15 10:27:50 2014 Received: (at 17986) by debbugs.gnu.org; 15 Jul 2014 14:27:50 +0000 Received: from localhost ([127.0.0.1]:55729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X73hq-0003YF-4L for submit@debbugs.gnu.org; Tue, 15 Jul 2014 10:27:50 -0400 Received: from mtaout25.012.net.il ([80.179.55.181]:42464) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X73hk-0003Xu-IM for 17986@debbugs.gnu.org; Tue, 15 Jul 2014 10:27:44 -0400 Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N8R00200BVHMV00@mtaout25.012.net.il> for 17986@debbugs.gnu.org; Tue, 15 Jul 2014 17:23:13 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8R00IJQBYOFL90@mtaout25.012.net.il>; Tue, 15 Jul 2014 17:23:13 +0300 (IDT) Date: Tue, 15 Jul 2014 17:27:48 +0300 From: Eli Zaretskii Subject: Re: bug#17986: 24.3.92; Evaluating (setq default-directory nil) freezes Emacs In-reply-to: <871ttm97e9.fsf@rosalinde.fritz.box> X-012-Sender: halo1@inter.net.il To: Stephen Berman Message-id: <83fvi28zob.fsf@gnu.org> References: <87pphdwg99.fsf@rosalinde.fritz.box> <834myl9ums.fsf@gnu.org> <871ttm97e9.fsf@rosalinde.fritz.box> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 17986 Cc: 17986@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stephen Berman > 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 wrote: > > >> From: Stephen Berman > >> 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.) From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 15 14:50:14 2014 Received: (at 17986) by debbugs.gnu.org; 15 Jul 2014 18:50:14 +0000 Received: from localhost ([127.0.0.1]:55818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X77nm-00029a-Gs for submit@debbugs.gnu.org; Tue, 15 Jul 2014 14:50:14 -0400 Received: from mout.gmx.net ([212.227.15.18]:55462) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X77ne-00028j-TM for 17986@debbugs.gnu.org; Tue, 15 Jul 2014 14:50:07 -0400 Received: from rosalinde.fritz.box ([89.245.106.212]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0M9aX9-1XHGYO1eu7-00D3RS; Tue, 15 Jul 2014 20:49:55 +0200 From: Stephen Berman To: Eli Zaretskii Subject: Re: bug#17986: 24.3.92; Evaluating (setq default-directory nil) freezes Emacs References: <87pphdwg99.fsf@rosalinde.fritz.box> <834myl9ums.fsf@gnu.org> <871ttm97e9.fsf@rosalinde.fritz.box> <83fvi28zob.fsf@gnu.org> Date: Tue, 15 Jul 2014 20:49:52 +0200 In-Reply-To: <83fvi28zob.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 15 Jul 2014 17:27:48 +0300") Message-ID: <878unusbhr.fsf@rosalinde.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:IIpLzS4pe07Vq4jcI7F7bkKZy2kLZnawQIN2OsKWzsq38AiZyhM lROmSMxRqGFiEeuz/4hHmwrGif2I5E0HBPzU3fSfkbbe0YBE520hF+AXO0G2DW7cI/h2ffd UocM3aVOEHK/QAaTOCbrSmcDML3uj8FqFkF7bj77J/X7pSxFu+CequqrEmoO+7yV0RBYI+j ezu2snywcy7wpw3rLcSqg== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 17986 Cc: 17986@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Tue, 15 Jul 2014 17:27:48 +0300 Eli Zaretskii wrote: >> 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. Oh, dear. I apologize for my hasty and careless reading of etc/DEBUG. > 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.) Thanks for the elucidation; I'll try to remember to apply it the next time. Steve Berman From unknown Mon Aug 18 08:27:34 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 13 Aug 2014 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator