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: Fri, 23 May 2014 18:44:19 +0200 Message-ID: <20140523184419.70fe136d@forcix.jorgenschaefer.de> References: <537F773C.8060202@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 1400863538 29511 80.91.229.3 (23 May 2014 16:45:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 May 2014 16:45:38 +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 Fri May 23 18:45:30 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 1Wnsau-0001oi-Mp for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 May 2014 18:45:20 +0200 Original-Received: from localhost ([::1]:44837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wnsas-0001S9-9K for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 May 2014 12:45:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wnsaj-0001PJ-Ox for bug-gnu-emacs@gnu.org; Fri, 23 May 2014 12:45:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wnsad-0004OZ-Qq for bug-gnu-emacs@gnu.org; Fri, 23 May 2014 12:45:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wnsad-0004NS-Ni for bug-gnu-emacs@gnu.org; Fri, 23 May 2014 12:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wnsac-0002fs-MB for bug-gnu-emacs@gnu.org; Fri, 23 May 2014 12:45:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jorgen Schaefer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 May 2014 16:45: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.140086347310217 (code B ref 17561); Fri, 23 May 2014 16:45:02 +0000 Original-Received: (at 17561) by debbugs.gnu.org; 23 May 2014 16:44:33 +0000 Original-Received: from localhost ([127.0.0.1]:58077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wnsa5-0002ef-5u for submit@debbugs.gnu.org; Fri, 23 May 2014 12:44:33 -0400 Original-Received: from loki.jorgenschaefer.de ([87.230.15.51]:36521) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnsZy-0002eK-Gm for 17561@debbugs.gnu.org; Fri, 23 May 2014 12:44:26 -0400 Original-Received: by loki.jorgenschaefer.de (Postfix, from userid 998) id 5119C202648; Fri, 23 May 2014 18:44:21 +0200 (CEST) Original-Received: from forcix.jorgenschaefer.de (port-90006.pppoe.wtnet.de [84.46.64.7]) by loki.jorgenschaefer.de (Postfix) with ESMTPSA id 221F2202647; Fri, 23 May 2014 18:44:20 +0200 (CEST) In-Reply-To: <537F773C.8060202@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:89401 Archived-At: On Fri, 23 May 2014 09:28:44 -0700 Paul Eggert wrote: > How was Emacs configured and built on your platform? What's your > platform? I have seen this bug happen on a Debian 7.5 Wheezy x86_64 with an Emacs configured with --without-x and an openSUSE 12.3 amd64 with a GUI version (can't currently check which toolkit it uses by default there). > Can you run the shell command 'strace -p' on an Emacs with the > problem, and trace the system calls near the offending area? The bug report includes an strace output. Emacs does the pselect6 call and then read calls for all "broken" sockets in a tight loop, and pretty much nothing else. > Are you using anything involving SIGUSR1 or SIGUSR2? I see an > unlikely race condition there. Not to my knowledge, unless Emacs sends those signals in some situation without it being obvious; I do not send any signals myself, all I do is use `kill-buffer' and `delete-process'. > That's part of the problem with this code: it's so racy that it seems > that every time I look at it I find another unlikely race condition. > I'm attaching a patch to emacs-24 for the unlikely races I found in a > quick look at the area, not that I think it'll fix your problem. I > haven't installed this. read(2) returning 0 indicates an EOF (which pselect6 indicates as waiting input), I suspect there could at least be a sanity check here to close the file descriptors instead of continuously polling. Regards, Jorgen