From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#17561: Emacs can forget processes Date: Thu, 29 May 2014 08:09:19 -0700 Organization: UCLA Computer Science Department Message-ID: <53874D9F.5030107@cs.ucla.edu> References: <537F773C.8060202@cs.ucla.edu> <20140523184419.70fe136d@forcix.jorgenschaefer.de> <538124C0.8080107@cs.ucla.edu> <20140525095735.6cfac9af@forcix.jorgenschaefer.de> <53837516.3070508@cs.ucla.edu> <20140526204952.1dba664e@forcix.jorgenschaefer.de> <5383D535.2000407@cs.ucla.edu> <20140527202756.7bade0ce@forcix.jorgenschaefer.de> <538506AB.3090201@cs.ucla.edu> <20140528001641.190b7ada@forcix.jorgenschaefer.de> <5385322D.7030406@cs.ucla.edu> <20140528225346.227e166d@forcix.jorgenschaefer.de> <53866A97.9030404@cs.ucla.edu> <20140529013505.65346321@forcix.jorgenschaefer.de> <5386B4E4.4070100@cs.ucla.edu> <20140529133927.3570a795@forcix.jorgenschaefer.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1401376230 31406 80.91.229.3 (29 May 2014 15:10:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 May 2014 15:10:30 +0000 (UTC) Cc: 17561@debbugs.gnu.org To: Jorgen Schaefer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 29 17:10:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wq1yH-0003K9-Ob for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 May 2014 17:10:21 +0200 Original-Received: from localhost ([::1]:48614 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wq1yH-0000V4-9J for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 May 2014 11:10:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wq1y5-0000Db-UU for bug-gnu-emacs@gnu.org; Thu, 29 May 2014 11:10:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wq1xy-0000pS-BW for bug-gnu-emacs@gnu.org; Thu, 29 May 2014 11:10:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wq1xy-0000pB-8I for bug-gnu-emacs@gnu.org; Thu, 29 May 2014 11:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wq1xx-0001Ik-Ni for bug-gnu-emacs@gnu.org; Thu, 29 May 2014 11:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 May 2014 15:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17561 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17561-submit@debbugs.gnu.org id=B17561.14013761824956 (code B ref 17561); Thu, 29 May 2014 15:10:01 +0000 Original-Received: (at 17561) by debbugs.gnu.org; 29 May 2014 15:09:42 +0000 Original-Received: from localhost ([127.0.0.1]:36190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wq1xZ-0001Hk-Hm for submit@debbugs.gnu.org; Thu, 29 May 2014 11:09:42 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:41909) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wq1xT-0001HJ-2n for 17561@debbugs.gnu.org; Thu, 29 May 2014 11:09:35 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 8D347A60008; Thu, 29 May 2014 08:09:25 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ni+Na3NSG+1z; Thu, 29 May 2014 08:09:19 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 736DFA60005; Thu, 29 May 2014 08:09:19 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <20140529133927.3570a795@forcix.jorgenschaefer.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89682 Archived-At: Jorgen Schaefer wrote: > I can not currently build the emacs-24 branch (and haven't found a > commit in it that I can on a quick try), see bug#17629. That's an indication of a reasonably-serious problem with Emacs and your platform, which is worrisome and should get fixed. I've responded at Bug#17629. > Using trunk (git 40f5ec0 * alloc.c (Fgarbage_collect): Fix compilation > with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.) now, built with your > patch and this command: > > $ ./autogen.sh && ./configure --without-x && make clean && make > > When restarting Emacs, I had the bug happen again right away. Sadly > without a running strace. If the bug is easily reproducible, that's progress. The patch does fix a bug (even if it's not your bug), so I've pushed it into the trunk. Can you get an strace -f of when Emacs stops getting SIGCHLD? That's the crucial part. That is, early on in all the straces I've seen, child processes die, Emacs gets a SIGCHLD, and then it calls waitpid (wait4) to reap them. At some point this stops working, and Emacs no longer gets a SIGCHLD when a child terminates. We need to find out what this point is, and what's causing it. > 13:28:46 kill(4294962889, SIGKILL) = 0 <0.002883> > 13:28:46 --- SIGIO (I/O possible) @ 0 (0) --- > 13:28:46 rt_sigreturn(0x1d) = 0 <0.000021> > 13:28:46 rt_sigprocmask(SIG_SETMASK, [QUIT ALRM CHLD PROF], NULL, 8) = 0 <0.000016> > 13:28:46 ioctl(3, FIONREAD, [0]) = 0 <0.000018> > 13:28:46 rt_sigprocmask(SIG_BLOCK, [CHLD], [QUIT ALRM CHLD PROF], 8) = 0 <0.000017> > 13:28:46 kill(4294962889, SIGHUP) = 0 <0.000017> I'm surprised by the above trace. The first kill(-4407,SIGKILL) succeeds, indicating that Emacs still has a subprocess. But Emacs doesn't get a SIGCHLD, even after it unblocks SIGCHLD. It would be helpful to see an 'strace -f' to see what's going on in the children here.