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#75275: 30.0.92; `make-thread` bug on macOS 15.2 Date: Thu, 02 Jan 2025 17:31:07 +0200 Message-ID: <86msg9jkqs.fsf@gnu.org> References: <86bjwplmc1.fsf@gnu.org> <865xmxlivo.fsf@gnu.org> <86y0ztk323.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24948"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 75275@debbugs.gnu.org, stefankangas@gmail.com To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 02 16:32:14 2025 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 1tTNBF-0006He-Kg for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jan 2025 16:32:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTNBA-0000yl-8e; Thu, 02 Jan 2025 10:32:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTNB5-0000vJ-0Z for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 10:32:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTNB4-0001RL-Nx for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 10:32:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=A7IYCk62vsiXrHAtzEe1MgMlVjMk6a56n6ML/6eDyRM=; b=ryMlqBNMQhSFCmHZDk8gacrdQZ6PUWY4Fo+PwCz2MJkYfSX7DnqwNXkIFFZiuWp5huPjj8m2pReQwj7TTBAnj4UaltMuBx8oSC5Cgz3rTaanxGz272nX2bKgMD+fQ55VbpmcL04CfDBT0VlMAH3ulnee0x4Q1IdTEyxfZFH1ng+apZWfMEPWEO6s5GbcXDqo4ewDrNhK4qKreYpn+lEowj1AE/34shYtv0BnEJGwcktyYTWNqHh5Qng+9IAhdbMFhc8PIDbAX65WTqQ2oYsrLhk93c83VMN3UmSz54KCqn22Xsn4TOaGqTtVf9pGPrOFonQOUkBGblD4inpsITjE5w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTNB4-00078i-BK for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 10:32: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: Thu, 02 Jan 2025 15:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75275 X-GNU-PR-Package: emacs Original-Received: via spool by 75275-submit@debbugs.gnu.org id=B75275.173583190427401 (code B ref 75275); Thu, 02 Jan 2025 15:32:02 +0000 Original-Received: (at 75275) by debbugs.gnu.org; 2 Jan 2025 15:31:44 +0000 Original-Received: from localhost ([127.0.0.1]:46148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTNAl-00077t-Po for submit@debbugs.gnu.org; Thu, 02 Jan 2025 10:31:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53984) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTNAj-00077S-IH for 75275@debbugs.gnu.org; Thu, 02 Jan 2025 10:31:42 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTNAd-0001Me-4h; Thu, 02 Jan 2025 10:31:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=A7IYCk62vsiXrHAtzEe1MgMlVjMk6a56n6ML/6eDyRM=; b=a0ja27QpPz1x Y0DrGi8DZl0YUQIpA4aW8dux1H4yrJ5GA8C/7G5vNtB0gCy7SuVSrlrPT+2NbRv4EmeTksndHkp3R OBe4pALfs5C5D5q2WErJexZlw9FpgtKiUpNfrYl47L+8QmVe336YtCPkqy67rNg5fPoJD4QlwTb/z aXVXPEQvzBbxhKcCxUcnsI/hQfPsJKkRNAQ8c53bCOtQpUI9p7qyZn16BdYSnxXHyy5Jr3CdWEN7I ls0ii8RXzsIAIlFXxgY01Vm3cStGWzi6wmD81W8UdJRwS/IPOGk7TbUXlV4tlQtCLy2SxlCvY7Dzt y5uhd9nKG14Vor4fe/jDJw==; In-Reply-To: (message from Alan Third on Thu, 2 Jan 2025 11:03:50 +0000) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298177 Archived-At: > Date: Thu, 2 Jan 2025 11:03:50 +0000 > From: Alan Third > Cc: Eli Zaretskii , stefankangas@gmail.com, > 75275@debbugs.gnu.org > > > > I don't know. Is there anything in the following code that can be > > > relevant to a non-main thread? Note that non-main threads can > > > legitimately call wait_reading_process_output, which calls ns_select. > > > For example, what happens if a non-main Lisp thread starts a > > > sub-process? we do expect to be able to read the output from that > > > sub-process. > > My take on how this works was that in a non-main thread ns_select > should just act like pselect, hence it used to literally just call > pselect and return. In general, this is not right: calls to ns_select are expected to call thread_select, in all threads, so that other threads could get a chance on grabbing the global lock while this (non-main) thread waits for sub-process output. Maybe this cannot currently work in the NS build, but then it means any non-main thread will never relinquish the global lock until its function returns or signals an error. > FWIW, I still think the NS code in its current form is unsuitable for > multi-threaded use and must be rewritten. Then maybe we should stop supporting a with-threads build in NS?