From: Eli Zaretskii <eliz@gnu.org>
To: "Elias Mårtenson" <lokedhs@gmail.com>
Cc: 25172@debbugs.gnu.org, clement.pit@gmail.com
Subject: bug#25172: 26.0.50; Concurrency feature, sit-for doesn't work (crashing and unexpected behaviour)
Date: Wed, 14 Dec 2016 18:03:11 +0200 [thread overview]
Message-ID: <83pokua474.fsf@gnu.org> (raw)
In-Reply-To: <CADtN0WKnu_ZeSRXwyGyq-KR=8CxdPe_J+fDjCmGyo5_e43O+6Q@mail.gmail.com> (message from Elias Mårtenson on Wed, 14 Dec 2016 10:58:36 +0800)
> From: Elias Mårtenson <lokedhs@gmail.com>
> Date: Wed, 14 Dec 2016 10:58:36 +0800
> Cc: Clément Pit--Claudel <clement.pit@gmail.com>,
> 25172@debbugs.gnu.org
>
> Can you try removing the calls to block_input/unblock_input from
> xgselect.c, and see if these crashes then stop?
>
> I have tried this now, and it's much more stable now. It doesn't immediately crash, and sometimes it doesn't
> crash at all.
>
> When it crashes, it does so after several seconds, and I have captured two of these crashes.
Thanks. Does the patch below help in any way with these crashes?
If not, it sounds like I'm out of my depth here. The crashes you show
are deep in the bowels of Glib called by GTK; reading the (annoyingly
minimal) documentation of those APIs, I sense the danger of some basic
issue with calling these APIs from several threads. If what the GTK
documentation tells everything there is to it, then the patch below
should fix these problems. But if not, then I guess we will need help
from a GTK expert.
diff --git a/src/xgselect.c b/src/xgselect.c
index 2f23764..a9461a5 100644
--- a/src/xgselect.c
+++ b/src/xgselect.c
@@ -150,7 +150,7 @@ xg_select (int fds_lim, fd_set *rfds, fd_set *wfds, fd_set *efds,
#else
need_to_dispatch = true;
#endif
- if (need_to_dispatch)
+ if (need_to_dispatch && context_acquired)
{
int pselect_errno = errno;
/* Prevent g_main_dispatch recursion, that would occur without
next prev parent reply other threads:[~2016-12-14 16:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-11 16:35 bug#25172: 26.0.50; Concurrency feature, sit-for doesn't work (crashing and unexpected behaviour) Elias Mårtenson
2016-12-11 16:47 ` Andreas Schwab
2016-12-11 16:49 ` Elias Mårtenson
2016-12-11 17:54 ` Eli Zaretskii
2016-12-11 17:52 ` Eli Zaretskii
2016-12-11 19:05 ` Clément Pit--Claudel
2016-12-12 4:50 ` Elias Mårtenson
2016-12-12 17:37 ` Eli Zaretskii
2016-12-13 2:38 ` Elias Mårtenson
2016-12-13 3:40 ` Eli Zaretskii
2016-12-13 3:45 ` Elias Mårtenson
2016-12-13 4:11 ` Elias Mårtenson
2016-12-13 4:14 ` Elias Mårtenson
2016-12-13 4:16 ` Elias Mårtenson
2016-12-13 16:26 ` Eli Zaretskii
2016-12-14 2:58 ` Elias Mårtenson
2016-12-14 3:00 ` Elias Mårtenson
2016-12-14 3:02 ` Elias Mårtenson
2016-12-14 16:03 ` Eli Zaretskii [this message]
2016-12-14 16:12 ` Elias Mårtenson
2016-12-15 3:30 ` Elias Mårtenson
2016-12-15 16:22 ` Eli Zaretskii
2016-12-15 16:28 ` Elias Mårtenson
2016-12-15 16:59 ` Eli Zaretskii
2016-12-13 16:23 ` Eli Zaretskii
2016-12-13 18:25 ` Andreas Schwab
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83pokua474.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=25172@debbugs.gnu.org \
--cc=clement.pit@gmail.com \
--cc=lokedhs@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.