From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.bugs Subject: bug#14569: 24.3.50; bootstrap fails on Cygwin Date: Fri, 28 Jun 2013 17:40:38 -0400 Message-ID: <51CE02D6.1010702@cornell.edu> References: <51BC720D.7080504@alice.it> <51BDB979.3040508@cornell.edu> <20130616150141.GB3622@ednor.casa.cgf.cx> <51BDFB25.8080101@cornell.edu> <51BE01EC.3000701@cornell.edu> <51C60DEB.8030804@alice.it> <51C75149.1070609@alice.it> <51C793FA.9070806@cs.ucla.edu> <51C8275A.4080307@cornell.edu> <51C886D5.3030704@alice.it> <51C8B4AD.7050609@cs.ucla.edu> <51C8DB3A.7050206@alice.it> <51CC529B.9090809@cs.ucla.edu> <51CC9340.3080307@cornell.edu> <51CD7F92.40007@cornell.edu> <51CDA2A0.10400@cs.ucla.edu> <51CDABD3.4070207@cornell.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1372455730 10085 80.91.229.3 (28 Jun 2013 21:42:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Jun 2013 21:42:10 +0000 (UTC) Cc: "14569@debbugs.gnu.org" <14569@debbugs.gnu.org>, Angelo Graziosi To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 28 23:42:10 2013 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 1UsgQh-0000QS-GX for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Jun 2013 23:42:07 +0200 Original-Received: from localhost ([::1]:32900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsgQg-0001MW-Vz for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Jun 2013 17:42:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsgQd-0001MQ-ES for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2013 17:42:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsgQc-0002Jy-HH for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2013 17:42:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsgQc-0002Js-Df for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2013 17:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UsgQb-0006nf-RK for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2013 17:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jun 2013 21:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14569 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14569-submit@debbugs.gnu.org id=B14569.137245566226037 (code B ref 14569); Fri, 28 Jun 2013 21:42:01 +0000 Original-Received: (at 14569) by debbugs.gnu.org; 28 Jun 2013 21:41:02 +0000 Original-Received: from localhost ([127.0.0.1]:47348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UsgPd-0006li-RJ for submit@debbugs.gnu.org; Fri, 28 Jun 2013 17:41:02 -0400 Original-Received: from limerock02.mail.cornell.edu ([128.84.12.100]:46170) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UsgPa-0006lI-RI for 14569@debbugs.gnu.org; Fri, 28 Jun 2013 17:40:59 -0400 X-CornellRouted: This message has been Routed already. Original-Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock02.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id r5SLeitA009013; Fri, 28 Jun 2013 17:40:44 -0400 Original-Received: from [128.84.234.241] (dhcp241.math.cornell.edu [128.84.234.241]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id r5SLeh43019505 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 28 Jun 2013 17:40:43 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: <51CDABD3.4070207@cornell.edu> 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:75689 Archived-At: On 6/28/2013 11:29 AM, Ken Brown wrote: > I don't know, because I don't know when the race during bootstrapping > was happening. If it was happening when emacs was doing the tickling > (in init_process_emacs), then my suggested change could conceivably > cause emacs to crash immediately after startup. Assuming this doesn't > happen often, I think it's better than having bugs in subprocess handling. > > On the other hand, if the race happens when emacs *executes* the glib > handler (stored in lib_child_handler), then I agree with you that my > proposal is unacceptable. I've done some further testing [*] and determined that the bootstrap failures always occur as a result of the tickling, as I had hoped. This should mean that, if my patch is applied, the only problem will be a possible random crash right after emacs is started. The only question is how often this will happen in practice. I think we can only determine this by applying the patch and asking users to test it. Ken [*] I tested this by applying the following patch and then bootstrapping: === modified file 'src/process.c' --- src/process.c 2013-06-27 14:47:52 +0000 +++ src/process.c 2013-06-28 21:30:27 +0000 @@ -7095,7 +7095,7 @@ if (! noninteractive || initialized) #endif { -#if defined HAVE_GLIB && !defined WINDOWSNT && !defined CYGWIN +#if defined HAVE_GLIB && !defined WINDOWSNT /* Tickle glib's child-handling code. Ask glib to wait for Emacs itself; this should always fail, but is enough to initialize glib's private SIGCHLD handler, allowing the code below to copy it into @@ -7105,6 +7105,9 @@ skipped under Cygwin. FIXME: Skipping the tickling likely causes bugs in subprocess handling under Cygwin (Bug#14569). */ g_source_unref (g_child_watch_source_new (getpid ())); + fprintf (stderr, "Glib has been tickled.\n"); + sleep (1); + fprintf (stderr, "Calling catch_child_signal.\n"); #endif catch_child_signal (); } Every error that occurred was like the following: Compiling obsolete/pgg.el Glib has been tickled. GLib (gthread-posix.c): Unexpected error from C library during 'pthread_setspecific': Invalid argument. Aborting. Makefile:251: recipe for target `obsolete/pgg.elc' failed make[2]: *** [obsolete/pgg.elc] Aborted