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 13:05:46 +0200 Message-ID: <834m1lu16d.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> 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 1483095977 28116 195.159.176.226 (30 Dec 2016 11:06:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 30 Dec 2016 11:06:17 +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 12:06: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 1cMv0l-0006bG-2y for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Dec 2016 12:06:11 +0100 Original-Received: from localhost ([::1]:39346 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMv0p-0000tL-Pk for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Dec 2016 06:06:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMv0g-0000sd-Cp for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2016 06:06:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMv0b-0006Z5-Vf for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2016 06:06:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44179) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cMv0b-0006Yy-Sv for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2016 06:06:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cMv0b-0003A6-Lf for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2016 06:06: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: Fri, 30 Dec 2016 11:06:01 +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.148309596012147 (code B ref 25247); Fri, 30 Dec 2016 11:06:01 +0000 Original-Received: (at 25247) by debbugs.gnu.org; 30 Dec 2016 11:06:00 +0000 Original-Received: from localhost ([127.0.0.1]:59578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cMv0a-00039r-5G for submit@debbugs.gnu.org; Fri, 30 Dec 2016 06:06:00 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cMv0Y-00039d-VW for 25247@debbugs.gnu.org; Fri, 30 Dec 2016 06:05:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMv0P-0006Uz-KN for 25247@debbugs.gnu.org; Fri, 30 Dec 2016 06:05:53 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMv0P-0006Uv-Ga; Fri, 30 Dec 2016 06:05:49 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2598 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cMv0O-0006KK-IU; Fri, 30 Dec 2016 06:05:49 -0500 In-reply-to: (message from Elias =?UTF-8?Q?M=C3=A5rtenson?= on Fri, 30 Dec 2016 18:30:05 +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:127580 Archived-At: > From: Elias MÃ¥rtenson > Date: Fri, 30 Dec 2016 18:30:05 +0800 > Cc: Tino Calancha , raeburn@raeburn.org, 25247@debbugs.gnu.org > > The C-g issue is still gone. > > As for the concurrency issues. I have been hammering this thing pretty > hard, and no crashes so far. Thanks, this is good news. > I open IELM in one window, and an empty buffer "z" in another, and type the > following: > > (loop > repeat 10 > do (make-thread (lambda () > (let ((n (random 10))) > (with-current-buffer "z" > (sleep-for n) > (insert (format "Foo:%d\n" n))))))) > > 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? > The following seems to be a problem with lexically bound lambda functions > used in a thread. The following example illustrates the problem: > > (let ((x "test")) > (make-thread (lambda () > (with-current-buffer "z" > (insert x))))) > > I would expect this to insert "test" into the buffer, but instead nothing > happens. Removing the reference to the variable "x" in the lambda makes it > work. Isn't the above expected? If not, why not? And what do you mean by "removing the reference"?