From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Resent-From: jcornez@ravenpack.com (Jason Cornez) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Jul 2010 16:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6585@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.12786062373280 (code B ref -1); Thu, 08 Jul 2010 16:24:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Jul 2010 16:23:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWttE-0000qr-Ou for submit@debbugs.gnu.org; Thu, 08 Jul 2010 12:23:57 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWsYp-0000E1-5k for submit@debbugs.gnu.org; Thu, 08 Jul 2010 10:58:48 -0400 Received: from lists.gnu.org ([199.232.76.165]:59557) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OWsYk-0005gD-5f for submit@debbugs.gnu.org; Thu, 08 Jul 2010 10:58:42 -0400 Received: from [140.186.70.92] (port=60100 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWsYi-0007Ce-HE for bug-gnu-emacs@gnu.org; Thu, 08 Jul 2010 10:58:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, FSL_HELO_NON_FQDN_1 autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWsYh-0002ZT-1H for bug-gnu-emacs@gnu.org; Thu, 08 Jul 2010 10:58:40 -0400 Received: from 88.red-80-26-102.staticip.rima-tde.net ([80.26.102.88]:58759 helo=dev268-l) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWsYg-0002Yu-Ex for bug-gnu-emacs@gnu.org; Thu, 08 Jul 2010 10:58:39 -0400 Received: by dev268-l (Postfix, from userid 1000) id C46AE80333; Thu, 8 Jul 2010 16:19:06 +0200 (CEST) Message-Id: <20100708141906.C46AE80333@dev268-l> Date: Thu, 8 Jul 2010 16:19:06 +0200 (CEST) From: jcornez@ravenpack.com (Jason Cornez) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Thu, 08 Jul 2010 12:23:55 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) ---- Hello, I am using emacs for lisp programming. Emacs talks to the lisp image using sockets; the lisp runs as a subprocess. If a background lisp thread enters the lisp debugger, this opens a new buffer in emacs visible in some window where it is possible to debug the problem. Usually this all works fine. However, if I am currently interacting with emacs in the minibuffer at the time the lisp tries to open the new window, then emacs hangs and consumes 100% CPU (for one core). By "iteracting" I simply mean that the emacs focus is in the minibuffer, such as for C-x C-f. I don't need to be actively typing or anything. That is, the minibuffer is active. The emacs process seems to be entirely unresponsive: the cursor stops blinking, no keyboard input is accepted, the menus do not activate, sending commands like "emacsclient -e '(abort-recursive-edit)'" just hang and do nothing. The only thing I can do is kill the emacs process. This is very easy for me to reproduce, and I think it should not be too hard to replicate my environment. I also suspect that something other than the background lisp which also would attempt to communicate with emacs similarly while the minibuffer is active would have the same result. I haven't been able to come up an idea here yet. 1. I use Franz Allegro Common Lisp 8.2 and it communicates with emacs via ELI (emacs lisp interface, also from Franz). There is a freely downloadable trial version of this available. www.franz.com 2. Start emacs and launch the lisp. This is just a matter of invoking M-x fi:common-lisp from emacs. The Franz documentation details this if interested. 3. At the lisp prompt: CL-USER(1): (mp:process-run-function "foo" (lambda () (sleep 5) (break "foo"))) 4. Immediately after hitting above, then do C-x C-f and just wait until the 5 seconds expire. Emacs is now hung as I described above. (If you don't activate the minibuffer within 5 seconds, you'll end up in a new buffer *background-interaction* where you can debug the lisp process.) Even though the steps above involve Franz ACL8.2 and ELI, I don't think the problem is at all specific to this. If someone can suggest a more typical way of getting a background/child process to communicate with emacs asynchronously, I'll be happy to try to reproduce the problem. Thank you, -Jason ---- In GNU Emacs 23.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-03-29 on yellow, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.10706000 configured using `configure '--build=x86_64-linux-gnu' '--host=x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Apropos Minor modes in effect: csv-field-index-mode: t desktop-save-mode: t display-time-mode: t partial-completion-mode: t diff-auto-refine-mode: t xterm-mouse-mode: t show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t Recent input: d SPC t h i s SPC c a u s e s SPC d SPC p r i n t - t o M-/ a s s - x m n l SPC t o SPC g e t SPC c o n f u s e d . SPC SPC A l s o SPC n e e d e d SPC t o SPC f i x SPC u p SPC t h e SPC d e b u g g i n g SPC c o d e SPC i n SPC e v e M-/ SPC a l o n g SPC t h e SPC w a y . C-c C-c g C-c r M-x t o g g e l l e - f o C-g M-x f o n t l m M-x f o n t - l o m C-x C-f e - n C-x k C-x C-f M-p M-x e m - r b u g C-g C-h a b u g C-x o C-x 1 M-> Recent messages: Expansion found in '*magit: ravenpack*' Git finished. package specification is `com.ravenpack.news.classification' Quit Font-Lock mode disabled Font-Lock mode enabled package specification is `com.ravenpack.news.classification' Quit Type C-x 1 to remove help window. Mark set From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Jul 2010 16:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: jcornez@ravenpack.com (Jason Cornez) Cc: 6585@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.12786080954216 (code B ref 6585); Thu, 08 Jul 2010 16:55:02 +0000 Received: (at 6585) by debbugs.gnu.org; 8 Jul 2010 16:54:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWuNC-00015x-Vy for submit@debbugs.gnu.org; Thu, 08 Jul 2010 12:54:55 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWuNA-00015r-9x for 6585@debbugs.gnu.org; Thu, 08 Jul 2010 12:54:53 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L5900K0002DN400@a-mtaout20.012.net.il> for 6585@debbugs.gnu.org; Thu, 08 Jul 2010 19:54:25 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.127.120.144]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L5900IV20AOYF40@a-mtaout20.012.net.il>; Thu, 08 Jul 2010 19:54:25 +0300 (IDT) Date: Thu, 08 Jul 2010 19:52:24 +0300 From: Eli Zaretskii In-reply-to: <20100708141906.C46AE80333@dev268-l> X-012-Sender: halo1@inter.net.il Message-id: <83iq4p7w6v.fsf@gnu.org> References: <20100708141906.C46AE80333@dev268-l> X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Date: Thu, 8 Jul 2010 16:19:06 +0200 (CEST) > From: jcornez@ravenpack.com (Jason Cornez) > Cc: > > However, if I am currently interacting with emacs in the minibuffer at > the time the lisp tries to open the new window, then emacs hangs and > consumes 100% CPU (for one core). By "iteracting" I simply mean that > the emacs focus is in the minibuffer, such as for C-x C-f. I don't > need to be actively typing or anything. That is, the minibuffer is > active. > > The emacs process seems to be entirely unresponsive: the cursor stops > blinking, no keyboard input is accepted, the menus do not activate, > sending commands like "emacsclient -e '(abort-recursive-edit)'" just > hang and do nothing. The only thing I can do is kill the emacs > process. You can help debugging this if you attach GDB to Emacs when it hangs like that, and see where it is looping. The file etc/DEBUG in the Emacs source tree has some advice how to debug these problems, under "If the symptom of the bug is that Emacs fails to respond". From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer References: <20100708141906.C46AE80333@dev268-l> In-Reply-To: <20100708141906.C46AE80333@dev268-l> Resent-From: "Jason S. Cornez" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Jul 2010 07:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.127865922728571 (code B ref 6585); Fri, 09 Jul 2010 07:08:02 +0000 Received: (at 6585) by debbugs.gnu.org; 9 Jul 2010 07:07:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OX7fu-0007Qm-M9 for submit@debbugs.gnu.org; Fri, 09 Jul 2010 03:07:07 -0400 Received: from out3.smtp.messagingengine.com ([66.111.4.27]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OX7fs-0007QQ-0E for 6585@debbugs.gnu.org; Fri, 09 Jul 2010 03:07:04 -0400 Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 05C32167461 for <6585@debbugs.gnu.org>; Fri, 9 Jul 2010 03:07:01 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 09 Jul 2010 03:07:01 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:subject:content-type:content-transfer-encoding; s=smtpout; bh=TM1SpZYbr6AL5BEUcNrXZoeHuKw=; b=gR0EW/q5VxtMH3+PiZQios/rCGeEqXrPik6Ik3OrbriPuqaP1s5m27wEiDZofHtY2Ocw3TL80dJL2nlobcKkooS2DJLJqCOsamYZxJ4l0YeL5eMcRdbVfRzcRn39cWehSj0wMsv+B8cU5KjjHtHDN81LQsHhFQOa70BtPGyXYZY= X-Sasl-enc: DUQbTg6zWD5EGNYY3RTPd3iSbc9NenzyfJIMracetJ/T 1278659220 Received: from [10.1.3.5] (unknown [83.39.117.46]) by mail.messagingengine.com (Postfix) with ESMTPSA id 403C04D49AF for <6585@debbugs.gnu.org>; Fri, 9 Jul 2010 03:07:00 -0400 (EDT) Message-ID: <4C36CA92.1000202@ravenpack.com> Date: Fri, 09 Jul 2010 09:06:58 +0200 From: "Jason S. Cornez" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12pre) Gecko/20100703 Lightning/1.0b1 Shredder/3.0.6pre ThunderBrowse/3.3 MIME-Version: 1.0 X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm running the emacs23 that comes with k/unbuntu. I didn't build it myself and it apparently doesn't have debugging info in the image. And so what follows may not be so helpful. But none the less this is the gdb session. You can see the ^Z at every point where emacs was failing to respond. I suppose I'll have to build my own emacs to be able to provide anything further that might be helpful. I'd just like to confirm that this doesn't sound familiar to anyone. And maybe someone has a suggestion for a more common-place scenario that might trigger this (rather than my steps to reproduce which involve Allegro Common Lisp). - -Jason $ gdb emacs GNU gdb (GDB) 7.1-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/bin/emacs...(no debugging symbols found)...done.(gdb) run Starting program: /usr/bin/emacs [Thread debugging using libthread_db enabled] ^Z Program received signal SIGTSTP, Stopped (user). 0x000000000058bef9 in ?? () (gdb) step Cannot find bounds of current function (gdb) finish Run till exit from #0 0x000000000058bef9 in ?? () Program received signal SIGTSTP, Stopped (user). 0x000000000058bef9 in ?? () (gdb) finish Run till exit from #0 0x000000000058bef9 in ?? () ^Z Program received signal SIGTSTP, Stopped (user). 0x000000000058b3c6 in ?? () (gdb) finish Run till exit from #0 0x000000000058b3c6 in ?? () Program received signal SIGTSTP, Stopped (user). 0x000000000058b3c6 in ?? () (gdb) finish Run till exit from #0 0x000000000058b3c6 in ?? () ^Z Program received signal SIGTSTP, Stopped (user). 0x000000000058befe in ?? () (gdb) finish Run till exit from #0 0x000000000058befe in ?? () Program received signal SIGTSTP, Stopped (user). 0x000000000058befe in ?? () (gdb) next Cannot find bounds of current function (gdb) finish Run till exit from #0 0x000000000058befe in ?? () ^Z Program received signal SIGTSTP, Stopped (user). 0x0000000000553ef2 in ?? () (gdb) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkw2ypIACgkQQlm6HDTMLyM44ACfTagZPEy6x3v5IOTOKNJ6EEvI Q4oAoJb3LUYmcbdtM2FQN0NFEAPXS1Ll =k0I5 -----END PGP SIGNATURE----- From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer References: <20100708141906.C46AE80333@dev268-l> In-Reply-To: <20100708141906.C46AE80333@dev268-l> Resent-From: "Jason S. Cornez" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Jul 2010 10:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.127910328012443 (code B ref 6585); Wed, 14 Jul 2010 10:28:02 +0000 Received: (at 6585) by debbugs.gnu.org; 14 Jul 2010 10:28:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OYzC3-0003Ee-O5 for submit@debbugs.gnu.org; Wed, 14 Jul 2010 06:28:00 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OYzC0-0003EZ-W5 for 6585@debbugs.gnu.org; Wed, 14 Jul 2010 06:27:57 -0400 Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id C806816E426 for <6585@debbugs.gnu.org>; Wed, 14 Jul 2010 06:27:51 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Wed, 14 Jul 2010 06:27:51 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:subject:content-type:content-transfer-encoding; s=smtpout; bh=5EW6JfWG2VJifIleHoLbbhPL8nc=; b=PV+PCyVdpkBGx2PvOIJ/x/CKn6ZBWUjRymNCfxOcC+HrjxmYWPj/j+1Lg3d3Sq6gmvAOSyT+Bb0pgsPLbAcQVn2o1axDteLJazKQTK9i9ENJNU5Gm9O9dAJ/19yC9xm0jZEwCHdbhdkAmRJr6SS9Dmedkx8sonbMVFALyw0x098= X-Sasl-enc: W9QKzmcVUsxcIMuqM/wOrlEoBCjJ7flEwLW1EhUoaYc7 1279103270 Received: from [10.1.3.5] (unknown [83.39.117.46]) by mail.messagingengine.com (Postfix) with ESMTPSA id 0C1ED4B360E for <6585@debbugs.gnu.org>; Wed, 14 Jul 2010 06:27:49 -0400 (EDT) Message-ID: <4C3D9122.2010209@ravenpack.com> Date: Wed, 14 Jul 2010 12:27:46 +0200 From: "Jason S. Cornez" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12pre) Gecko/20100712 Lightning/1.0b1 Shredder/3.0.7pre ThunderBrowse/3.3.1 MIME-Version: 1.0 X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've built emacs 23.2 (using http://ftp.gnu.org/pub/gnu/emacs/emacs-23.2.tar.bz2) on my system and I can still reproduce the non-responsive behavior. Here is the gdb session. - ---- $ gdb ./emacs GNU gdb (GDB) 7.1-ubuntu Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/local/emacs-23.2/src/emacs...done. SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] DISPLAY = :0.0 TERM = xterm-256color Breakpoint 1 at 0x4d5cd0: file emacs.c, line 431. Temporary breakpoint 2 at 0x4f6510: file sysdep.c, line 1129. (gdb) run Starting program: /usr/local/emacs-23.2/src/emacs [Thread debugging using libthread_db enabled] ^Z Program received signal SIGTSTP, Stopped (user). Fbyte_code (bytestr=11586322, vector=11586322, maxdepth=) at bytecode.c:494 494 op = op - Bvarref; (gdb) step 495 goto varref; (gdb) finish Run till exit from #0 Fbyte_code (bytestr=11586322, vector=11586322, maxdepth=) at bytecode.c:495 ^Z Program received signal SIGTSTP, Stopped (user). 0x0000000000589af0 in Fbyte_code (bytestr=11586322, vector=0, maxdepth=) at bytecode.c:506 506 if (SYMBOLP (v1)) (gdb) finish Run till exit from #0 0x0000000000589af0 in Fbyte_code (bytestr=11586322, vector=0, maxdepth=) at bytecode.c:506 ^Z Program received signal SIGTSTP, Stopped (user). 0x00000000005884c3 in Fbyte_code (bytestr=13023440, vector=0, maxdepth=) at bytecode.c:482 482 switch (op) (gdb) next 660 op -= Bcall; (gdb) next 664 DISCARD (op); (gdb) next 663 BEFORE_POTENTIAL_GC (); (gdb) next 680 TOP = Ffuncall (op + 1, &TOP); (gdb) next 664 DISCARD (op); (gdb) next 680 TOP = Ffuncall (op + 1, &TOP); (gdb) next 681 AFTER_POTENTIAL_GC (); (gdb) next 680 TOP = Ffuncall (op + 1, &TOP); (gdb) next 681 AFTER_POTENTIAL_GC (); (gdb) next 682 break; (gdb) next 479 op = FETCH; (gdb) next 482 switch (op) (gdb) next 479 op = FETCH; (gdb) next 482 switch (op) (gdb) next 617 v1 = TOP; (gdb) next 618 PUSH (v1); (gdb) next 619 break; (gdb) next 479 op = FETCH; (gdb) next 482 switch (op) (gdb) next 479 op = FETCH; (gdb) next 482 switch (op) (gdb) next 581 op -= Bvarset; (gdb) next 582 goto varset; (gdb) next 594 sym = vectorp[op]; (gdb) next 595 val = TOP; (gdb) next 594 sym = vectorp[op]; (gdb) next 598 if (SYMBOLP (sym) (gdb) next 600 && !XSYMBOL (sym)->indirect_variable (gdb) next 598 if (SYMBOLP (sym) (gdb) next 602 && !MISCP (XSYMBOL (sym)->value)) (gdb) next 603 XSYMBOL (sym)->value = val; (gdb) next 598 if (SYMBOLP (sym) (gdb) next 611 (void) POP; (gdb) next 612 break; (gdb) next 479 op = FETCH; (gdb) next 482 switch (op) (gdb) - ---- Hope this helps. - -Jason -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkw9kSIACgkQQlm6HDTMLyNG/wCg0bNiDVpr7WziKA2aJvrgNOF4 OuoAnjh8/xNHb8USr9JTjgv6+sxmRzX1 =yHME -----END PGP SIGNATURE----- From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Resent-From: "Jason S. Cornez" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Jul 2010 12:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.12791955266169 (code B ref 6585); Thu, 15 Jul 2010 12:06:02 +0000 Received: (at 6585) by debbugs.gnu.org; 15 Jul 2010 12:05:26 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZNBt-0001bS-AR for submit@debbugs.gnu.org; Thu, 15 Jul 2010 08:05:26 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZNBr-0001bJ-G8 for 6585@debbugs.gnu.org; Thu, 15 Jul 2010 08:05:24 -0400 Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 83D3B16F3F0 for <6585@debbugs.gnu.org>; Thu, 15 Jul 2010 08:05:17 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Thu, 15 Jul 2010 08:05:17 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=3sGbiMBmormDkjoScYOm0wXW9hc=; b=U1fAWxSqb6ILnXVCbf1sMOBazf+6cOebHxFks2bsUs/hT0LLQtxkZ+77iJyQ2oWQY4U8D1BtrMqe5WTkay2U5hxo4pJEGMn9QhzSwAlfomv7FYD02usMZfgk8PK6PgFgWus4n1DP+KTO+qMb8h70eloLy4btIsqhlwrBcSXSXlQ= X-Sasl-enc: b0/q8PQJ2AnEnPwbvyWzljc+8Iw9ub9MxPt8WFfOOm3f 1279195517 Received: from [10.1.3.5] (unknown [83.39.117.46]) by mail.messagingengine.com (Postfix) with ESMTPSA id CF5C04E18B9 for <6585@debbugs.gnu.org>; Thu, 15 Jul 2010 08:05:16 -0400 (EDT) Message-ID: <4C3EF97A.5080208@ravenpack.com> Date: Thu, 15 Jul 2010 14:05:14 +0200 From: "Jason S. Cornez" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12pre) Gecko/20100712 Lightning/1.0b1 Shredder/3.0.7pre ThunderBrowse/3.3.1 MIME-Version: 1.0 References: <20100708141906.C46AE80333@dev268-l> In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.1 (---) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I believe I have found the problem. A custom function to switch to a buffer is being called. It looks like... - ---- (defun my::switch-to-buffer (buffer) ;; if buffer is in some window, go to it, otherwise switch-to-buffer (let ((start (selected-window)) (current (next-window (selected-window) 'no-minibuffer 'visible)) (found nil)) (while (and (not (eq current start)) (not found)) (if (eq buffer (window-buffer current)) (setq found current)) (setq current (next-window current 'no-minibuffer 'visible))) (if (null found) (switch-to-buffer buffer) (select-window found)))) - ---- Now, if start == (selected-window) is the minibuffer, then it should be clear that current == (next-window ... 'no-minibuffer ...) will never result in (eq start current). And if the buffer that is passed in isn't visible then (not found) will never be nil and we are stuck in an infinite loop. So this part is not an emacs problem at all. But I am puzzled as to why if this is byte-compiled I can't C-g and break out of this. I'll fix my code and then the problem goes away. So if you want to consider this "not-a-bug", ok. But shouldn't C-g work here? Thanks, - -Jason -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkw++XoACgkQQlm6HDTMLyM0FACgivAX/CS3aQ8GjHguFJmPUoOs HkwAoOevvsIpPWnEYEHl/By38pnh4DqV =EHpz -----END PGP SIGNATURE----- From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Jul 2010 14:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Jason S. Cornez" Cc: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.127920586210912 (code B ref 6585); Thu, 15 Jul 2010 14:58:02 +0000 Received: (at 6585) by debbugs.gnu.org; 15 Jul 2010 14:57:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZPsb-0002px-Pu for submit@debbugs.gnu.org; Thu, 15 Jul 2010 10:57:42 -0400 Received: from mail.gmx.net ([213.165.64.20]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OZPsY-0002ps-FU for 6585@debbugs.gnu.org; Thu, 15 Jul 2010 10:57:40 -0400 Received: (qmail invoked by alias); 15 Jul 2010 14:57:47 -0000 Received: from 62-47-39-146.adsl.highway.telekom.at (EHLO [62.47.39.146]) [62.47.39.146] by mail.gmx.net (mp053) with SMTP; 15 Jul 2010 16:57:47 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19OeJMfBrdO/G1Plsem2UNSGSf07um8tD+ykhMnYK 5sx3HE42pZepYb Message-ID: <4C3F21E4.6070404@gmx.at> Date: Thu, 15 Jul 2010 16:57:40 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 References: <20100708141906.C46AE80333@dev268-l> <4C3EF97A.5080208@ravenpack.com> In-Reply-To: <4C3EF97A.5080208@ravenpack.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -2.5 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) > Now, if start == (selected-window) is the minibuffer, then it should be > clear that current == (next-window ... 'no-minibuffer ...) will never > result in (eq start current). And if the buffer that is passed in isn't > visible then (not found) will never be nil and we are stuck in an > infinite loop. Using `next-window' to find all windows is generally unsafe since windows might get created and deleted in between (in particular the one you named `start'). Always use `window-list' instead. The doc-string of `next-window' If you use consistent values for MINIBUF and ALL-FRAMES, you can use `next-window' to iterate through the entire cycle of acceptable windows, eventually ending up back at the window you started with. is IMHO misleading in this regard. > So this part is not an emacs problem at all. But I am puzzled as to why > if this is byte-compiled I can't C-g and break out of this. > > I'll fix my code and then the problem goes away. So if you want to > consider this "not-a-bug", ok. But shouldn't C-g work here? C-g should work. If it doesn't we have a bug. IIUC the only occurrence of `switch-to-buffer' is ifdefd out in the source code so there can't be any harm from an inhibit-quitted call from C. Could you try to run Emacs in the debugger to find out where it hangs? Or post a self-contained emacs -Q based recipe here? martin From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Resent-From: "Jason S. Cornez" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Jul 2010 15:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.127920802811862 (code B ref 6585); Thu, 15 Jul 2010 15:34:01 +0000 Received: (at 6585) by debbugs.gnu.org; 15 Jul 2010 15:33:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZQRY-00035H-Hv for submit@debbugs.gnu.org; Thu, 15 Jul 2010 11:33:48 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZQRV-00035B-Gk for 6585@debbugs.gnu.org; Thu, 15 Jul 2010 11:33:46 -0400 Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 5388216F09E; Thu, 15 Jul 2010 11:33:56 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Thu, 15 Jul 2010 11:33:56 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=RQAmLYVfEtR2Pj+exd5RMoc1OQE=; b=BWiEKhUfDpX5gNbcPcemLzyJpFngg+1+SDtE9WjzTUORXkaWfLZYYrUFPz082dAGqg2QRWVeNAZ/DYMSamVykbqzDA2TxWt05jAEES2IqbIqT+fz17mNVWNORL/frzi8Jlfp4Balcz5+jZ5DNyoM0KRtwUL7tulBLJOUyDNk+3w= X-Sasl-enc: qq8Ka0p4bzJzyQ1UNiBtp4fJMToXPriNuzSPEh2ODRxi 1279208035 Received: from [10.1.3.5] (unknown [83.39.117.46]) by mail.messagingengine.com (Postfix) with ESMTPSA id 573B14E19D5; Thu, 15 Jul 2010 11:33:55 -0400 (EDT) Message-ID: <4C3F2A61.9070809@ravenpack.com> Date: Thu, 15 Jul 2010 17:33:53 +0200 From: "Jason S. Cornez" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12pre) Gecko/20100712 Lightning/1.0b1 Shredder/3.0.7pre ThunderBrowse/3.3.1 MIME-Version: 1.0 References: <20100708141906.C46AE80333@dev268-l> <4C3EF97A.5080208@ravenpack.com> <4C3F21E4.6070404@gmx.at> In-Reply-To: <4C3F21E4.6070404@gmx.at> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.2 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.2 (---) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thanks Martin, The debugger run is posted above. If I have more time I can try to make a test case. I think it should be enough to define the function I did and byte-compile it. Then make emacs be waiting with the minibuffer active. Then from a terminal: emacsclient -e '(my::switch-to-buffer "buffer")' That's almost certainly not exactly correct and I haven't tried it, but it's the basic idea. - -Jason -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkw/KmEACgkQQlm6HDTMLyOdeQCfZOYNZQXjc299L7jzzdhiict9 qpgAn1zEnJr34lf4on7oO5thHmw6YSgA =qPMc -----END PGP SIGNATURE----- From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Resent-From: Johan =?UTF-8?Q?Bockg=C3=A5rd?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Jul 2010 15:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Jason S. Cornez" Cc: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.127920920512382 (code B ref 6585); Thu, 15 Jul 2010 15:54:02 +0000 Received: (at 6585) by debbugs.gnu.org; 15 Jul 2010 15:53:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZQkW-0003Df-Oa for submit@debbugs.gnu.org; Thu, 15 Jul 2010 11:53:24 -0400 Received: from smtprelay-h32.telenor.se ([213.150.131.5]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZQkU-0003DY-N4 for 6585@debbugs.gnu.org; Thu, 15 Jul 2010 11:53:23 -0400 Received: from ipb1.telenor.se (ipb1.telenor.se [195.54.127.164]) by smtprelay-h32.telenor.se (Postfix) with ESMTP id 0B6C1E923B for <6585@debbugs.gnu.org>; Thu, 15 Jul 2010 17:53:32 +0200 (CEST) X-SENDER-IP: [85.228.205.180] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As08AH/LPkxV5M20PGdsb2JhbACHcZdyDAEBAQE1Lb8bhSQE X-IronPort-AV: E=Sophos;i="4.55,209,1278280800"; d="scan'208";a="105827900" Received: from c-b4cde455.04-211-6c6b701.cust.bredbandsbolaget.se (HELO muon.localdomain) ([85.228.205.180]) by ipb1.telenor.se with ESMTP; 15 Jul 2010 17:53:32 +0200 Received: by muon.localdomain (Postfix, from userid 1000) id 7D68D48426F; Thu, 15 Jul 2010 17:53:31 +0200 (CEST) From: Johan =?UTF-8?Q?Bockg=C3=A5rd?= References: <20100708141906.C46AE80333@dev268-l> <4C3EF97A.5080208@ravenpack.com> Mail-Copies-To: never Date: Thu, 15 Jul 2010 17:53:31 +0200 In-Reply-To: <4C3EF97A.5080208@ravenpack.com> (Jason S. Cornez's message of "Thu, 15 Jul 2010 14:05:14 +0200") Message-ID: <87r5j42138.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) "Jason S. Cornez" writes: > I'll fix my code and then the problem goes away. So if you want to > consider this "not-a-bug", ok. But shouldn't C-g work here? Note that quitting is inhibited for code that runs from timers or process filters etc. (I don't know if this is your problem.) From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Resent-From: "Jason S. Cornez" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Jul 2010 16:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Johan =?UTF-8?Q?Bockg=C3=A5rd?= Cc: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.127920956712546 (code B ref 6585); Thu, 15 Jul 2010 16:00:03 +0000 Received: (at 6585) by debbugs.gnu.org; 15 Jul 2010 15:59:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZQqN-0003GJ-4b for submit@debbugs.gnu.org; Thu, 15 Jul 2010 11:59:27 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZQqL-0003GA-6W for 6585@debbugs.gnu.org; Thu, 15 Jul 2010 11:59:25 -0400 Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 4CAB916F3AB; Thu, 15 Jul 2010 11:59:36 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 15 Jul 2010 11:59:36 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=cqYoLsfdJLde3QoVD1sROSNdsnA=; b=JorZBeSpjm6xllfNo7sUnbPsIxXB55KK93pCFMKelH/5RJV2jm0mG+A11+1D/v5LS2EFNcTmwS1XlTziWnquq9qKEQiTvKwrx5pWz+qidQdUuT+dbRRYkb77TPoXFE1OlJkGlpRPGCR7fQ2EnKACpjMgH0FXd+misD3MS5iMuBY= X-Sasl-enc: 96lERSXJBWOMiBoJidXkMIir0OAUU08a4TXGGLIuK9pJ 1279209575 Received: from [10.1.3.5] (89.Red-83-36-62.staticIP.rima-tde.net [83.36.62.89]) by mail.messagingengine.com (Postfix) with ESMTPSA id 67D0311937; Thu, 15 Jul 2010 11:59:35 -0400 (EDT) Message-ID: <4C3F3065.20801@ravenpack.com> Date: Thu, 15 Jul 2010 17:59:33 +0200 From: "Jason S. Cornez" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12pre) Gecko/20100712 Lightning/1.0b1 Shredder/3.0.7pre ThunderBrowse/3.3.1 MIME-Version: 1.0 References: <20100708141906.C46AE80333@dev268-l> <4C3EF97A.5080208@ravenpack.com> <87r5j42138.fsf@gnu.org> In-Reply-To: <87r5j42138.fsf@gnu.org> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.6 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/15/2010 05:53 PM, Johan Bockg=E5rd wrote: > Note that quitting is inhibited for code that runs from timers or > process filters etc. (I don't know if this is your problem.) I've fully explained the situation above. The message which does initiate the elisp function with the infinite loop does come from an external process. So while there is obviously a bug in the elisp code (which I've now fixed) the resulting non-responsive emacs consuming the CPU seems like a bad thing and I really think I ought to be able to quit from this situation - indeed that I ought to be able to quit from just about any situation. - -Jason -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkw/MGUACgkQQlm6HDTMLyPNXQCg6B/4WdyNIOxu/axl5mg4m6jv eFoAoPVsDn0RQ1ncsQuSCm+oYxE/AkWP =3D+AsD -----END PGP SIGNATURE----- From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Jul 2010 08:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Jason S. Cornez" Cc: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.12792688276067 (code B ref 6585); Fri, 16 Jul 2010 08:28:02 +0000 Received: (at 6585) by debbugs.gnu.org; 16 Jul 2010 08:27:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZgGB-0001Zo-JX for submit@debbugs.gnu.org; Fri, 16 Jul 2010 04:27:07 -0400 Received: from mailout-de.gmx.net ([213.165.64.23] helo=mail.gmx.net) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OZgG8-0001ZS-6f for 6585@debbugs.gnu.org; Fri, 16 Jul 2010 04:27:05 -0400 Received: (qmail invoked by alias); 16 Jul 2010 08:27:15 -0000 Received: from 62-47-38-188.adsl.highway.telekom.at (EHLO [62.47.38.188]) [62.47.38.188] by mail.gmx.net (mp001) with SMTP; 16 Jul 2010 10:27:15 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+2qzAyXr+2y3bkBRy/FeWfXMEiqDqScjSp3iI5Qe YsAQvMTIh6EA5H Message-ID: <4C4017DB.3080602@gmx.at> Date: Fri, 16 Jul 2010 10:27:07 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 References: <20100708141906.C46AE80333@dev268-l> <4C3EF97A.5080208@ravenpack.com> <4C3F21E4.6070404@gmx.at> <4C3F2A61.9070809@ravenpack.com> In-Reply-To: <4C3F2A61.9070809@ravenpack.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Spam-Score: -2.5 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) > emacsclient -e '(my::switch-to-buffer "buffer")' > > That's almost certainly not exactly correct and I haven't tried it, but > it's the basic idea. It's still a mystery to me why this should happen only when you byte-compile my::switch-to-buffer. martin From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Resent-From: "Jason S. Cornez" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Jul 2010 08:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.12792695816469 (code B ref 6585); Fri, 16 Jul 2010 08:40:03 +0000 Received: (at 6585) by debbugs.gnu.org; 16 Jul 2010 08:39:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZgSL-0001gI-AG for submit@debbugs.gnu.org; Fri, 16 Jul 2010 04:39:41 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZgSI-0001gD-CC for 6585@debbugs.gnu.org; Fri, 16 Jul 2010 04:39:39 -0400 Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 0B2BF16F29C; Fri, 16 Jul 2010 04:39:51 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Fri, 16 Jul 2010 04:39:51 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=04JttZCjQZ0buQB+vf9NcanXclc=; b=omTDeFM700IHXLxuKwueE/tVo+rO0ArG/pnfKnJX8eEOG0sSPTMK3l8n/APEkHt3q0cbKKefJGOCY7zm756rn4iCkMIn8Fo2lySb0MCOKV20VUdImJ9wke6sS50ISPL2/nZuIyLYAamvenBEv+HapW169OORkhHkPHDFjVk35l0= X-Sasl-enc: FPEEX9iWpOUpTXyo99JXLizpaDOivj3AdQ1yYZJIkKix 1279269590 Received: from [10.1.3.5] (unknown [83.39.117.46]) by mail.messagingengine.com (Postfix) with ESMTPSA id 0A1944E1067; Fri, 16 Jul 2010 04:39:49 -0400 (EDT) Message-ID: <4C401AD3.7010005@ravenpack.com> Date: Fri, 16 Jul 2010 10:39:47 +0200 From: "Jason S. Cornez" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12pre) Gecko/20100712 Lightning/1.0b1 Shredder/3.0.7pre ThunderBrowse/3.3.1 MIME-Version: 1.0 References: <20100708141906.C46AE80333@dev268-l> <4C3EF97A.5080208@ravenpack.com> <4C3F21E4.6070404@gmx.at> <4C3F2A61.9070809@ravenpack.com> <4C4017DB.3080602@gmx.at> In-Reply-To: <4C4017DB.3080602@gmx.at> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.3 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/16/2010 10:27 AM, martin rudalics wrote: >> emacsclient -e '(my::switch-to-buffer "buffer")' >> >> That's almost certainly not exactly correct and I haven't tried it, but >> it's the basic idea. > > It's still a mystery to me why this should happen only when you > byte-compile my::switch-to-buffer. > > martin I apologize, that is an assumption which I didn't test. I do know that when I edebug the function (C-u C-M-x) then I can use C-g. And I could see gdb that emacs was stuck in bytecode.c. So I made the leap to byte compiled being part of the problem. Sorry for jumping to that conclusion. In truth I don't know if byte-compiling the function matters or not. And I still haven't had a chance to work on a stand-alone test case. Given that my own specific problem is resolved, I've mostly moved on. But if I find the time to help some more, I'll post what I find. Even if that is just to say that I can't isolate the problem. - -Jason -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxAGtMACgkQQlm6HDTMLyNZRgCfaV62a7Hk+W3ROFXVFoRqSaah rZoAnRPf251n9B+Bbfh6Aa0MuE2YuHyD =g5Yn -----END PGP SIGNATURE----- From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer References: <20100708141906.C46AE80333@dev268-l> In-Reply-To: <20100708141906.C46AE80333@dev268-l> Resent-From: "Jason S. Cornez" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Aug 2010 06:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.128323687916322 (code B ref 6585); Tue, 31 Aug 2010 06:42:01 +0000 Received: (at 6585) by debbugs.gnu.org; 31 Aug 2010 06:41:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqKX0-0004FD-DV for submit@debbugs.gnu.org; Tue, 31 Aug 2010 02:41:18 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqKWx-0004F6-JI for 6585@debbugs.gnu.org; Tue, 31 Aug 2010 02:41:16 -0400 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id C154C309 for <6585@debbugs.gnu.org>; Tue, 31 Aug 2010 02:42:52 -0400 (EDT) Received: from frontend1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 31 Aug 2010 02:42:52 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:subject:content-type:content-transfer-encoding; s=smtpout; bh=ZD5Cea/l0H8PbMxkDhjeruXvUh4=; b=DlKPdNfNnZvmE4Emxfsifb7TUXepHy3m5nlWJnXueHw5JmAA9dQqHxw7vNRfpD+5YrO10gQ5gaiGv6ouq4p8yQ6/wkwzeWP/5on4lRo1XC9FEEq/oenYSVrokUWsdAwPPkPtRwzcpbSkgknapax5anIRukgtjZkB0Hy1l/5gA+A= X-Sasl-enc: jLNbBND+KALE7/vvJpW3yo/zpteNfcS1Di8brpjmmgve 1283236971 Received: from [10.1.3.5] (unknown [83.43.82.224]) by mail.messagingengine.com (Postfix) with ESMTPSA id 984334060F4 for <6585@debbugs.gnu.org>; Tue, 31 Aug 2010 02:42:51 -0400 (EDT) Message-ID: <4C7CA46A.7010001@ravenpack.com> Date: Tue, 31 Aug 2010 08:42:50 +0200 From: "Jason S. Cornez" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9pre) Gecko/20100821 Lanikai/3.1.3pre ThunderBrowse/3.3.2 MIME-Version: 1.0 X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.0 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sorry this has taken so long; I've just been busy with other stuff. Here is a self-contained test case that shows emacs hanging as I have described above. It does seem to depend on the inhibited quitting as suggested by Johan Bockg=E5rd in Msg #26 above. 1. Start a fresh emacs-23.2: /usr/local/emacs-23.2/src/emacs -q 2. M-x ielm and paste the following function. (defun my::switch-to-buffer (buffer) ;; if buffer is in some window, go to it, otherwise switch-to-buffer (let ((start (selected-window)) (current (next-window (selected-window) 'no-minibuffer 'visible)) (found nil)) (while (and (not (eq current start)) (not found)) (if (eq buffer (window-buffer current)) (setq found current)) (setq current (next-window current 'no-minibuffer 'visible))) (if (null found) (switch-to-buffer buffer) (select-window found)))) 3. (run-at-time 5 nil 'my::switch-to-buffer "*GNU Emacs*") [Wait 5 seconds and emacs should switch to the buffer] 4. C-x b *ielm* 5. (run-at-time 5 nil 'my::switch-to-buffer "*GNU Emacs*") C-x C-f [do this immediately, before the 5 seconds, then wait] Once the 5 seconds expires, emacs will be using 100% CPU and will not respond to C-g. It is not totally dead, as mouse rollovers (eg. on the toolbar) seem to work. But it is in a state where I can't seem to get it back to being useful again. Of course, fixing the elisp function is easy and that simply and effectively avoids this problem. Still, I find it disconcerting that I can lockup emacs in such a manner. Hoping this is helpful. - -Jason -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkx8pGoACgkQQlm6HDTMLyO2OQCfXinWQlQ/EeYlhOdoSQGlQ7pq OKUAoLwpSxsEThEkn4mPpZk9PlOkNsOy =3Diq6n -----END PGP SIGNATURE----- From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Aug 2010 10:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Jason S. Cornez" Cc: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.128325017921516 (code B ref 6585); Tue, 31 Aug 2010 10:23:01 +0000 Received: (at 6585) by debbugs.gnu.org; 31 Aug 2010 10:22:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqNzW-0005az-Av for submit@debbugs.gnu.org; Tue, 31 Aug 2010 06:22:58 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqNzU-0005au-5r for 6585@debbugs.gnu.org; Tue, 31 Aug 2010 06:22:56 -0400 Received: from ceviche.home (vpn-132-204-232-70.acd.umontreal.ca [132.204.232.70]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o7VAOU8J003041; Tue, 31 Aug 2010 06:24:31 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 2EF65660DF; Tue, 31 Aug 2010 12:24:29 +0200 (CEST) From: Stefan Monnier Message-ID: References: <20100708141906.C46AE80333@dev268-l> <4C7CA46A.7010001@ravenpack.com> Date: Tue, 31 Aug 2010 12:24:29 +0200 In-Reply-To: <4C7CA46A.7010001@ravenpack.com> (Jason S. Cornez's message of "Tue, 31 Aug 2010 08:42:50 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3611=0 X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > Of course, fixing the elisp function is easy and that simply and > effectively avoids this problem. Still, I find it disconcerting that I > can lockup emacs in such a manner. All code run from timers and from (post|pre)-command-hook (as well as jit-lock, filters, and a few other things) is run with inhibit-quit set to t because the user may not know this code is running so if she hits C-g it "probably" means she wants to interrupt something else. It's not broken. Basically, the problem is in your code: such async code should not run for indefinite amount of time, whereas your code may inf-loop. 2 solutions: - fix your code so it doesn't inf-loop (usually the best solution). - wrap your code in with-local-quit to let C-g interrupt it. Admittedly, Emacs should also additionally understand something like C-g C-g C-g C-g as a sign that the user is getting impatient and we should thus ignore the inhibit-quit flag. But such a case is always a sign of a bug somewhere. Stefan From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Resent-From: "Jason S. Cornez" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Aug 2010 10:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.128325078021849 (code B ref 6585); Tue, 31 Aug 2010 10:33:01 +0000 Received: (at 6585) by debbugs.gnu.org; 31 Aug 2010 10:33:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqO9D-0005gM-81 for submit@debbugs.gnu.org; Tue, 31 Aug 2010 06:32:59 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqO9A-0005gG-Uc for 6585@debbugs.gnu.org; Tue, 31 Aug 2010 06:32:57 -0400 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id A14D5A9 for <6585@debbugs.gnu.org>; Tue, 31 Aug 2010 06:34:34 -0400 (EDT) Received: from frontend2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 31 Aug 2010 06:34:34 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=B++6jbOR+oEb1Csfl0+J/teoO4w=; b=SDPPw2rN15DbmV86L7XB3YOU9+Vuy2lG26AlfDUGTjpNp9uIWEkJ5N1iQ4Pqvac66FQ695nwJVnVAiOKxSEW/9KnLiSz6CD3h55Z2dFxsTSPHsI/5C+4Jm9tfe5RCl885LE/osTo3IKQB8+xlekIlrtADqCbAezZND7MsUwX71o= X-Sasl-enc: Tm0qH9fe2cgJL4JqQ6QA2wmN0OmpeiZG4mSFog8AHJJf 1283250874 Received: from [10.1.3.5] (89.Red-83-36-62.staticIP.rima-tde.net [83.36.62.89]) by mail.messagingengine.com (Postfix) with ESMTPSA id 9381D5E4F71 for <6585@debbugs.gnu.org>; Tue, 31 Aug 2010 06:34:33 -0400 (EDT) Message-ID: <4C7CDAB6.3090308@ravenpack.com> Date: Tue, 31 Aug 2010 12:34:30 +0200 From: "Jason S. Cornez" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9pre) Gecko/20100821 Lanikai/3.1.3pre ThunderBrowse/3.3.2 MIME-Version: 1.0 References: <20100708141906.C46AE80333@dev268-l> <4C7CA46A.7010001@ravenpack.com> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.6 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Yes, I agree about fixing the elisp code - indeed this has been done. But what about when the code isn't mine, but is in some library I happen to be using? Again, the right solution is always to fix the code, but that might not be possible for the end user of emacs to do. But I find it difficult to accept that emacs gets wedged like it does. I love emacs and having to kill the process from the OS is just so, so sad. I would love a C-g C-g C-g option (just like there is ESC ESC ESC). And it would be even better if this could work in conjunction with some flag so that it pops me into the debugger and I can see what function I've broken out of. So again, I know the elisp code was broken. But I still say that emacs is broken since it is currently impossible to salvage the situation. Yes, it is a sign of a bug somewhere - and I want emacs to help me find it, or at least escape from it. Thanks for your consideration, - -Jason On 08/31/2010 12:24 PM, Stefan Monnier wrote: >> Of course, fixing the elisp function is easy and that simply and >> effectively avoids this problem. Still, I find it disconcerting that I >> can lockup emacs in such a manner. > > All code run from timers and from (post|pre)-command-hook (as well as > jit-lock, filters, and a few other things) is run with inhibit-quit set > to t because the user may not know this code is running so if she hits > C-g it "probably" means she wants to interrupt something else. > > It's not broken. Basically, the problem is in your code: such async > code should not run for indefinite amount of time, whereas your code may > inf-loop. > > 2 solutions: > - fix your code so it doesn't inf-loop (usually the best solution). > - wrap your code in with-local-quit to let C-g interrupt it. > > Admittedly, Emacs should also additionally understand something like C-g > C-g C-g C-g as a sign that the user is getting impatient and we should > thus ignore the inhibit-quit flag. But such a case is always a sign of > a bug somewhere. > > > Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkx82rYACgkQQlm6HDTMLyPZZwCgu6ONheghjKDSYg0Ra5j0+rFt EPYAoNR1225PzzmNFl34bgThRGijd/HW =bUAm -----END PGP SIGNATURE----- From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Aug 2010 13:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Jason S. Cornez" Cc: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.128326009928605 (code B ref 6585); Tue, 31 Aug 2010 13:09:01 +0000 Received: (at 6585) by debbugs.gnu.org; 31 Aug 2010 13:08:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqQZW-0007RK-Gg for submit@debbugs.gnu.org; Tue, 31 Aug 2010 09:08:18 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqQZT-0007RF-SF for 6585@debbugs.gnu.org; Tue, 31 Aug 2010 09:08:16 -0400 Received: from ceviche.home (vpn-132-204-232-70.acd.umontreal.ca [132.204.232.70]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o7VD9n9d029120; Tue, 31 Aug 2010 09:09:50 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 27EFF66121; Tue, 31 Aug 2010 15:09:49 +0200 (CEST) From: Stefan Monnier Message-ID: References: <20100708141906.C46AE80333@dev268-l> <4C7CA46A.7010001@ravenpack.com> <4C7CDAB6.3090308@ravenpack.com> Date: Tue, 31 Aug 2010 15:09:49 +0200 In-Reply-To: <4C7CDAB6.3090308@ravenpack.com> (Jason S. Cornez's message of "Tue, 31 Aug 2010 12:34:30 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3611=0 X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > sad. I would love a C-g C-g C-g option (just like there is ESC ESC > ESC). And it would be even better if this could work in conjunction > with some flag so that it pops me into the debugger and I can see what > function I've broken out of. 100% agreement. Patch welcome, Stefan From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Resent-From: "Jason S. Cornez" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Aug 2010 15:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.128326729931544 (code B ref 6585); Tue, 31 Aug 2010 15:09:01 +0000 Received: (at 6585) by debbugs.gnu.org; 31 Aug 2010 15:08:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqSRe-0008Cj-BI for submit@debbugs.gnu.org; Tue, 31 Aug 2010 11:08:19 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqSRc-0008Ce-A8 for 6585@debbugs.gnu.org; Tue, 31 Aug 2010 11:08:16 -0400 Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.messagingengine.com (Postfix) with ESMTP id 49D361A1 for <6585@debbugs.gnu.org>; Tue, 31 Aug 2010 11:09:54 -0400 (EDT) Received: from frontend2.messagingengine.com ([10.202.2.161]) by compute3.internal (MEProxy); Tue, 31 Aug 2010 11:09:54 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpout; bh=V2xkspD2gZH3SVQLObbZAt8IuU0=; b=Gvy5Yc+4sTqRg96qMmhS7zM/nuQ2Somwr0seWnHD1B9N6bSetZlfWoGWFQFB1TBsSKPK0KKRcIG1eJ53zIj5TIevyflmigXYtlmsc05iiTV0EUBh5jmRciOpk9i7KTR7C1LL/Lyo35R//2SdIw4GGNza7HqR9yZcQzw/SXfQkBM= X-Sasl-enc: bctTyoeYXnddc/rFTyZoBp/gYCGPPZHdKGWM/pj6J9k7 1283267393 Received: from [10.1.3.5] (89.Red-83-36-62.staticIP.rima-tde.net [83.36.62.89]) by mail.messagingengine.com (Postfix) with ESMTPSA id 7A3705EE7BF for <6585@debbugs.gnu.org>; Tue, 31 Aug 2010 11:09:52 -0400 (EDT) Message-ID: <4C7D1B3D.1030607@ravenpack.com> Date: Tue, 31 Aug 2010 17:09:49 +0200 From: "Jason S. Cornez" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9pre) Gecko/20100821 Lanikai/3.1.3pre ThunderBrowse/3.3.2 MIME-Version: 1.0 References: <20100708141906.C46AE80333@dev268-l> <4C7CA46A.7010001@ravenpack.com> <4C7CDAB6.3090308@ravenpack.com> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.6 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) On 08/31/2010 03:09 PM, Stefan Monnier wrote: > 100% agreement. Patch welcome, > > > Stefan How about something like this... ----8<---- src/keyboard.c /usr/local/emacs-23.2/src/keyboard.c *** src/keyboard.c 2010-04-04 00:26:07.000000000 +0200 --- /usr/local/emacs-23.2/src/keyboard.c 2010-08-31 17:03:14.648740153 +0200 *************** interrupt_signal (signalnum) /* If we do *** 11122,11127 **** --- 11122,11136 ---- errno = old_errno; } + + /* JSC: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6585 */ + + /* If emacs is stuck because `inhibit-quit' is true, then keep track + of the number of times C-g has been requested. If C-g is pressed 3 + times, then quit anyway. If `debug-on-quit' is true, then it is + honored when the quit occurs after the third C-g. */ + static int force_quit_count; + /* This routine is called at interrupt level in response to C-g. It is called from the SIGINT handler or kbd_buffer_store_event. *************** handle_interrupt () *** 11239,11246 **** UNGCPRO; } else ! /* Else request quit when it's safe */ ! Vquit_flag = Qt; } /* TODO: The longjmp in this call throws the NS event loop integration off, --- 11248,11266 ---- UNGCPRO; } else ! { ! /* Else request quit when it's safe */ ! if (NILP (Vquit_flag)) ! { ! force_quit_count = 0; ! } ! if (++force_quit_count == 3) ! { ! immediate_quit = 1; ! Vinhibit_quit = Qnil; ! } ! Vquit_flag = Qt; ! } } /* TODO: The longjmp in this call throws the NS event loop integration off, ----8<---- This does indeed solve the problem for me. But I freely admit that I've never done emacs development before and so something more may be required or desired. Anyway, this is certain a start and I hope it helps. Best, -Jason From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: Patch welcome? References: <20100708141906.C46AE80333@dev268-l> In-Reply-To: <20100708141906.C46AE80333@dev268-l> Resent-From: "Jason S. Cornez" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Sep 2010 13:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.128438401915514 (code B ref 6585); Mon, 13 Sep 2010 13:21:02 +0000 Received: (at 6585) by debbugs.gnu.org; 13 Sep 2010 13:20:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ov8xH-00042B-MT for submit@debbugs.gnu.org; Mon, 13 Sep 2010 09:20:19 -0400 Received: from out2.smtp.messagingengine.com ([66.111.4.26]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ov8xF-000425-S0 for 6585@debbugs.gnu.org; Mon, 13 Sep 2010 09:20:18 -0400 Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 6E8B238F for <6585@debbugs.gnu.org>; Mon, 13 Sep 2010 09:22:29 -0400 (EDT) Received: from frontend1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Mon, 13 Sep 2010 09:22:29 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:subject:content-type:content-transfer-encoding; s=smtpout; bh=q6mer/+6J+zHNaR70no0zm1RLag=; b=OyCoOWIDotKyyWWqGFYYKLgLf4xACaJ/jlcRKzU9aMNMZi6QmdZz9griECMQuEPAfIhGBjdx1tFeFunehDsjSDvloieV1vzj3lBYrqwbiJPdS0CQLeuAIqfMyvtT6JYl1ejdSAfnGEd13NIssIytCBTvJA9FsDe0dYZCbi9G60w= X-Sasl-enc: j8CEfO67BKYy8jsmyTvofGYPEwdJ3XY35qMq16RUICwc 1284384148 Received: from [10.1.3.5] (unknown [83.43.82.224]) by mail.messagingengine.com (Postfix) with ESMTPSA id 7307440572B for <6585@debbugs.gnu.org>; Mon, 13 Sep 2010 09:22:28 -0400 (EDT) Message-ID: <4C8E2590.6000702@ravenpack.com> Date: Mon, 13 Sep 2010 15:22:24 +0200 From: "Jason S. Cornez" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9pre) Gecko/20100821 Lanikai/3.1.3pre ThunderBrowse/3.3.2 MIME-Version: 1.0 X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.7 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi. Just wanted to see if something else was requested from me here. Thanks, - -Jason -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkyOJZAACgkQQlm6HDTMLyOmygCgzdsQJ2CyvxZRZvYPyJpbPwe9 brsAnjQpmYIJZz2b8Nuf2YhtiFQGX4e2 =Aza0 -----END PGP SIGNATURE----- From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: Patch welcome? Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Sep 2010 15:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Jason S. Cornez" Cc: 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.128439322619619 (code B ref 6585); Mon, 13 Sep 2010 15:54:02 +0000 Received: (at 6585) by debbugs.gnu.org; 13 Sep 2010 15:53:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvBLm-00056O-Ky for submit@debbugs.gnu.org; Mon, 13 Sep 2010 11:53:46 -0400 Received: from impaqm1.telefonica.net ([213.4.138.1]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvBLj-00056J-SG for 6585@debbugs.gnu.org; Mon, 13 Sep 2010 11:53:44 -0400 Received: from IMPmailhost4.adm.correo ([10.20.102.125]) by IMPaqm1.telefonica.net with bizsmtp id 6EsC1f01H2iL0W201FvZt7; Mon, 13 Sep 2010 17:55:33 +0200 Received: from ceviche.home ([88.12.131.221]) by IMPmailhost4.adm.correo with BIZ IMP id 6FvY1f0084mlLJY1kFvYKC; Mon, 13 Sep 2010 17:55:33 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="monnier$movistar.es" |auth_email="monnier@movistar.es" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" Received: by ceviche.home (Postfix, from userid 20848) id 16BE06637B; Mon, 13 Sep 2010 17:55:12 +0200 (CEST) From: Stefan Monnier Message-ID: References: <20100708141906.C46AE80333@dev268-l> <4C8E2590.6000702@ravenpack.com> Date: Mon, 13 Sep 2010 17:55:12 +0200 In-Reply-To: <4C8E2590.6000702@ravenpack.com> (Jason S. Cornez's message of "Mon, 13 Sep 2010 15:22:24 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > Hi. Just wanted to see if something else was requested from me here. Not yet, no. I haven't had time to look into your patch yet. Thanks already for submitting it, tho. Stefan From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: status of patch? References: <20100708141906.C46AE80333@dev268-l> In-Reply-To: <20100708141906.C46AE80333@dev268-l> Resent-From: Tim Connors Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Nov 2011 22:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6585@debbugs.gnu.org Cc: "Jason S. Cornez" , Stefan Monnier Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.132191630315914 (code B ref 6585); Mon, 21 Nov 2011 22:59:01 +0000 Received: (at 6585) by debbugs.gnu.org; 21 Nov 2011 22:58:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RScog-00048c-IM for submit@debbugs.gnu.org; Mon, 21 Nov 2011 17:58:22 -0500 Received: from ipmail05.adl6.internode.on.net ([150.101.137.143]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RScmU-00045E-Dp for 6585@debbugs.gnu.org; Mon, 21 Nov 2011 17:56:07 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EALfVyk520Uq6/2dsb2JhbAA7CKo8gQaBcgEBBDscI09LiDq0dIZmHIMVBJQ8khk Received: from ppp118-209-74-186.lns20.mel4.internode.on.net (HELO dirac.rather.puzzling.org) ([118.209.74.186]) by ipmail05.adl6.internode.on.net with ESMTP; 22 Nov 2011 09:24:47 +1030 Received: from tconnors (helo=localhost) by dirac.rather.puzzling.org with local-esmtp (Exim 4.72) (envelope-from ) id 1RSclA-0000XU-Kd; Tue, 22 Nov 2011 09:54:44 +1100 Date: Tue, 22 Nov 2011 09:54:44 +1100 (EST) From: Tim Connors Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -2.6 (--) X-Mailman-Approved-At: Mon, 21 Nov 2011 17:58:20 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) >> Hi. Just wanted to see if something else was requested from me here. > >Not yet, no. I haven't had time to look into your patch yet. >Thanks already for submitting it, tho. > > Stefan Just a vote for this or a similar patch. After years of mounting frustration with xemacs, I finally ported my elisp files back to emacs and started using it regularly last week. Almost immediately I came across a problem where yank or just leaving the emacs session sit overnight would result in emacs chewing 100% cpu. It appears a font-locked buffer was stuck in an infinite loop (unkillable, and this would make sense given that font-loick is invoked from a timer). Somehow I seem to have fixed that, but maybe I just haven't waited long enough for it to reappear. The obvious C-g C-g C-g would have certainly saved a few kill-and-restarts. -- Tim Connors From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: status of patch? Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Nov 2011 21:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tim Connors Cc: "Jason S. Cornez" , 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.132199853522841 (code B ref 6585); Tue, 22 Nov 2011 21:49:02 +0000 Received: (at 6585) by debbugs.gnu.org; 22 Nov 2011 21:48:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RSyD0-0005wM-Pt for submit@debbugs.gnu.org; Tue, 22 Nov 2011 16:48:54 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RSyCy-0005wE-6D for 6585@debbugs.gnu.org; Tue, 22 Nov 2011 16:48:53 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id pAMLlS39003433; Tue, 22 Nov 2011 16:47:29 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id CA849B4043; Tue, 22 Nov 2011 16:47:28 -0500 (EST) From: Stefan Monnier Message-ID: References: Date: Tue, 22 Nov 2011 16:47:28 -0500 In-Reply-To: (Tim Connors's message of "Tue, 22 Nov 2011 09:54:44 +1100 (EST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4049=0 X-NAI-Spam-Version: 2.2.0.9286 : core <4049> : streams <703889> : uri <1013432> X-Spam-Score: -4.4 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) >>> Hi. Just wanted to see if something else was requested from me here. >> Not yet, no. I haven't had time to look into your patch yet. >> Thanks already for submitting it, tho. > Just a vote for this or a similar patch. After years of mounting Duh! I dropped the ball, didn't I? Now it's too late for 24.1 To try and reduce the pain, here's what I can give you: - I looked at the patch and it looks pretty good (i.e. I think it'd be acceptable for Emacs-24.2). - Emacs-24.1 comes with `debug-on-event' which is a similar feature (except you need to "kill -USR2 " instead of hitting C-g with anger). - I've just installed a patch in server.el which I believe should resolve the OP's original problem. Stefan From unknown Sat Jun 14 14:27:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6585: status of patch? Resent-From: "Jason S. Cornez" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Nov 2011 07:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6585 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Tim Connors , 6585@debbugs.gnu.org Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.13220318398514 (code B ref 6585); Wed, 23 Nov 2011 07:04:02 +0000 Received: (at 6585) by debbugs.gnu.org; 23 Nov 2011 07:03:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RT6sA-0002DG-MR for submit@debbugs.gnu.org; Wed, 23 Nov 2011 02:03:59 -0500 Received: from out2.smtp.messagingengine.com ([66.111.4.26]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RT6s7-0002D7-1R for 6585@debbugs.gnu.org; Wed, 23 Nov 2011 02:03:57 -0500 Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id A1C9720A43 for <6585@debbugs.gnu.org>; Wed, 23 Nov 2011 02:02:30 -0500 (EST) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute4.internal (MEProxy); Wed, 23 Nov 2011 02:02:30 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=FzJ6DE5+BC03HPEGutR9TB 8OVnI=; b=XbAA0f4uOyCLUug5y8EpmeA+4yGlUYvLI/yujeLrkbD/tajjjbslq4 rRc8jNdAblFWKJYwtHhFNh/RjYdsmiYH6hNPh06aKkNlDX6tvNC/jovKBI2IXAjX F3KBrcN+U+ej5I+kVYSWotU/S/5n9M+MMYvuSNGRQTLxrB9tGF9RY= X-Sasl-enc: Rcq1daNUModEfTjvEmTqr5KRMSiJGjFX7ISOLlU5S4om 1322031750 Received: from [10.1.3.5] (89.Red-83-36-62.staticIP.rima-tde.net [83.36.62.89]) by mail.messagingengine.com (Postfix) with ESMTPSA id ADB558E008A; Wed, 23 Nov 2011 02:02:28 -0500 (EST) Message-ID: <4ECC9A81.6000604@ravenpack.com> Date: Wed, 23 Nov 2011 08:02:25 +0100 From: "Jason S. Cornez" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 References: In-Reply-To: X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.6 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Glad to hear that patch looks good and may make it to a future release. Thanks, - -Jason On 11/22/2011 10:47 PM, Stefan Monnier wrote: >>>> Hi. Just wanted to see if something else was requested from >>>> me here. >>> Not yet, no. I haven't had time to look into your patch yet. >>> Thanks already for submitting it, tho. >> Just a vote for this or a similar patch. After years of >> mounting > > Duh! I dropped the ball, didn't I? Now it's too late for 24.1 To > try and reduce the pain, here's what I can give you: - I looked at > the patch and it looks pretty good (i.e. I think it'd be acceptable > for Emacs-24.2). - Emacs-24.1 comes with `debug-on-event' which is > a similar feature (except you need to "kill -USR2 " > instead of hitting C-g with anger). - I've just installed a patch > in server.el which I believe should resolve the OP's original > problem. > > Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk7MmoEACgkQQlm6HDTMLyNajgCfZX7fX3xKsOpk+fbmy+yIZBGz AbEAoPRudUzORCyM1b9C7/vplWdgm1NV =RzwN -----END PGP SIGNATURE----- From unknown Sat Jun 14 14:27:12 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: jcornez@ravenpack.com (Jason Cornez) Subject: bug#6585: closed (Re: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer) Message-ID: References: <20100708141906.C46AE80333@dev268-l> X-Gnu-PR-Message: they-closed 6585 X-Gnu-PR-Package: emacs Reply-To: 6585@debbugs.gnu.org Date: Tue, 10 Apr 2012 19:39:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1334086742-9699-1" This is a multi-part message in MIME format... ------------=_1334086742-9699-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 6585@debbugs.gnu.org. --=20 6585: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D6585 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1334086742-9699-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 6585-done) by debbugs.gnu.org; 10 Apr 2012 19:38:54 +0000 Received: from localhost ([127.0.0.1]:49264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHgtx-0002W5-Ok for submit@debbugs.gnu.org; Tue, 10 Apr 2012 15:38:54 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:35733) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SHgtw-0002Vy-31 for 6585-done@debbugs.gnu.org; Tue, 10 Apr 2012 15:38:52 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q3AJbmKm016427; Tue, 10 Apr 2012 15:37:48 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id F05B5B40D6; Tue, 10 Apr 2012 15:37:47 -0400 (EDT) From: Stefan Monnier To: "Jason S. Cornez" Subject: Re: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Message-ID: References: <20100708141906.C46AE80333@dev268-l> <4C7CA46A.7010001@ravenpack.com> <4C7CDAB6.3090308@ravenpack.com> <4C7D1B3D.1030607@ravenpack.com> Date: Tue, 10 Apr 2012 15:37:47 -0400 In-Reply-To: <4C7D1B3D.1030607@ravenpack.com> (Jason S. Cornez's message of "Tue, 31 Aug 2010 17:09:49 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.2 X-NAI-Spam-Rules: 2 Rules triggered GEN_SPAM_FEATRE=0.2, RV4188=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4188> : streams <745756> : uri <1097885> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 6585-done Cc: 6585-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) > How about something like this... Thank you, installed, Stefan ------------=_1334086742-9699-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 8 Jul 2010 16:23:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWttE-0000qr-Ou for submit@debbugs.gnu.org; Thu, 08 Jul 2010 12:23:57 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWsYp-0000E1-5k for submit@debbugs.gnu.org; Thu, 08 Jul 2010 10:58:48 -0400 Received: from lists.gnu.org ([199.232.76.165]:59557) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OWsYk-0005gD-5f for submit@debbugs.gnu.org; Thu, 08 Jul 2010 10:58:42 -0400 Received: from [140.186.70.92] (port=60100 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWsYi-0007Ce-HE for bug-gnu-emacs@gnu.org; Thu, 08 Jul 2010 10:58:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, FSL_HELO_NON_FQDN_1 autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWsYh-0002ZT-1H for bug-gnu-emacs@gnu.org; Thu, 08 Jul 2010 10:58:40 -0400 Received: from 88.red-80-26-102.staticip.rima-tde.net ([80.26.102.88]:58759 helo=dev268-l) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWsYg-0002Yu-Ex for bug-gnu-emacs@gnu.org; Thu, 08 Jul 2010 10:58:39 -0400 Received: by dev268-l (Postfix, from userid 1000) id C46AE80333; Thu, 8 Jul 2010 16:19:06 +0200 (CEST) To: bug-gnu-emacs@gnu.org Subject: 23.1; Hang / CPU 100% on background interaction when in minibuffer Message-Id: <20100708141906.C46AE80333@dev268-l> Date: Thu, 8 Jul 2010 16:19:06 +0200 (CEST) From: jcornez@ravenpack.com (Jason Cornez) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 08 Jul 2010 12:23:55 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) ---- Hello, I am using emacs for lisp programming. Emacs talks to the lisp image using sockets; the lisp runs as a subprocess. If a background lisp thread enters the lisp debugger, this opens a new buffer in emacs visible in some window where it is possible to debug the problem. Usually this all works fine. However, if I am currently interacting with emacs in the minibuffer at the time the lisp tries to open the new window, then emacs hangs and consumes 100% CPU (for one core). By "iteracting" I simply mean that the emacs focus is in the minibuffer, such as for C-x C-f. I don't need to be actively typing or anything. That is, the minibuffer is active. The emacs process seems to be entirely unresponsive: the cursor stops blinking, no keyboard input is accepted, the menus do not activate, sending commands like "emacsclient -e '(abort-recursive-edit)'" just hang and do nothing. The only thing I can do is kill the emacs process. This is very easy for me to reproduce, and I think it should not be too hard to replicate my environment. I also suspect that something other than the background lisp which also would attempt to communicate with emacs similarly while the minibuffer is active would have the same result. I haven't been able to come up an idea here yet. 1. I use Franz Allegro Common Lisp 8.2 and it communicates with emacs via ELI (emacs lisp interface, also from Franz). There is a freely downloadable trial version of this available. www.franz.com 2. Start emacs and launch the lisp. This is just a matter of invoking M-x fi:common-lisp from emacs. The Franz documentation details this if interested. 3. At the lisp prompt: CL-USER(1): (mp:process-run-function "foo" (lambda () (sleep 5) (break "foo"))) 4. Immediately after hitting above, then do C-x C-f and just wait until the 5 seconds expire. Emacs is now hung as I described above. (If you don't activate the minibuffer within 5 seconds, you'll end up in a new buffer *background-interaction* where you can debug the lisp process.) Even though the steps above involve Franz ACL8.2 and ELI, I don't think the problem is at all specific to this. If someone can suggest a more typical way of getting a background/child process to communicate with emacs asynchronously, I'll be happy to try to reproduce the problem. Thank you, -Jason ---- In GNU Emacs 23.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-03-29 on yellow, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.10706000 configured using `configure '--build=x86_64-linux-gnu' '--host=x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Apropos Minor modes in effect: csv-field-index-mode: t desktop-save-mode: t display-time-mode: t partial-completion-mode: t diff-auto-refine-mode: t xterm-mouse-mode: t show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t Recent input: d SPC t h i s SPC c a u s e s SPC d SPC p r i n t - t o M-/ a s s - x m n l SPC t o SPC g e t SPC c o n f u s e d . SPC SPC A l s o SPC n e e d e d SPC t o SPC f i x SPC u p SPC t h e SPC d e b u g g i n g SPC c o d e SPC i n SPC e v e M-/ SPC a l o n g SPC t h e SPC w a y . C-c C-c g C-c r M-x t o g g e l l e - f o C-g M-x f o n t l m M-x f o n t - l o m C-x C-f e - n C-x k C-x C-f M-p M-x e m - r b u g C-g C-h a b u g C-x o C-x 1 M-> Recent messages: Expansion found in '*magit: ravenpack*' Git finished. package specification is `com.ravenpack.news.classification' Quit Font-Lock mode disabled Font-Lock mode enabled package specification is `com.ravenpack.news.classification' Quit Type C-x 1 to remove help window. Mark set ------------=_1334086742-9699-1--