GNU bug report logs - #17561
24.4.50; Emacs can forget processes

Previous Next

Package: emacs;

Reported by: Jorgen Schaefer <contact <at> jorgenschaefer.de>

Date: Fri, 23 May 2014 15:54:02 UTC

Severity: normal

Tags: moreinfo

Merged with 17337, 17628

Found in version 24.4.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #65 received at 17561 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jorgen Schaefer <forcer <at> forcix.cx>
Cc: 17561 <at> debbugs.gnu.org
Subject: Re: Emacs can forget processes
Date: Thu, 29 May 2014 08:09:19 -0700
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.




This bug report was last modified 10 years and 351 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.