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#65837: 30.0.50; Debugger in non-main threads Date: Sat, 09 Sep 2023 19:46:22 +0300 Message-ID: <83il8jthup.fsf@gnu.org> References: <83bkebvbsj.fsf@gnu.org> <83msxvtk3r.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27163"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65837@debbugs.gnu.org To: Helmut Eller Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 09 18:47:14 2023 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 1qf174-0006p0-Iw for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Sep 2023 18:47:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qf16q-0004MY-7I; Sat, 09 Sep 2023 12:47:00 -0400 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 1qf16p-0004MK-0D for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 12:46:59 -0400 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 1qf16o-0003vN-O9 for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 12:46:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qf16r-0001YG-L0 for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 12:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Sep 2023 16:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65837 X-GNU-PR-Package: emacs Original-Received: via spool by 65837-submit@debbugs.gnu.org id=B65837.16942780045939 (code B ref 65837); Sat, 09 Sep 2023 16:47:01 +0000 Original-Received: (at 65837) by debbugs.gnu.org; 9 Sep 2023 16:46:44 +0000 Original-Received: from localhost ([127.0.0.1]:48398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qf16a-0001Xh-7D for submit@debbugs.gnu.org; Sat, 09 Sep 2023 12:46:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qf16Y-0001XW-LB for 65837@debbugs.gnu.org; Sat, 09 Sep 2023 12:46:43 -0400 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 1qf16Q-0003uA-Ci; Sat, 09 Sep 2023 12:46:34 -0400 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=+BALSmnNmQpl2NuX+PDa8DRUJ9y+0q461rGnveKx6eU=; b=KR/wRxvGoHq4 623S6nadEhdF/v43lahw0XZJjVYJ9EUtnEK6DPpdetQQjY6BU9nTRz/HOYrPR01d5IljAqAbDwyKT 7diYX4XjI597fHX0vQ460P+WWYOsC/rHiU8rrejYTGQga3rdtLUxgBDT+PM00UbEQlNvu5P1Tmjxc B+zRLZaPY/9ra9GpuIbCh5fWi97UF6b0o7z3YrgwhIdvp8S82vo687lrpNs5Og4nE2c/FWE5Qp+Ex Zxp0Xo4KxikFlT58oUEu1ELyUncTU7KtYtLaNXSjVfQxUibyIsWgnHx2bacqVQXS48rPDGPh+uyU5 RqRdYYDZSbCR+Idui550cQ==; In-Reply-To: (message from Helmut Eller on Sat, 09 Sep 2023 18:23:29 +0200) 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:269886 Archived-At: > From: Helmut Eller > Cc: 65837@debbugs.gnu.org > Date: Sat, 09 Sep 2023 18:23:29 +0200 > > On Sat, Sep 09 2023, Eli Zaretskii wrote: > > >> Is there a design/plan for how recursive-edit is supposed to work in > >> non-main threads? > > > > Not that I know of, no. But you seem to be asking mainly about > > reading events, not about recursive-edit? > > Well, the debugger calls recursive-edit and if it's not clear what > recursive-edit is supposed to do, then replacing recursive-edit with > something more reliable would be my first step to improving the > debugger. If recursive-edit is run by the same thread which was running before the debugger was entered, and the debugger never calls one of the primitives that enter the idle loop (sit-for etc.), then I don't think problems will happen, because it basically means the thread which entered the debugger keeps running. But if the debugger causes its thread to yield, some other thread could grab the global lock, and then all hell will break loose. So I think the only reasonably practical way to make this particular use case stable is to disable thread switching for as long as the debugger is active. WDYT?