From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#75275: 30.0.92; `make-thread` bug on macOS 15.2 Date: Thu, 2 Jan 2025 08:35:14 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7542"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75275@debbugs.gnu.org, Alan Third To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 02 15:36:29 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 1tTMJG-0001lA-7L for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jan 2025 15:36:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTMIu-0000mA-Ae; Thu, 02 Jan 2025 09:36:04 -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 1tTMIs-0000lv-Qs for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 09:36:02 -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 1tTMIs-0001Ps-IU for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 09:36:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:MIME-Version:References:In-Reply-To:From:To:Subject; bh=nps4cLXleBOR7KPeSZi3NjnF4xg3hwZOjFDH8rqj4eQ=; b=ug1bJzcmZZdS0QTwESk/GEiWJKKXbA/1Ap9lw/ZVGooWQlqJOscB9m9HEQlIyLQ3NumC3anO0pkUbjTFeogOeWdcunKvnt1UM5m04IYfHe01t0RgQX0k5ozEPcd2SdxdwCPhcHIkRfOK14rnJAV8bJB22o27JSE5Lea3xPUhSFf/NV7iQlvIM8PizWN3v5UCxh7bXDcIL4ss7CUWY1xcihyeJLQz6o+mG3zUAu1x8OaIx+I7rAlwi9+Qf3Q+QCtgK/aXZ2fLZQWYZ7Cs2BSvfcpXqs7sE+bBXPj8nnIfG2CiXZ0BW+nz6Z3dA2pI51YEllZHYvz1c12At7wucMh6vg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTMIs-0003fR-E0 for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 09:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jan 2025 14:36: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.173582851914018 (code B ref 75275); Thu, 02 Jan 2025 14:36:02 +0000 Original-Received: (at 75275) by debbugs.gnu.org; 2 Jan 2025 14:35:19 +0000 Original-Received: from localhost ([127.0.0.1]:43337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTMIA-0003de-KE for submit@debbugs.gnu.org; Thu, 02 Jan 2025 09:35:19 -0500 Original-Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:60600) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tTMI8-0003an-0O for 75275@debbugs.gnu.org; Thu, 02 Jan 2025 09:35:16 -0500 Original-Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5d3ecae02beso13952984a12.0 for <75275@debbugs.gnu.org>; Thu, 02 Jan 2025 06:35:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735828515; x=1736433315; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=nps4cLXleBOR7KPeSZi3NjnF4xg3hwZOjFDH8rqj4eQ=; b=SV3TgsHojRhEXCY80LM1rm/sHMQp4Gfei0N+F3FSp40uxHmebemt4jSnL/DfFEVtTf eWyCqcYtFxoo+pLLcF0tw0mRFyevXeYOrpdUak/6TkioAEsUZRRHUIf+pWcZmkSfM41R oU9hd4hzwANvm5kZB6Vefyi17uNEGO+RG3E7O+S8dsKkkkNZ14VrjdltYDH/cUupCZPl sjpSJQfqGZeOvSJVjAMnvq3cXh8KE9TPip9W4mKYVaFR0QZGqJqc5fA6C09FKRZXhRLS Hn1QnKvNcG9jz1r7+feSfGeKny3r0cIe4LDftWBKWzupbkiRsNjgrm+V/AMlOJOn+cUJ XC0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735828515; x=1736433315; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=nps4cLXleBOR7KPeSZi3NjnF4xg3hwZOjFDH8rqj4eQ=; b=UFyX1g5lhYyI5JaQNd9v/evxEWF5UvwcVwZqVNSKRcwwa7mjxGXsaV2oclzD13VTNt kA+537CXu7ppn+1bSRT9DVcs8S2JV2acf2t4TBc47dDZ49t+i0RpUqiruyajXS7qKCp4 L5kpOGGPnGsrrJlr80nO3gardNsXHMJJV223oHMhnk9c8+5/FUUeIJ2evAyKcfXu077U tUgzNr6Q5lA+Lss7z44iBuaY1HImi0MYSU4sz+pWgJcN/SHu+XXmhP78Ci26xn0toduW q1yV6Qp1F1YjK/LA1jtN6apV8HiS1iWmgbFMUghfQEzPQVxOkwYNphHbv8B4cGqCmY72 54xw== X-Gm-Message-State: AOJu0YxzhlSStGSWA+pTVmOVL6zDmTdG3KyYlxg1PfJI0WdTwDqmMOl+ qZwburw4/XXs78K48F7hiQzoEsWJi4ubx8zT00HTrafI+fXW+yRy35qtmuIdYWVnL+rpnygd2cq TQU1zgcp9yQFkBmvB0Ovz+S8dF/I= X-Gm-Gg: ASbGncv0pMEXFwHYudboK9b0Oty/4ItepU3nBxPcA6casnnVNUpCd0QDrE5PJwFVOus wpt556DLHRikvXq5HMO3zFedX4O84oYiAc9Er4+yv X-Google-Smtp-Source: AGHT+IEUZlisvVxa7S8nLLht9Ns5qgju1l2i5t4Yj6WhiuGhB7E7zI8tDbkDBSX4eZTqMGCr2JOzQH1DWmMqcIB/LyA= X-Received: by 2002:a05:6402:270d:b0:5d6:66cf:2a3a with SMTP id 4fb4d7f45d1cf-5d81dda7e79mr41706927a12.17.1735828514474; Thu, 02 Jan 2025 06:35:14 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 2 Jan 2025 08:35:14 -0600 In-Reply-To: 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:298172 Archived-At: Gerd M=C3=B6llmann writes: > I have something in my notes which might or might not help: > > * Breakpoint for errors displayed by macOS on stderr > > Set a breakpoint on CGPostError to find sources of errors. > > #+begin_src sh > To find out from where macOS prints stuff to stderr, like > 023-07-20 13:41:17.073449+0200 emacs[53072:1205906] [default] > CGSWindowShmemCreateWithPort failed on port 0 > b _os_log_error_impl > b _os_log_impl > b _os_log_debug_impl > b _os_log_fault_impl > #+end_src > > If on of these breakpoints is hit when the error is displayed, we could > perhaps see why ns_select_1 calls EmacsApp.run. In my understanding, it > shouldn't because Cocoa event handling should only be done in the main > thread. > > If the breakpoints are not hit, we could instrument ns_select_1 to call > an empty function do_break on which we could set a breakpoint. > > if (![NSThread isMainThread]) > do_break (); > [NSApp run]; > > Or something like that. The question would be what in the code above the > [NSApp run] is wrong so that we land here. Probably some if condition. > > CC to Alan Third. Thanks, I didn't have time to look into the above yet, but I noticed that the bug wasn't there on emacs-29 and bisected the issue: 4ac4cec652ffaca4333d8f297b8a6c0e5bd79c68 is the first bad commit commit 4ac4cec652ffaca4333d8f297b8a6c0e5bd79c68 Author: Gerd M=C3=B6llmann Date: Sat Mar 9 15:06:29 2024 +0100 Prevent freezes on macOS (bug#69561) * src/nsterm.m (ns_select_1): Store pending input_events. Always call [NSApp run]. src/nsterm.m | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)