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 #35 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: Tue, 27 May 2014 14:42:03 -0700
[Message part 1 (text/plain, inline)]
On 05/27/2014 11:27 AM, Jorgen Schaefer wrote:
> Should that be ac_cv_func_vfork_works=no?

Yes, thanks for fixing the typo in my earlier message.

> The strace is from an OpenVZ virtual host

Perhaps OpenVZ is contributing to the problem?  There are or were 
relevant bugs in its implementation of vfork; e.g., see 
<http://lkml.org/lkml/2012/5/31/364>.

> I have no[w] recompiled Emacs
> with the latter change, and it's using clone(2) to execute processes,
> which sounds right. I haven't been able to reproduce the bug so far

So far, so good anyway.  That's the good news.  However, some bad news: 
on some platforms strace is reportedly buggy in this area, and can cause 
vfork to misbehave even if vfork works correctly when it's not being 
straced.  Please see <http://www.openwall.com/lists/musl/2013/02/03/3>.

If we have found the problem, I'd like to modify Emacs to avoid the 
kernel bug.  Let's start by trying to build a dynamic test for it. Can 
you please build and run the attached program, and see whether you can 
get it to output the message "vfork bug detected" on your platform?  
Please compile it with the same compiler and flags that you use to 
compile Emacs.  You may need to invoke the test program with arguments, 
e.g., "./a.out 100 10000" to try the test 100 times with a delay of 
10,000 nanoseconds.  The goal is to detect the vfork bug as quickly as 
possible, so if you can detect it it'd be nice to see how small we can 
make the delay.  You might also try to run the test program under strace 
to see whether that changes things. Thanks.
[vfork-test.c (text/plain, attachment)]

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.