From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Date: Tue, 31 Aug 2010 12:24:29 +0200 Message-ID: References: <20100708141906.C46AE80333@dev268-l> <4C7CA46A.7010001@ravenpack.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1283251232 26279 80.91.229.12 (31 Aug 2010 10:40:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 Aug 2010 10:40:32 +0000 (UTC) Cc: 6585@debbugs.gnu.org To: "Jason S. Cornez" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 31 12:40:29 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OqOGQ-0000gP-LA for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Aug 2010 12:40:26 +0200 Original-Received: from localhost ([127.0.0.1]:39243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqOGQ-00053P-1l for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 Aug 2010 06:40:26 -0400 Original-Received: from [140.186.70.92] (port=50830 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OqOFl-0004rj-3y for bug-gnu-emacs@gnu.org; Tue, 31 Aug 2010 06:39:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OqOFj-0007kn-Pm for bug-gnu-emacs@gnu.org; Tue, 31 Aug 2010 06:39:45 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56802) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OqOFj-0007kh-Md for bug-gnu-emacs@gnu.org; Tue, 31 Aug 2010 06:39:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OqNzZ-0005bC-Nz; Tue, 31 Aug 2010 06:23:01 -0400 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 6585-submit@debbugs.gnu.org id=B6585.128325017921516 (code B ref 6585); Tue, 31 Aug 2010 10:23:01 +0000 Original-Received: (at 6585) by debbugs.gnu.org; 31 Aug 2010 10:22:59 +0000 Original-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 Original-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 Original-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 Original-Received: by ceviche.home (Postfix, from userid 20848) id 2EF65660DF; Tue, 31 Aug 2010 12:24:29 +0200 (CEST) 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) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3611=0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 31 Aug 2010 06:23:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39853 Archived-At: > 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