GNU bug report logs - #14569
24.3.50; bootstrap fails on Cygwin

Previous Next

Package: emacs;

Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>

Date: Fri, 7 Jun 2013 00:17:01 UTC

Severity: important

Found in version 24.3.50

Done: Ken Brown <kbrown <at> cornell.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ken Brown <kbrown <at> cornell.edu>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: "14569 <at> debbugs.gnu.org" <14569 <at> debbugs.gnu.org>, Angelo Graziosi <angelo.graziosi <at> alice.it>
Subject: bug#14569: 24.3.50; bootstrap fails on Cygwin
Date: Fri, 28 Jun 2013 17:40:38 -0400
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






This bug report was last modified 11 years and 314 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.