From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dick.r.chiang@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#36609: 27.0.50; Possible race-condition in threading implementation Date: Thu, 10 Jun 2021 10:55:53 -0400 Message-ID: <87y2bhepl2.fsf@dick> References: <87muhks3b5.fsf@hochschule-trier.de> <87fsxv8182.fsf@dick> <83wnr7gdd8.fsf@gnu.org> <875yyqg66k.fsf@dick> <83k0n6hjym.fsf@gnu.org> <87wnr2lnsj.fsf@dick> <83h7i6cj3z.fsf@gnu.org> <87bl8e2aya.fsf@dick> <8335tpdcq9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17599"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.14 (Gnus v5.14pre) Emacs/28.0.50 (gnu/linux) Cc: 36609@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 10 16:57:48 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 1lrM7w-0004GU-8H for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Jun 2021 16:57:48 +0200 Original-Received: from localhost ([::1]:32792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lrM7v-0001GS-88 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Jun 2021 10:57:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lrM7D-0007sm-1b for bug-gnu-emacs@gnu.org; Thu, 10 Jun 2021 10:57:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54236) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lrM7B-0000HF-UX for bug-gnu-emacs@gnu.org; Thu, 10 Jun 2021 10:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lrM7B-0000lT-Uf for bug-gnu-emacs@gnu.org; Thu, 10 Jun 2021 10:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: dick.r.chiang@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Jun 2021 14:57:01 +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.16233369782878 (code B ref 36609); Thu, 10 Jun 2021 14:57:01 +0000 Original-Received: (at 36609) by debbugs.gnu.org; 10 Jun 2021 14:56:18 +0000 Original-Received: from localhost ([127.0.0.1]:37549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrM6T-0000kL-6X for submit@debbugs.gnu.org; Thu, 10 Jun 2021 10:56:18 -0400 Original-Received: from mail-qt1-f179.google.com ([209.85.160.179]:44684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lrM6C-0000jS-G5 for 36609@debbugs.gnu.org; Thu, 10 Jun 2021 10:56:15 -0400 Original-Received: by mail-qt1-f179.google.com with SMTP id t17so21134829qta.11 for <36609@debbugs.gnu.org>; Thu, 10 Jun 2021 07:56:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ClckA7g4rvcs3CP0fvoSLzNGGBp4QzG+Q37VJuVsBu0=; b=NqwR2Ikt1IS529X0V5AHkuUSg5uRszUad0cs1tEmYf2eq4+ZVidmiTmBRxcgewb3Rb PINciJC7BVGfALxXkizdl+UEJ5YsoOk1fDa00ftvAjGz/EMemAj9MC6ls+CXa+GNpk/Y BaRQWQ5UZCdQk51xWecfYj+r4CuvziqX0Tdc1Tm/SIAd3ClV0qnECgXvnbbTPzt2/I6M HhkZjv/x4CjM8qPUk4AMOYHYmYblyosWPtwl/1LcPaORRnhDNttWq0OVEj3gcqZlb9gv 1QnQnwnT37SZFl6Ndwg8ua25InLXu0BwWh7lDg0dCWkht4IgMmPSaYdcFF+HSu9PpCiO OJjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ClckA7g4rvcs3CP0fvoSLzNGGBp4QzG+Q37VJuVsBu0=; b=Fvu/vRoYjih430briF6k5Ac2rtBSErem4QkNXo5wABAl8ud612WpwZy0sd6fuU5bre Ah/0an4g/Bw1nfysps04DmznSTIMEQRIZkzYL/k/I3utiPVScOIdmd6UsOOPj3barsnx 9lO5BOCIh/KPdyaeiMBxCDUWqP3G5DYTNRU50VfkRl5EzHNY17UCJ6PcKFw8HAxLy3ls fclj7IHQ3a4Z8vQWLg4BUof1C5U39sHMlBLlbgy/JzRrLGM0w03uoeHO+uwDkLxazlGd uN88xQ/LK3pS9N2ASU00r0HjEw+Pro16VmvhQHH1O26AgCTwLxuZeLWbCqCikJChIzNl KZDQ== X-Gm-Message-State: AOAM531ATsOjt+horL4Y+IuTvrG/roOYgn0RyH0WY+Uc0C+HyUmeyjFW hrq1OEUpMc7LZw1sDgIH1TA= X-Google-Smtp-Source: ABdhPJwGQZ+gie2TFK3wc1dRUt4bLvH3Gnpk160iJx14spN8XQhQ/yZiN6K7dNu+7L9eCdPaxX5wbA== X-Received: by 2002:ac8:7352:: with SMTP id q18mr9878qtp.306.1623336954868; Thu, 10 Jun 2021 07:55:54 -0700 (PDT) Original-Received: from localhost (pool-71-190-212-171.nycmny.fios.verizon.net. [71.190.212.171]) by smtp.gmail.com with ESMTPSA id u13sm2340739qke.41.2021.06.10.07.55.53 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jun 2021 07:55:54 -0700 (PDT) In-Reply-To: <8335tpdcq9.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 10 Jun 2021 17:18:54 +0300") 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:208324 Archived-At: > You cannot have, for example, half of the bits of the variable set by one thread > and the other half by another thread. I dunno, this seems like a sophomoric, rose-colored view of variable sharing without regard to caching, or really any generally accepted guarantees about POSIX threads. > So can you describe what you think happens in your scenario that the > offending change that added threads_holding_glib_lock causes? Two threads see `threads_holding_glib_lock` is "0" and both attempt acquiring the lock (line 43, xgselect.c) Or, two threads see `threads_holding_glib_lock` as "2" and glib lock is never released. (line 37, xgselect.c)