From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25172: 26.0.50; Concurrency feature, sit-for doesn't work (crashing and unexpected behaviour) Date: Thu, 15 Dec 2016 18:22:58 +0200 Message-ID: <837f719n6l.fsf@gnu.org> References: <838trme4jr.fsf@gnu.org> <838trlcals.fsf@gnu.org> <83vauobiou.fsf@gnu.org> <83fulrbxsd.fsf@gnu.org> <83pokua474.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1481819056 11199 195.159.176.226 (15 Dec 2016 16:24:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2016 16:24:16 +0000 (UTC) Cc: 25172@debbugs.gnu.org, clement.pit@gmail.com To: Elias =?UTF-8?Q?M=C3=A5rtenson?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 15 17:24:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHYpH-0002HV-3Y for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Dec 2016 17:24:11 +0100 Original-Received: from localhost ([::1]:55576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHYpL-0004hc-F4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Dec 2016 11:24:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHYpC-0004Yi-4D for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2016 11:24:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHYp8-0001WF-7e for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2016 11:24:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55918) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cHYp8-0001W5-4P for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2016 11:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cHYp7-00074V-Uz for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2016 11:24:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2016 16:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25172 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25172-submit@debbugs.gnu.org id=B25172.148181903527169 (code B ref 25172); Thu, 15 Dec 2016 16:24:01 +0000 Original-Received: (at 25172) by debbugs.gnu.org; 15 Dec 2016 16:23:55 +0000 Original-Received: from localhost ([127.0.0.1]:43084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHYp0-000749-VH for submit@debbugs.gnu.org; Thu, 15 Dec 2016 11:23:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHYoz-00073x-Be for 25172@debbugs.gnu.org; Thu, 15 Dec 2016 11:23:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHYoq-0001Lg-8n for 25172@debbugs.gnu.org; Thu, 15 Dec 2016 11:23:48 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHYoq-0001Lc-5O; Thu, 15 Dec 2016 11:23:44 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1565 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cHYop-0001Tx-1k; Thu, 15 Dec 2016 11:23:43 -0500 In-reply-to: (message from Elias =?UTF-8?Q?M=C3=A5rtenson?= on Thu, 15 Dec 2016 11:30:54 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127056 Archived-At: > From: Elias Mårtenson > Date: Thu, 15 Dec 2016 11:30:54 +0800 > Cc: Clément Pit--Claudel , > 25172@debbugs.gnu.org > > After applying that patch, it hasn't crashed yet. So either it fixes the problem, or it's simply buch harder to > reproduce. So far so good. Thanks a lot! > > I want to note that the thing that seems to fix it is the application of the most recent suggestion. Thanks, I pushed it now. > In other words, if I roll back the application of the previous > suggestion (removing the calls to clock_input ()/unblock_input()) it > still seems to be stable. Yes, it turns out acquiring Glib context is thread-safe (it uses a mutex internally), so only one thread can ever acquire it. Not calling Glib functions when we failed to acquire context avoids both the crashes in Glib and calling block_input/unblock_input from more than one thread. I guess we can now close this bug? Thanks so much for your help in debugging this.