From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jorgen Schaefer Newsgroups: gmane.emacs.bugs Subject: bug#17561: Emacs can forget processes Date: Tue, 27 May 2014 20:27:56 +0200 Message-ID: <20140527202756.7bade0ce@forcix.jorgenschaefer.de> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1401215366 10865 80.91.229.3 (27 May 2014 18:29:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 May 2014 18:29:26 +0000 (UTC) Cc: 17561@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 27 20:29:19 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 1WpM7i-0002dg-MJ for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 May 2014 20:29:18 +0200 Original-Received: from localhost ([::1]:37103 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpM7h-0002p6-P1 for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 May 2014 14:29:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpM7Z-0002nk-2U for bug-gnu-emacs@gnu.org; Tue, 27 May 2014 14:29:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpM7S-0003y1-Uo for bug-gnu-emacs@gnu.org; Tue, 27 May 2014 14:29:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpM7S-0003xv-SJ for bug-gnu-emacs@gnu.org; Tue, 27 May 2014 14:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WpM7S-0003yr-AW for bug-gnu-emacs@gnu.org; Tue, 27 May 2014 14:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jorgen Schaefer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 May 2014 18:29:02 +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.140121528415223 (code B ref 17561); Tue, 27 May 2014 18:29:02 +0000 Original-Received: (at 17561) by debbugs.gnu.org; 27 May 2014 18:28:04 +0000 Original-Received: from localhost ([127.0.0.1]:33666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpM6V-0003xR-Bi for submit@debbugs.gnu.org; Tue, 27 May 2014 14:28:03 -0400 Original-Received: from loki.jorgenschaefer.de ([87.230.15.51]:60175) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WpM6S-0003x1-TN for 17561@debbugs.gnu.org; Tue, 27 May 2014 14:28:01 -0400 Original-Received: by loki.jorgenschaefer.de (Postfix, from userid 998) id A8864201FA6; Tue, 27 May 2014 20:27:58 +0200 (CEST) Original-Received: from forcix.jorgenschaefer.de (port-90422.pppoe.wtnet.de [84.46.65.168]) by loki.jorgenschaefer.de (Postfix) with ESMTPSA id E1E46201FA1; Tue, 27 May 2014 20:27:57 +0200 (CEST) In-Reply-To: <5383D535.2000407@cs.ucla.edu> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; i486-pc-linux-gnu) 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:89575 Archived-At: On Mon, 26 May 2014 16:58:45 -0700 Paul Eggert wrote: > Jorgen Schaefer wrote: > > the-bug.txt.gz ... shows the strace of a > > running Emacs session which starts to exhibit the bug, so we now > > have a trace that includes the time when the bug actually happens. > > It shows me starting Python subprocesses (elpy RPC processes) and > > killing them, in an attempt to reproduce the problem. Eventually, > > this succeeds, and Emacs goes into the loop reading from fd 15. > > Thanks for that trace; it's helpful. A couple of things. First, > what platform are you running on, exactly? I'm running on an AMD > Phenom II X4 910e (according to /proc/cpuinfo), and using Fedora 20 > x86-64 (Linux kernel 3.14.4-200.fc20.x86_64, glibc 2.18), and > compiling with GCC 4.9.0. Thanks for making me check that. There was a bit of a wtf there for me :-D The strace is from an OpenVZ virtual host: Debian GNU/Linux 7.5 (wheezy) Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz Linux kernel 3.2.41-042stab085.20 eglibc 2.13 Note the embedded glibc. I have seen a similar behavior (Emacs suddenly responding badly, improving once processes are killed) on this type of system: openSUSE 12.2 (x86_64) Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz Linux kernel 3.4.63-2.44-desktop glibc-2.15 gcc 4.7.1 But I can't know for sure if it's the same bug. > Second, looking at the-bug.txt I'm suspicious about the interaction > between vfork, pthread_sigmask (aka rt_sigprocmask) and rt_sigreturn. > Could you please try building Emacs with fork rather than vfork and > see whether that fixes the problem? If it fixes things, great; if > not I'd like to see another strace of the bug. To use fork instead > of vfork, you can run "./configure ac_cv_func_fork_works=no", or > (faster but flimsier) edit src/config.h to add "#define fork vfork". Should that be ac_cv_func_vfork_works=no? I have no 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, sadly that doesn't say much, I have gone for over a week before without noticing the bug until it reappeared. Regards, Jorgen