From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#36609: 27.0.50; Possible race-condition in threading implementation Date: Sun, 06 Jun 2021 22:27:45 +0300 Message-ID: <83k0n6hjym.fsf@gnu.org> References: <87muhks3b5.fsf@hochschule-trier.de> <87fsxv8182.fsf@dick> <83wnr7gdd8.fsf@gnu.org> <875yyqg66k.fsf@dick> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23059"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, pipcet@gmail.com, politza@hochschule-trier.de, 36609@debbugs.gnu.org To: dick.r.chiang@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 06 21:28:16 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lpyRT-0005iX-G2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Jun 2021 21:28:15 +0200 Original-Received: from localhost ([::1]:55486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpyRS-0006SM-Ed for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Jun 2021 15:28:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpyRG-0006PO-R8 for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 15:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42404) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpyRG-0006GZ-Es for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 15:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lpyRG-0003jb-Av for bug-gnu-emacs@gnu.org; Sun, 06 Jun 2021 15:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Jun 2021 19:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36609 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 36609-submit@debbugs.gnu.org id=B36609.162300767914341 (code B ref 36609); Sun, 06 Jun 2021 19:28:02 +0000 Original-Received: (at 36609) by debbugs.gnu.org; 6 Jun 2021 19:27:59 +0000 Original-Received: from localhost ([127.0.0.1]:53948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpyRD-0003jE-4L for submit@debbugs.gnu.org; Sun, 06 Jun 2021 15:27:59 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpyR9-0003it-Gu for 36609@debbugs.gnu.org; Sun, 06 Jun 2021 15:27:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58646) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpyR2-00067W-QW; Sun, 06 Jun 2021 15:27:48 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2778 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpyR2-0000iB-AX; Sun, 06 Jun 2021 15:27:48 -0400 In-Reply-To: <875yyqg66k.fsf@dick> (dick.r.chiang@gmail.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:208154 Archived-At: > From: dick.r.chiang@gmail.com > Cc: larsi@gnus.org, pipcet@gmail.com, politza@hochschule-trier.de, > 36609@debbugs.gnu.org > Date: Sun, 06 Jun 2021 15:10:43 -0400 > > EZ> This will bring back bug#36609, so we cannot do that without > EZ> discussing first why you think that commit was wrong. > > By enforcing bijection between acquires and releases in xgselect.c -- > cavalierly so as the releases now come out-of-band from another module > thread.c -- commit 9c62ffb admits deadlock. The conditions under which that > happens are not at all rarefied as evidenced by `for i in 1 2 3 ; do src/emacs > -Q -l ./42.el & done ;` You will have to provide a more detailed analysis, sorry. The fact that some Lisp can cause deadlock does not prove anything, there are too many ways to write such deadlocking code. > Generally, a commit made to remedy a phantom problem should always be > suspect. In this case OP was squatting on the main thread, so he deserves > what he got. That was not the analysis of that test case. See the discussion of the bug. The problems with the GTK lock are real, not phantom.