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 01:58:09 -0600 Message-ID: References: <868qrtlkiq.fsf@gnu.org> 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="4743"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 75275@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 02 08:59:20 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 1tTG6x-00013a-NZ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jan 2025 08:59:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTG6i-0008OL-Di; Thu, 02 Jan 2025 02:59: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 1tTG6g-0008Nx-GQ for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 02:59: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 1tTG6g-000181-8M for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 02:59: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=jYUU86Rp5G9/ZRLjslrv/Tl8k87okLvp7p1YJh0FH8o=; b=L6xzEGo7ccnCCsYtEw/0a0v+Gm92FL13HjQ7IMlwLRIqEe+ZSgwPWIJop5BQd8v20l2/sXaNLeOiiK/z8zSWD8X7spg+CgJGhLykU8g/otgMDC+3SDAc/yL/J9b0lOyJfZZNV4EReY43wZU+u3TKMK/ar9nNXs8ofWSM4Ab7tyKXC5qPIstLtF/TPy5+ICFkDewDELEgMbrD63LxobrlVtZCXhgxB1vIBv+AnkTmQ+NO6N043bmLZ/0OaBfT8VeNQeIABjb6gmq5bqPaVn4R9hikzDqemN2YE/TZ9uHLU5Q+qHQtsXnFpXHvr9NrEokJ4nuEmS4E3ru9kGgE1qlpQQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTG6g-0002ec-39 for bug-gnu-emacs@gnu.org; Thu, 02 Jan 2025 02:59: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 07:59: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.173580469410131 (code B ref 75275); Thu, 02 Jan 2025 07:59:02 +0000 Original-Received: (at 75275) by debbugs.gnu.org; 2 Jan 2025 07:58:14 +0000 Original-Received: from localhost ([127.0.0.1]:42634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTG5t-0002dL-Kd for submit@debbugs.gnu.org; Thu, 02 Jan 2025 02:58:13 -0500 Original-Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:61635) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tTG5r-0002d9-Ee for 75275@debbugs.gnu.org; Thu, 02 Jan 2025 02:58:12 -0500 Original-Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5d3f28a4fccso17211875a12.2 for <75275@debbugs.gnu.org>; Wed, 01 Jan 2025 23:58:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735804690; x=1736409490; 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=jYUU86Rp5G9/ZRLjslrv/Tl8k87okLvp7p1YJh0FH8o=; b=Pfs/3hRUndzzr+QjXaUdk3i5u3u/VQX8kFdVapFEhvYOoeb0ouUNEaQAZngiltMsxQ zpsbWSOMaiAck5y/z8IrwjGlSSoQIo3BXomRfpl7oUZgAugd/SgCn6Qz11hSbgjXGSlz 10s+iPiLg9mzwwCChGrncdm93E86tk52t1gsHyNu+tuSFtncq4YzMFdjRB0I1aV8GM3K Vp6Jaop2rdcsKrtTCSQ0wxijoIyt1TBaSAH1QWqbbQ0F9Chsq5oQr45wMvqzfXQZZQEZ bF2rIYGY12CI3Z+sVcvCFmbVWJ9GNMl14X/wXX7YsHbJxPDAR4xhTN492o5GHsmj3j6y EPuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735804690; x=1736409490; 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=jYUU86Rp5G9/ZRLjslrv/Tl8k87okLvp7p1YJh0FH8o=; b=Pix+zxafn5avgQUtQrA24iqx7ryRgypYBmEZ39X3zBk9ywKyd7txwXK0r11SwceHqt vwS7I4ecrEVjbMCw2TsyqLRmudU/otQawDBAvgdnONVF7REWwQykdtIfyyy821Rbx69x ocUdOJhbG/X+3ZoMnLBMnwypJvwCX9DJCVwJa7BH0Rmy2CQv7YYei9doXAZXMaFzRZRf /mAGkuE23KVv6tfdCFKku3Ehlo7ys8dSfvio0UkNV7oHgpsFNfXbkd0trn2NnNaIlsDt 4JtCr5zilG38ZQPPbf+aQIKzxYhOL+zmrTQrpnkHHalrOlPcs/5E0RnMTj43QrFy4L1p BOaQ== X-Forwarded-Encrypted: i=1; AJvYcCV/IIUYCaQErffWxOcnlQRlKbXWHAf7qe13S5AUNO0tkNQASwyZ2Hm6ybD9vNKVVQyCQrCAPA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwYC4WinJqO7P4ihxRR9hexxLwX0ZszC61oOqa/Bco6RdVnXLrV Usv6HN8pARHueQKcHyXrCsoAWHF+2ELeMdDiU/EdGKLWAtRX4jfm+ozudC3/NG7CVO8W/GeV4vu P8I3/trv0SNl+P1IGnV4rjuBRPbs= X-Gm-Gg: ASbGncvQScoTWJW/xnnnd5+IjdgdBoSBQimEjbCk3yKasLzCkosQgXxinfSECd9SZny T/7ZWFH8pvOaT0PhpkpgZ0f4+Wmw5LOWNzA9o/uHJ X-Google-Smtp-Source: AGHT+IG3EDzz8vsXGwot6k+ZcnpKsc3j8Bu+4HhZIAGD2kuPvm8ipCHYXG0DWeJatml0M1ls84h/aztvPuTNJQwEQWY= X-Received: by 2002:a05:6402:2349:b0:5d0:d183:cc05 with SMTP id 4fb4d7f45d1cf-5d81dd5ee27mr34216939a12.5.1735804689902; Wed, 01 Jan 2025 23:58:09 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 2 Jan 2025 01:58:09 -0600 In-Reply-To: <868qrtlkiq.fsf@gnu.org> 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:298142 Archived-At: Eli Zaretskii writes: >> Cc: 75275@debbugs.gnu.org >> From: Stefan Kangas >> Date: Thu, 2 Jan 2025 00:47:06 -0600 >> >> Gerd M=C3=B6llmann writes: >> >> > Stefan Kangas writes: >> > >> >> I have run into a bug with make-thread on macOS 15.2, running on an M= 2. >> >> >> >> I can reproduce the issue consistently both on emacs-30 and master by >> >> evaluating this in emacs -Q: >> >> >> >> (make-thread (lambda () (sleep-for 1)) "bug") >> >> >> >> This leads to Emacs freezing up completely within a fraction of a >> >> second. I have time to move point once or maybe twice before it gets >> >> non-responsive, let's say within a few tenths of a second. >> > >> > Curious question: Do you see a beach ball? >> >> Yes, I do see a beach ball. It takes a second or so to show up, which I >> guess is expected. >> >> >> When I kill the process in the lldb window with Ctrl+C, I can get the >> >> following (this is on emacs-30): >> >> >> >> frame #12: 0x0000000100403fec emacs`-[EmacsApp >> >> run](self=3D0x0000000156610fe0, _cmd=3D"run") at nsterm.m:5938:7 >> >> frame #13: 0x00000001004024b0 emacs`ns_select_1(nfds=3D0, >> >> readfds=3D0x00000001708c26bc, writefds=3D0x00000001708c263c, >> >> exceptfds=3D0x0000000000000000, timeout=3D0x00000001708c2610, >> >> sigmask=3D0x0000000000000000, run_loop_only=3DNO) at nsterm.m:4954:3 >> >> frame #14: 0x000000010040202c emacs`ns_select(nfds=3D0, >> >> readfds=3D0x00000001708c26bc, writefds=3D0x00000001708c263c, >> >> exceptfds=3D0x0000000000000000, timeout=3D0x00000001708c2610, >> >> sigmask=3D0x0000000000000000) at nsterm.m:5006:10 >> > >> > I'm asking because of bug#72496. The part of the backtrace above remin= ds >> > me a bit of what I trued to describe in that bug: EmacsApp.run never >> > returning to ns_select_1. Can you see if it ever returns? >> >> After recompiling with NSTRACE_ENABLED, and based on reading at the >> terminal output, it seems like it does not return to ns_select_1 after >> the first line that reads >> >> nextEventMatchingMask should only be called from the Main Thread! >> >> Is there a better way to see if it returns to that function? > > Who calls nextEventMatchingMask? I don't see it in the backtraces you > posted. I believe the below two lines are relevant, but note that the function in that case is actually called "_nextEventMatchingEventMask". IOW, I had assumed that "nextEventMatchingMask" is just what the error message (perhaps confusingly) said: 2 AppKit 0x0000000192721c24 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3072 3 AppKit 0x0000000191db0060 -[NSApplication run] + 480