From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.devel Subject: Re: Emacs in CVS plus GTK patches hogs CPU Date: Wed, 08 Jan 2003 21:40:24 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20030108180411.BONY5799.fep03-svc.swip.net@gaffa.gaia.swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042060080 29889 80.91.224.249 (8 Jan 2003 21:08:00 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 8 Jan 2003 21:08:00 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18WNQc-0007lu-00 for ; Wed, 08 Jan 2003 22:07:58 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18WNVp-0000wZ-00 for ; Wed, 08 Jan 2003 22:13:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WNNG-000226-03 for emacs-devel@quimby.gnus.org; Wed, 08 Jan 2003 16:04:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18WNMy-00020Q-00 for emacs-devel@gnu.org; Wed, 08 Jan 2003 16:04:12 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18WN2B-0002L1-00 for emacs-devel@gnu.org; Wed, 08 Jan 2003 15:42:51 -0500 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WN01-0001Yj-00 for emacs-devel@gnu.org; Wed, 08 Jan 2003 15:40:29 -0500 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.6/8.12.6) with ESMTP id h08KeORr026246 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 8 Jan 2003 21:40:25 +0100 Original-To: "Jan D." X-Payment: hashcash 1.1 0:030108:jan.h.d@swipnet.se:6398005a695eca89 X-Hashcash: 0:030108:jan.h.d@swipnet.se:6398005a695eca89 X-Payment: hashcash 1.1 0:030108:emacs-devel@gnu.org:d1378053e10bd173 X-Hashcash: 0:030108:emacs-devel@gnu.org:d1378053e10bd173 In-Reply-To: ("Jan D."'s message of "Wed, 8 Jan 2003 18:59:08 +0100 (CET)") User-Agent: Gnus/5.090011 (Oort Gnus v0.11) Emacs/21.3.50 (i686-pc-linux-gnu) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10587 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10587 "Jan D." writes: >> I've been using the #2 GTK patch for several days with some heavy use, >> and this is my first problem. I'm not positive it is GTK related. >> >> Emacs is unresponsive to C-g and consumes all CPU. Attaching with gdb >> and breaking alternatively generates two different backtraces (see >> below). At the time I was reading mail from a IMAP group using Gnus >> (i.e., likely both network activity and keyboard activity). >> >> I'll keep the process running if someone has any ideas what to >> investigate. > > I have Motif and GTK versions running side by side, the GTK version > actually takes *less* CPU for me. Yes, normally I have no problems, but this emacs instance is completely lost in a busy wait. No redisplay, C-g doesn't work. > Can you strace or truss the Emacs process to see if is in some sort of busy > wait? A very short timeout perhaps? Yes, it is a busy wait: ... kill(17005, SIGIO) = 0 gettimeofday({1042058269, 284790}, NULL) = 0 select(8, [3 7], NULL, NULL, {0, 451252}) = 1 (in [7], left {0, 453096}) gettimeofday({1042058269, 284976}, NULL) = 0 getpid() = 17005 kill(17005, SIGIO) = 0 gettimeofday({1042058269, 285079}, NULL) = 0 select(8, [3 7], NULL, NULL, {0, 450963}) = 1 (in [7], left {0, 451143}) gettimeofday({1042058269, 285265}, NULL) = 0 getpid() = 17005 kill(17005, SIGIO) = 0 gettimeofday({1042058269, 285368}, NULL) = 0 select(8, [3 7], NULL, NULL, {0, 450674}) = 1 (in [7], left {0, 451143}) gettimeofday({1042058269, 285554}, NULL) = 0 ... This doesn't look GTK related, but rather network process related, though. Hm. 17005 is the pid of the emacs process itself. Does GTK catch SIGIO or something?