From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Running two processes rapidly makes Emacs eat 100% CPU on w32 Date: Fri, 13 Oct 2006 17:50:35 +0200 Message-ID: References: <20061012102127.C37F.SLAWOMIR.NOWACZYK.847@student.lu.se> <20061012145009.C39D.SLAWOMIR.NOWACZYK.847@student.lu.se> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1160754675 17802 80.91.229.2 (13 Oct 2006 15:51:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Oct 2006 15:51:15 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 13 17:51:13 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GYPJG-0006ZY-Nd for ged-emacs-devel@m.gmane.org; Fri, 13 Oct 2006 17:50:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYPJG-0007Lx-BI for ged-emacs-devel@m.gmane.org; Fri, 13 Oct 2006 11:50:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GYPJ0-0007Li-T8 for emacs-devel@gnu.org; Fri, 13 Oct 2006 11:50:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GYPIw-0007Ju-5M for emacs-devel@gnu.org; Fri, 13 Oct 2006 11:50:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYPIv-0007Jr-VF for emacs-devel@gnu.org; Fri, 13 Oct 2006 11:50:34 -0400 Original-Received: from [192.114.186.20] (helo=nitzan.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GYPRP-0000d3-Bk for emacs-devel@gnu.org; Fri, 13 Oct 2006 11:59:19 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-84-228-238-176.inter.net.il [84.228.238.176]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id EXK38605 (AUTH halo1); Fri, 13 Oct 2006 17:50:31 +0200 (IST) Original-To: Slawomir Nowaczyk In-reply-to: <20061012145009.C39D.SLAWOMIR.NOWACZYK.847@student.lu.se> (message from Slawomir Nowaczyk on Thu, 12 Oct 2006 15:52:20 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60718 Archived-At: > Date: Thu, 12 Oct 2006 15:52:20 +0200 > From: Slawomir Nowaczyk > > Thanks for the advice, I managed to activate DebPrint. I have added one > which prints the return value of w32proc:sys_select, and it is "1" > consistently. None of the DebPrint statements already present in this > function gets executed, neither in normal work nor when Emacs eats all > the CPU. > > Your guess that sys_select is to be blamed was likely correct, though, > as (under normal circumstances) my newly added DebPrint executes a > couple of times per second, while after I execute the problematic code, > it gets called thousands of times per second. > > There were two DebPrint statements guarded by FULL_DEBUG, but I have > activated those as well. Now the one from line 1175: > DebPrint (("select waiting on child %d fd %d\n", > cp-child_procs, i)); > keeps printing "select waiting on child 0 fd 3" (thousands of times per > second, every time sys_select is called. Looks like somehow Emacs doesn't pay attention that the process exited, and keeps trying to read its pipe. Do you agree with this conclusion?