From: Ken Brown <kbrown@cornell.edu>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: "14569@debbugs.gnu.org" <14569@debbugs.gnu.org>,
Angelo Graziosi <angelo.graziosi@alice.it>
Subject: bug#14569: 24.3.50; bootstrap fails on Cygwin
Date: Mon, 01 Jul 2013 12:16:25 -0400 [thread overview]
Message-ID: <51D1AB59.90808@cornell.edu> (raw)
In-Reply-To: <51D18FEF.7040602@cs.ucla.edu>
On 7/1/2013 10:19 AM, Paul Eggert wrote:
> On 07/01/2013 04:21 AM, Ken Brown wrote:
>>
>> Last night I began running a loop in which emacs (patched as I proposed) repeatedly starts and then
>> exits after 15 seconds [*]. So far there hasn't been a single failure after more than 1300 iterations.
>
> I wouldn't expect your test case to exercise the bug.
> The bug occurs when Gtk or Glib activity is occurring
> in some other thread at the same time that Emacs is
> running. To reproduce the bug, one must have a
> race condition like that. In your test case Emacs
> is idle, so it's unlikely to exhibit the bug.
>
> A couple more things. Since the bug comes into play
> only when glib is tickled, shouldn't the Cygwin case
> suppress only the tickling, not the catching of child
> signals?
>
> Also, wouldn't it be better to give Cygwin maintainers
> an easy way to reproduce the bug, say by compiling
> with a special flag?
>
> So, how about the following patch instead?
>
> === modified file 'src/ChangeLog'
> --- src/ChangeLog 2013-06-30 22:29:23 +0000
> +++ src/ChangeLog 2013-07-01 14:17:45 +0000
> @@ -1,3 +1,10 @@
> +2013-07-01 Paul Eggert <eggert@cs.ucla.edu>
> +
> + Tickle glib when debugging under Cygwin (Bug#14569).
> + * process.c (init_process_emacs) [CYGWIN && TICKLE_GLIB_BUGFIX]:
> + Tickle glib in this case, too, so that Cygwin maintainers
> + can reproduce the bug more easily.
> +
> 2013-06-30 Michal Nazarewicz <mina86@mina86.com>
>
> * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
>
> === modified file 'src/process.c'
> --- src/process.c 2013-06-27 14:47:52 +0000
> +++ src/process.c 2013-07-01 14:12:31 +0000
> @@ -7095,16 +7095,24 @@
> 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
> LIB_CHILD_HANDLER.
>
> - For some reason tickling causes Cygwin bootstrap to fail, so it's
> - 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 ()));
> + Under Cygwin as of July 2013, tickling causes bootstrap to fail,
> + so do it only when Emacs is compiled with -DTICKLE_GLIB_BUGFIX;
> + this is to help Cygwin maintainers reproduce the bug.
> + FIXME: Skipping the tickling likely causes bugs in subprocess
> + handling under Cygwin (Bug#14569). */
> +# if defined CYGWIN && !defined TICKLE_GLIB_BUGFIX
> + bool tickle_glib = 0;
> +# else
> + bool tickle_glib = 1;
> +# endif
> + if (tickle_glib)
> + g_source_unref (g_child_watch_source_new (getpid ()));
> #endif
> catch_child_signal ();
> }
Yes, this looks good. Please go ahead and apply it.
If it turns out that this really is a Cygwin/Glib bug (and not, say, a
bug in gmalloc.c), it will be much easier to find the problem if I can
provide the Cygwin maintainers with a test case in C, independent of
Emacs. Is there a simple way to simulate the kind of race condition
that you think is going on here?
Thanks.
Ken
next prev parent reply other threads:[~2013-07-01 16:16 UTC|newest]
Thread overview: 116+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-15 13:54 bug#14569: 24.3.50; bootstrap fails on Cygwin Angelo Graziosi
2013-06-16 13:11 ` Ken Brown
[not found] ` <51BDB979.3040508@cornell.edu>
[not found] ` <20130616150141.GB3622@ednor.casa.cgf.cx>
2013-06-16 17:51 ` Ken Brown
[not found] ` <51BDFB25.8080101@cornell.edu>
2013-06-16 18:20 ` Ken Brown
2013-06-22 20:49 ` Angelo Graziosi
2013-06-23 19:49 ` Angelo Graziosi
2013-06-23 20:47 ` Angelo Graziosi
2013-06-24 2:43 ` Eli Zaretskii
2013-06-24 0:34 ` Paul Eggert
2013-06-24 11:02 ` Ken Brown
2013-06-24 14:34 ` Paul Eggert
2013-06-24 15:51 ` Ken Brown
2013-06-24 16:55 ` Paul Eggert
2013-06-24 17:16 ` Ken Brown
2013-06-24 17:50 ` Angelo Graziosi
2013-06-24 21:05 ` Paul Eggert
2013-06-24 23:50 ` Angelo Graziosi
2013-06-25 13:34 ` Ken Brown
2013-06-25 13:55 ` Ken Brown
2013-06-25 14:51 ` Paul Eggert
2013-06-25 15:51 ` Ken Brown
2013-06-25 16:18 ` Paul Eggert
2013-06-27 14:56 ` Paul Eggert
2013-06-27 16:44 ` Angelo Graziosi
2013-06-27 16:54 ` Angelo Graziosi
2013-06-28 5:16 ` Paul Eggert
2013-06-27 19:32 ` Ken Brown
2013-06-28 12:20 ` Ken Brown
2013-06-28 14:50 ` Paul Eggert
2013-06-28 15:29 ` Ken Brown
2013-06-28 16:22 ` Angelo Graziosi
2013-06-28 21:40 ` Ken Brown
2013-07-01 11:21 ` Ken Brown
2013-07-01 12:28 ` Angelo Graziosi
2013-07-01 13:51 ` Ken Brown
2013-07-01 14:04 ` Ken Brown
2013-07-01 14:19 ` Paul Eggert
2013-07-01 16:16 ` Ken Brown [this message]
2013-07-01 17:31 ` Angelo Graziosi
2013-07-01 18:40 ` Ken Brown
2013-07-01 21:07 ` Paul Eggert
2013-07-01 21:47 ` Angelo Graziosi
2013-07-01 22:41 ` Ken Brown
2013-06-07 0:16 ` Katsumi Yamaoka
2013-06-10 13:54 ` Angelo Graziosi
2013-06-10 16:27 ` Jan Djärv
2013-06-10 18:56 ` Angelo Graziosi
2013-06-10 20:10 ` Paul Eggert
2013-06-10 21:15 ` Angelo Graziosi
2013-06-10 21:52 ` Paul Eggert
2013-06-10 22:06 ` Angelo Graziosi
2013-06-10 23:23 ` Angelo Graziosi
2013-06-11 15:13 ` Angelo Graziosi
2013-06-11 18:10 ` Paul Eggert
2013-06-11 20:13 ` Angelo Graziosi
2013-06-11 15:39 ` Jan Djärv
2013-06-11 16:58 ` Eli Zaretskii
2013-06-11 18:50 ` Paul Eggert
2013-06-11 19:26 ` Ken Brown
2013-06-11 19:53 ` Eli Zaretskii
2013-06-11 20:06 ` Ken Brown
2013-06-11 20:58 ` Jan Djärv
2013-06-11 20:59 ` Jan Djärv
2013-06-12 7:00 ` Jan Djärv
2013-06-12 18:33 ` Paul Eggert
2013-06-12 20:11 ` Angelo Graziosi
2013-06-13 7:08 ` Jan Djärv
2013-06-13 17:39 ` Paul Eggert
2013-06-14 9:11 ` Jan Djärv
2013-06-14 17:45 ` Paul Eggert
[not found] ` <51BB56CB.7030209@cs.ucla.edu>
2013-06-14 18:03 ` Christopher Faylor
2013-06-14 18:03 ` Christopher Faylor
2013-06-14 18:16 ` Eli Zaretskii
[not found] ` <20130614180359.GA5295@ednor.casa.cgf.cx>
2013-06-14 20:22 ` Ken Brown
[not found] ` <51BB7B82.4010204@cornell.edu>
2013-06-15 7:04 ` Eli Zaretskii
2013-06-15 9:54 ` Jan Djärv
2013-06-15 10:42 ` Eli Zaretskii
2013-06-15 12:47 ` Jan Djärv
2013-06-17 1:56 ` Ken Brown
2013-06-17 6:22 ` Jan Djärv
2013-06-17 15:06 ` Eli Zaretskii
2013-06-17 20:15 ` Ken Brown
2013-06-18 15:53 ` Eli Zaretskii
2013-06-19 20:24 ` Ken Brown
2013-06-20 2:45 ` Eli Zaretskii
2013-06-20 3:00 ` Ken Brown
2013-06-20 15:54 ` Eli Zaretskii
2013-06-22 15:13 ` Ken Brown
2013-06-22 19:04 ` Paul Eggert
2013-06-23 15:56 ` Ken Brown
2013-06-23 16:13 ` Eli Zaretskii
2013-06-23 18:22 ` Paul Eggert
2013-06-12 4:29 ` Katsumi Yamaoka
2013-07-02 2:19 ` Katsumi Yamaoka
2013-07-02 5:23 ` Katsumi Yamaoka
2013-07-02 11:22 ` Ken Brown
2013-07-02 13:57 ` Katsumi Yamaoka
2013-07-04 2:27 ` bug#14569: Emacs segfaulting on FreeBSD 9.1-RELEASE (amd64) during memory allocation wahjava.ml
2013-07-17 6:36 ` bug#14569: bug#14766: 24.3.50; sometimes "Memory exhausted" on Cygwin Katsumi Yamaoka
-- strict thread matches above, loose matches on Subject: below --
2013-07-02 13:57 Katsumi Yamaoka
2013-07-02 14:15 ` Angelo Graziosi
2013-07-03 2:31 ` Katsumi Yamaoka
2013-07-02 19:56 ` Ken Brown
2013-07-03 2:30 ` Katsumi Yamaoka
2013-07-03 3:24 ` Ken Brown
2013-07-03 4:54 ` Paul Eggert
2013-07-03 10:01 ` Katsumi Yamaoka
2013-07-03 10:57 ` Ken Brown
2013-07-03 11:48 ` Katsumi Yamaoka
2013-07-03 6:36 ` Michael Albinus
2013-07-03 10:01 ` Katsumi Yamaoka
[not found] <86d2qz3a7q.fsf@chateau.d.if>
2013-07-04 0:58 ` bug#14569: Emacs segfaulting on FreeBSD 9.1-RELEASE (amd64) during memory allocation Paul Eggert
2013-07-04 2:13 ` Ken Brown
[not found] ` <86txkbys94.fsf@chateau.d.if>
2013-07-04 6:23 ` Paul Eggert
2013-07-04 10:59 ` Ken Brown
2013-07-04 19:09 ` Ashish SHUKLA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51D1AB59.90808@cornell.edu \
--to=kbrown@cornell.edu \
--cc=14569@debbugs.gnu.org \
--cc=angelo.graziosi@alice.it \
--cc=eggert@cs.ucla.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).