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, 30 May 2014 22:41:56 +0200 Message-ID: <20140530224156.78b2d277@forcix.jorgenschaefer.de> References: <537F773C.8060202@cs.ucla.edu> <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> <53874D9F.5030107@cs.ucla.edu> <87iooo4njq.fsf@igel.home> <538751A7.1020201@cs.ucla.edu> <20140529190326.177fb39b@forcix.jorgenschaefer.de> <87a9a04ghj.fsf@igel.home> <20140529202300.78dd9e2e@forcix.jorgenschaefer.de> <8761ko4crs.fsf@igel.home> <5388200A.6090508@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 1401482606 32339 80.91.229.3 (30 May 2014 20:43:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 May 2014 20:43:26 +0000 (UTC) Cc: 17561@debbugs.gnu.org, Andreas Schwab To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 30 22:43:18 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 1WqTe2-0001Ss-70 for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 May 2014 22:43:18 +0200 Original-Received: from localhost ([::1]:56498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqTe1-0003zL-LU for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 May 2014 16:43:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqTds-0003v2-LT for bug-gnu-emacs@gnu.org; Fri, 30 May 2014 16:43:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WqTdm-0007jk-Ir for bug-gnu-emacs@gnu.org; Fri, 30 May 2014 16:43:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WqTdm-0007je-FV for bug-gnu-emacs@gnu.org; Fri, 30 May 2014 16:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WqTdm-0002M7-4E for bug-gnu-emacs@gnu.org; Fri, 30 May 2014 16:43: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: Fri, 30 May 2014 20:43: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.14014825278958 (code B ref 17561); Fri, 30 May 2014 20:43:01 +0000 Original-Received: (at 17561) by debbugs.gnu.org; 30 May 2014 20:42:07 +0000 Original-Received: from localhost ([127.0.0.1]:38086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WqTcs-0002KO-Kx for submit@debbugs.gnu.org; Fri, 30 May 2014 16:42:07 -0400 Original-Received: from loki.jorgenschaefer.de ([87.230.15.51]:50261) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WqTco-0002Jz-9P for 17561@debbugs.gnu.org; Fri, 30 May 2014 16:42:03 -0400 Original-Received: by loki.jorgenschaefer.de (Postfix, from userid 998) id 460C5203141; Fri, 30 May 2014 22:42:00 +0200 (CEST) Original-Received: from forcix.jorgenschaefer.de (port-8387.pppoe.wtnet.de [84.46.32.227]) by loki.jorgenschaefer.de (Postfix) with ESMTPSA id 5964A2030D5; Fri, 30 May 2014 22:41:58 +0200 (CEST) In-Reply-To: <5388200A.6090508@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:89773 Archived-At: On Thu, 29 May 2014 23:07:06 -0700 Paul Eggert wrote: > Andreas Schwab wrote: > > quit_throw_to_read_char doesn't restore the signal mask. > > Thanks for the diagnosis. I installed trunk bzr 117201 to try to fix > this problem. I don't see how this would explain the bug in > emacs-24, though, as in emacs-24 the signal handler invokes > pthread_sigmask (SIG_SETMASK, &empty_mask, 0) before calling > quit_throw_to_read_char, and the pthread_sigmask call should restore > the signal mask. I haven't been able to reproduce the bug since I am running the patched version. Does not say it's gone, but it's a good indication. It is entirely possible that the hangs I have witnessed in the past were caused by some other problem. As I said initially, it's only been the last few days that I actually had the luck to track down the behavior in the first place (being at work is a bad time to try and find weird behavior of your editor, sadly :-)). So I would assume that this bug is fixed, and if I come across weird behavior again, I'll create a new report or re-open this one. Thank you for the excellent debugging! Possibly related, while trying to reproduce the bug, I have noticed some other strange behavior. I managed to reduce it to the following reproduction code: (with-temp-buffer (let ((proc (start-process "test" (current-buffer) "bash" "-c" "echo foo ; sleep 5"))) (set-process-query-on-exit-flag proc nil) (accept-process-output nil 2))) This hangs my normal Emacs for 2 seconds. A newly-started Emacs returns immediately. I *suspect* that this is a timing issue, and strace *seems* to concur - Emacs reads the "foo" from the subprocess before running accept-process-output, and then just hangs for the two second timeout, instead of noticing that there already was some output. Should I create a new bug report for this? Regards, Jorgen