[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25172: 26.0.50; Concurrency feature, sit-for doesn't work (crashing

From: Eli Zaretskii
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

> From: Elias Mårtenson <address@hidden>
> Date: Wed, 14 Dec 2016 10:58:36 +0800
> Cc: Clément Pit--Claudel <address@hidden>, 
>       address@hidden
>  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 
   need_to_dispatch = true;
-  if (need_to_dispatch)
+  if (need_to_dispatch && context_acquired)
       int pselect_errno = errno;
       /* Prevent g_main_dispatch recursion, that would occur without

reply via email to

[Prev in Thread] Current Thread [Next in Thread]