GNU bug report logs -
#25172
26.0.50; Concurrency feature, sit-for doesn't work (crashing and unexpected behaviour)
Previous Next
Reported by: Elias Mårtenson <lokedhs <at> gmail.com>
Date: Sun, 11 Dec 2016 16:38:01 UTC
Severity: normal
Found in version 26.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Elias Mårtenson <lokedhs <at> gmail.com>
> Date: Wed, 14 Dec 2016 10:58:36 +0800
> Cc: Clément Pit--Claudel <clement.pit <at> gmail.com>,
> 25172 <at> 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
This bug report was last modified 8 years and 218 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.