From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jcornez@ravenpack.com (Jason Cornez) Newsgroups: gmane.emacs.bugs Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Date: Thu, 8 Jul 2010 16:19:06 +0200 (CEST) Message-ID: <20100708141906.C46AE80333@dev268-l> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1278607177 15970 80.91.229.12 (8 Jul 2010 16:39:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 8 Jul 2010 16:39:37 +0000 (UTC) To: 6585@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 08 18:39:34 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 1OWu8I-0000tp-ET for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Jul 2010 18:39:30 +0200 Original-Received: from localhost ([127.0.0.1]:43850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWu8H-000181-S1 for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Jul 2010 12:39:29 -0400 Original-Received: from [140.186.70.92] (port=39659 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWtz3-0006db-Mx for bug-gnu-emacs@gnu.org; Thu, 08 Jul 2010 12:29:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWtz2-00035s-B0 for bug-gnu-emacs@gnu.org; Thu, 08 Jul 2010 12:29:57 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37326) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWtz2-00035k-7o for bug-gnu-emacs@gnu.org; Thu, 08 Jul 2010 12:29:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OWttK-0000r8-Js; Thu, 08 Jul 2010 12:24:02 -0400 X-Loop: help-debbugs@gnu.org 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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.12786062373280 (code B ref -1); Thu, 08 Jul 2010 16:24:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Jul 2010 16:23:57 +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 1OWttE-0000qr-Ou for submit@debbugs.gnu.org; Thu, 08 Jul 2010 12:23:57 -0400 Original-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 Original-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 Original-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 Original-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 Original-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 Original-Received: by dev268-l (Postfix, from userid 1000) id C46AE80333; Thu, 8 Jul 2010 16:19:06 +0200 (CEST) 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-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 Resent-Date: Thu, 08 Jul 2010 12:24:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Thu, 08 Jul 2010 12:39:25 -0400 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:38301 Archived-At: ---- 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