From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: busyloop in sigchld_handler Date: Sun, 11 Mar 2007 14:33:29 -0400 Organization: disorganization Message-ID: Reply-To: sds@gnu.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: sea.gmane.org 1173638058 24687 80.91.229.12 (11 Mar 2007 18:34:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 11 Mar 2007 18:34:18 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 11 19:34:11 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HQSry-0007Ay-Nf for ged-emacs-devel@m.gmane.org; Sun, 11 Mar 2007 19:34:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQSsX-0008C9-QQ for ged-emacs-devel@m.gmane.org; Sun, 11 Mar 2007 13:34:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HQSsL-0008Bo-HL for emacs-devel@gnu.org; Sun, 11 Mar 2007 14:34:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HQSsK-0008Bc-1h for emacs-devel@gnu.org; Sun, 11 Mar 2007 14:34:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HQSsJ-0008BZ-T2 for emacs-devel@gnu.org; Sun, 11 Mar 2007 13:34:31 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HQSrj-0006AQ-RW for emacs-devel@gnu.org; Sun, 11 Mar 2007 14:33:56 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HQSrY-0007Sk-Tt for emacs-devel@gnu.org; Sun, 11 Mar 2007 19:33:44 +0100 Original-Received: from ool-182f780f.dyn.optonline.net ([24.47.120.15]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Mar 2007 19:33:44 +0100 Original-Received: from sds by ool-182f780f.dyn.optonline.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Mar 2007 19:33:44 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 46 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ool-182f780f.dyn.optonline.net Mail-Copies-To: never X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) Cancel-Lock: sha1:zHYMFcMImAPA0oHB/H4pOR8Hn2Y= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:67722 Archived-At: GNU Emacs 22.0.95.2 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2007-03-11 on loiso I have been observing the following behavior: emacs hangs in sigchld_handler waiting for the child process to terminate: do { errno = 0; pid = wait3 (&w, WNOHANG | WUNTRACED, 0); } while (pid < 0 && errno == EINTR); the system stops responding, loadavg goes to 5-8(!), CPU is 100% busy. this lasts for ~10 seconds. this happens on M-c compile and when I click on a URL (it is passed to an existing Firefox). I fixed the problem with the following patch: Index: process.c =================================================================== RCS file: /sources/emacs/emacs/src/process.c,v retrieving revision 1.500 retrieving revision 1.501 diff -u -w -u -b -w -i -B -r1.500 -r1.501 --- process.c 1 Mar 2007 10:17:41 -0000 1.500 +++ process.c 11 Mar 2007 18:16:50 -0000 1.501 @@ -6497,6 +6497,7 @@ /* Keep trying to get a status until we get a definitive result. */ do { + sleep (1); errno = 0; pid = wait3 (&w, WNOHANG | WUNTRACED, 0); } Thanks. -- Sam Steingold (http://sds.podval.org/) on Fedora Core release 6 (Zod) http://ffii.org http://pmw.org.il http://palestinefacts.org http://iris.org.il http://mideasttruth.com http://truepeace.org Old Age Comes at a Bad Time.