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#25247: 26.0.50; Concurrency crashes with XLib Date: Fri, 30 Dec 2016 20:54:25 +0200 Message-ID: <83vau1s0wu.fsf@gnu.org> References: <87bmw4w9i2.fsf@gmail.com> <83a8bn27qn.fsf@gnu.org> <87h95vmi7b.fsf@gmail.com> <83wperyrgj.fsf@gnu.org> <878tr651a9.fsf@gmail.com> <83mvfmzq9n.fsf@gnu.org> <87shp7j790.fsf_-_@gmail.com> <06A3A860-6057-4932-A654-F7663B432DEB@raeburn.org> <83bmvtu81z.fsf@gnu.org> <838tqxu535.fsf@gnu.org> <834m1lu16d.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 1483124126 12077 195.159.176.226 (30 Dec 2016 18:55:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 30 Dec 2016 18:55:26 +0000 (UTC) Cc: raeburn@raeburn.org, tino.calancha@gmail.com, 25247@debbugs.gnu.org To: Elias =?UTF-8?Q?M=C3=A5rtenson?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 30 19:55:16 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 1cN2Kb-00017Y-4v for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Dec 2016 19:55:09 +0100 Original-Received: from localhost ([::1]:41164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cN2Kf-0002oa-TN for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Dec 2016 13:55:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cN2KZ-0002mt-I2 for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2016 13:55:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cN2KV-0003SW-9L for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2016 13:55:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45205) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cN2KV-0003SO-5s for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2016 13:55:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cN2KU-0007Yr-CZ for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2016 13:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Dec 2016 18:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25247 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25247-submit@debbugs.gnu.org id=B25247.148312408029028 (code B ref 25247); Fri, 30 Dec 2016 18:55:02 +0000 Original-Received: (at 25247) by debbugs.gnu.org; 30 Dec 2016 18:54:40 +0000 Original-Received: from localhost ([127.0.0.1]:60604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cN2K8-0007Y8-4p for submit@debbugs.gnu.org; Fri, 30 Dec 2016 13:54:40 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cN2K6-0007Xu-Tc for 25247@debbugs.gnu.org; Fri, 30 Dec 2016 13:54:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cN2Jx-0003GQ-ER for 25247@debbugs.gnu.org; Fri, 30 Dec 2016 13:54:33 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cN2Jx-0003GM-BI; Fri, 30 Dec 2016 13:54:29 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2923 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cN2Jw-0007fy-BO; Fri, 30 Dec 2016 13:54:28 -0500 In-reply-to: (message from Elias =?UTF-8?Q?M=C3=A5rtenson?= on Fri, 30 Dec 2016 19:21:08 +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:127589 Archived-At: > From: Elias Mårtenson > Date: Fri, 30 Dec 2016 19:21:08 +0800 > Cc: Tino Calancha , raeburn@raeburn.org, 25247@debbugs.gnu.org > > > Here, I'd expect to see the "z" buffer being updated at the corresponding > > times. I.e. the message "Foo:4" should be displayed after 4 seconds. This > > is not what I see. Instead the messages appear in batches (i.e. several > > rows appearing at the same time). > > And what do the messages that appear together say in the %d part? Do > they all show the same value? > > No. They show wildly different values. For example, during one test, after roughly 8 seconds, I got 7 or so > messages with number ranging from 2 to 8. I think the results are unexpected only because you think of the threads as running in parallel. But they don't; only one thread runs at any given time, the rest are stuck, either in 'pselect', waiting for some input or time-out, or waiting for the global lock to become available. And sleep-for yields to other threads (i.e. makes the global lock available). > One interesting fact is that if I replace ‘sleep-for’ with ‘sit-for’, then the updates come at exactly the expected > time. In other words, the unpredictable behaviour where keypresses would randomly make the ‘sit-for’ expire > doesn't happen anymore. What keypresses did you have in mind?