From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Elias =?UTF-8?Q?M=C3=A5rtenson?= Newsgroups: gmane.emacs.bugs Subject: bug#25172: 26.0.50; Concurrency feature, sit-for doesn't work (crashing and unexpected behaviour) Date: Fri, 16 Dec 2016 00:28:03 +0800 Message-ID: References: <838trme4jr.fsf@gnu.org> <838trlcals.fsf@gnu.org> <83vauobiou.fsf@gnu.org> <83fulrbxsd.fsf@gnu.org> <83pokua474.fsf@gnu.org> <837f719n6l.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec508f4bc2bbddf0543b4f0e8 X-Trace: blaine.gmane.org 1481819433 28745 195.159.176.226 (15 Dec 2016 16:30:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2016 16:30:33 +0000 (UTC) Cc: 25172@debbugs.gnu.org, =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 15 17:30:29 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 1cHYvI-000695-Js for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Dec 2016 17:30:24 +0100 Original-Received: from localhost ([::1]:55628 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHYvM-0004N7-Ub for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Dec 2016 11:30:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cHYu5-0003Cw-3A for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2016 11:29:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cHYtz-0004vz-4s for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2016 11:29:09 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55935) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cHYty-0004vq-WA for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2016 11:29:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cHYty-0007DB-7R for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2016 11:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Elias =?UTF-8?Q?M=C3=A5rtenson?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2016 16:29:02 +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.148181929527663 (code B ref 25172); Thu, 15 Dec 2016 16:29:02 +0000 Original-Received: (at 25172) by debbugs.gnu.org; 15 Dec 2016 16:28:15 +0000 Original-Received: from localhost ([127.0.0.1]:43101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHYtC-0007C6-19 for submit@debbugs.gnu.org; Thu, 15 Dec 2016 11:28:14 -0500 Original-Received: from mail-wj0-f174.google.com ([209.85.210.174]:36389) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cHYt9-0007Bt-RX for 25172@debbugs.gnu.org; Thu, 15 Dec 2016 11:28:12 -0500 Original-Received: by mail-wj0-f174.google.com with SMTP id tk12so71008213wjb.3 for <25172@debbugs.gnu.org>; Thu, 15 Dec 2016 08:28:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=8IQylcDoLz2FEHg1fb98OLxlBoX2qmUF1B62Rbj0g8k=; b=ND3fUKfaBfWfElnI+7IrXvHtYF16Wh0FNtXz8JxIefi0CkbWPnsERsAdvNfd2Saj/o GjuFw7ILYRwnoBS+6V77qf7yINuRmj/K+PC4V+sWXglJ1d2AiVt8xCzPu2wtD8gCQf9k hztIm4dafZVjIHD+xZ/yjgsHWM4OutOX0A3HDrKp+krDg/6pAGw5cOypRcH38lEZ1gRL ivSilcSYBuhKR7SoO6Zi9vP9gDKi9OUWODOyzlv3pwh0hmt9Fb61tcQ9m0W3e59EUG+G 71bLnsOIcpdByaTz5WVL8V90d1VBzO+y8ZCUfOY21L5f2/2TYKBw2RfL/qsWU1kvKmN4 rwwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=8IQylcDoLz2FEHg1fb98OLxlBoX2qmUF1B62Rbj0g8k=; b=Bdmyr+Epzgn3UqvI64APLcQD1KzA/7G1AVaOhRJuKbM+0G8GhgRz7mIpdFWUa00wKt dPYAtPDMn8/ucozYCz3W0M1zj8kKCBIhDEFntiBALMz6CnkrzogT9y3Gm6i38+PmHdeT ILAoBbvKyCDCIwJf7y474HMBd4YyW4xLdBnhekmuL4tJAJHKYa4G/NN8jij9x3INp8DL eOcyT4lXobSD+sxgpPgsHOEsby9zdxs7JuPBrvUM5dBNJ9TK7RBSsmOzTDbAuwUzzHY0 WZBf049bxS23F6Wj37bcXUJeVY8tahQGRCe/n47hJYKdn4vxkChpGTp3MuH4tgLIYDwi rhVQ== X-Gm-Message-State: AKaTC03I8UanWHb1oj6yDd1+Cm8L7ih3hTiscoIhCFgCzGWGKLqBGV6q1bWh8ggaTGswFnoI6qt7BsFgwLjP2Q== X-Received: by 10.194.51.137 with SMTP id k9mr2273224wjo.1.1481819286123; Thu, 15 Dec 2016 08:28:06 -0800 (PST) Original-Received: by 10.80.135.165 with HTTP; Thu, 15 Dec 2016 08:28:03 -0800 (PST) Original-Received: by 10.80.135.165 with HTTP; Thu, 15 Dec 2016 08:28:03 -0800 (PST) In-Reply-To: <837f719n6l.fsf@gnu.org> 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:127058 Archived-At: --bcaec508f4bc2bbddf0543b4f0e8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 16 Dec 2016 12:24 am, "Eli Zaretskii" wrote: > From: Elias M=C3=A5rtenson > Date: Thu, 15 Dec 2016 11:30:54 +0800 > Cc: Cl=C3=A9ment 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? Yes, I think so. Thanks so much for your help in debugging this. I'm happy it was resolved. =E2=98=BA=EF=B8=8F --bcaec508f4bc2bbddf0543b4f0e8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On 16 Dec 2016 12:24 am, "Eli Zaretskii" <eliz@gnu.org> wrote:
> From: Elias M=C3=A5rtenson <lokedhs@gmail.com>
> Date: Thu, 15 Dec 2016 11:30:54 +0800
> Cc: Cl=C3=A9ment Pit--Claudel <clement.pit@gmail.com>,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0251= 72@debbugs.gnu.org
>
>=C2=A0 After applying that patch, it h= asn't crashed yet. So either it fixes the problem, or it's simply b= uch harder to
>=C2=A0 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.=C2=A0 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?=C2=A0

Yes, I think so.=C2=A0


Thanks so much for your help in debugging this.

I'= m happy it was resolved. =E2=98=BA=EF=B8=8F
--bcaec508f4bc2bbddf0543b4f0e8--