From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#75056: 31.0.50; tty-child-frames with server / multiple clients possible hangs Date: Fri, 27 Dec 2024 07:04:54 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21043"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 75056@debbugs.gnu.org To: Len Trigg Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 27 07:07:21 2024 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 1tR3VI-0005Ki-Tt for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Dec 2024 07:07:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tR3V3-0000rB-Qt; Fri, 27 Dec 2024 01:07:06 -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 1tR3V1-0000pr-VV for bug-gnu-emacs@gnu.org; Fri, 27 Dec 2024 01:07:04 -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 1tR3V1-0007NP-NP for bug-gnu-emacs@gnu.org; Fri, 27 Dec 2024 01:07:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=czNcgrZsEB1S6oiqYXLFX8G73jUasM7pIZtzP7ASWnU=; b=M5foBj50VsHi24aQw9alopJvlsejMs6tuIs+bL2PdwM9yaJaNrBJAB5kTiSKiT1zWN3QGoEVSEvIS0H7wPq52pg9y/D/xiLL2UW8JhMwew3gvrXfLH7ZhBlLPL+L4hIxbpFKGeVkqix4yLelvvq3nnXzPz5Ep0vD0DaCI9IXTiwnDdRbolu7U4YuGC3J1lKDvcX6fcCcOruoCqVjtlW52659k7gCMHIxD1TCx5LbwY0w51lFkK2iVTRct6d3Ow6XjO6l30Tfc4RAhONlIlMWIxiktYjEPRZASSu4R5hXTWCwozQgwE52sU9Q5ozNyGdryvWrn5y/AuKGWO4Oyhd5MA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tR3V0-0004Wa-Io for bug-gnu-emacs@gnu.org; Fri, 27 Dec 2024 01:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Dec 2024 06:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75056 X-GNU-PR-Package: emacs Original-Received: via spool by 75056-submit@debbugs.gnu.org id=B75056.173527957217289 (code B ref 75056); Fri, 27 Dec 2024 06:07:02 +0000 Original-Received: (at 75056) by debbugs.gnu.org; 27 Dec 2024 06:06:12 +0000 Original-Received: from localhost ([127.0.0.1]:44410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tR3UA-0004Ul-EV for submit@debbugs.gnu.org; Fri, 27 Dec 2024 01:06:12 -0500 Original-Received: from mail-ed1-f46.google.com ([209.85.208.46]:61446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tR3U4-0004UB-KP for 75056@debbugs.gnu.org; Fri, 27 Dec 2024 01:06:09 -0500 Original-Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5d3f28a4fccso10430997a12.2 for <75056@debbugs.gnu.org>; Thu, 26 Dec 2024 22:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735279498; x=1735884298; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=czNcgrZsEB1S6oiqYXLFX8G73jUasM7pIZtzP7ASWnU=; b=RjkWFRd/RI7pYj2s2IZQx9SnuEebd32V6sU0Kuy5gcxSVu8ArxG4LyluCKtSngVKHv 2ahyVAW39ldHHq9td/9SBERtx1EJ/A4znwEoMno4Yy59covbjOQEwOjey1RJQw9St44R ymWmTdEEiNEXNU61I9JMZ7+kvJ6uWV71EOT7rNnFhcu3zOA1erYlQpWInJL3oa9EdggE aDOOyGLLeSEfEh7NDnn0ofDbyPSUSm5Kl3i2upJgdv6nNU6LxET18CCjiMS+Up82FPdN XKuqB5M03jFixMmz9UQgQgKjVTelzix1ZsMXxqav7fCb5H7iiG6qaqhdxcz5ioG6KqX6 IE4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735279498; x=1735884298; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=czNcgrZsEB1S6oiqYXLFX8G73jUasM7pIZtzP7ASWnU=; b=fkLinr1sfIyvbYfJHSNNuj11PmhUWuzL4OWZ+EW36nbXBPI0stj5CSaap2b6Fz0oHe Z5JWaYYvWk/q/5LUpJeVpYEucneXRdCRj/r6UzLNacnFroJrO3kON4HNBFVuRQyklM+X qdsNpJadNBZEU1rTr9S/wxKo9Pu8tPWyNbCiS/O43le/7wNs3W8j82opRqki+B5OmTRc Z06VHfBGAsRSQDIoX+Q8TD0bu6QKwwW2XGg2ohAgYg5M8uFO6Ufa91Wth7QT4C/vOK8U UwzUu4/me9lk2yMb+Upjg2jVp7hsRlwMrIynW74Wif5Ugd766zu3HbdZW8QukTXbcuJj YJnA== X-Gm-Message-State: AOJu0Yw0rU7b4x/FrQwBSxwlXkH3NqlzCWT0qi+ZP4JdzS7wlO3qwYee 5sMzZpfRlm1GJyGv1njK4PPpGFAnJ2MrISBt/5udFbZPt8bgL480ShocVg== X-Gm-Gg: ASbGncuFPAVdJhFWjQZVIV4In7izrR+giR8yOmNRLvamzol1VOlJ3QpSpX5gvyPglIN EYDKAMLFNf9pJCgRw5WtLa+eyxQiCjQcbpX2zBN96QigAquPD+/4YlDcZLleI56hx1IYqUoo5NS S4XLsXoiG2ALkdbF+EKWg39F4sUfCxk64MUkbcLOz9RQ3G5FjCcp7b5iBp4LeQZNG6XOtLz0+1L JvAFGQBsR21+bh6M6dwcsv8xpaq9x7l7XgrlDGyD2Rx8A8/mNbzsDUKo5KvdFuw9tjycItJac2f IB708Yg1/WfHvib96nAzxcQlezG06Obg+gml1/EUJS286e5NCbcpAo3qpTbQGA2O9A== X-Google-Smtp-Source: AGHT+IE8GAPbKotlii3vNRUcaEJPZz7sRBszVJinbJPkoWnXT7AIkFrCSsSLLe89+mF3DZthxk3p8w== X-Received: by 2002:a17:907:36ce:b0:aa6:7165:504b with SMTP id a640c23a62f3a-aac2d41ebc3mr2759930366b.31.1735279498018; Thu, 26 Dec 2024 22:04:58 -0800 (PST) Original-Received: from pro2 (p200300e0b74e5900bde19f98ca9a60df.dip0.t-ipconnect.de. [2003:e0:b74e:5900:bde1:9f98:ca9a:60df]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1063176566b.47.2024.12.26.22.04.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Dec 2024 22:04:56 -0800 (PST) In-Reply-To: (Len Trigg's message of "Tue, 24 Dec 2024 18:43:29 +1300") 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:297801 Archived-At: Len Trigg writes: > tty-child-frames does not seem to play well with multiple clients. When we run server-start and allow emacs to have > multiple clients (e.g. an initial "emacs -nw" and an > "emacsclient -nw"), using a function that utilizes tty-child-frame (such as M-x when vertico-posframe is loaded) in one > frame leads the other client to be locked up. > > Steps to reproduce: > > mkdir ~/emacs-test > Copy the attached init.el into ~/emacs-test/ > emacs -nw --init-directory=~/emacs-test (the first time will result in packages being installed by elpaca) > (in another terminal) emacsclient -nw > Do something to invoke the child frame pop up (e.g. C-x b and select a buffer) > Switch back to the original emacs > Do something to invoke the child frame pop up (e.g. C-x b and select a buffer) > Swap to the other terminal, and note that at some point one client will stop responding > to user input. (It may take a couple of tries, perhaps with other regular commands interspersed). > When one client is locked, swap back to the other terminal and exit the client - the original > client will now accept user input. > > When a client is locked it *does* accept some input (e.g. C-x C-c will exit the client) > > It's possible this is vertico-posframe related, as I can't trigger similar behaviour using transient-posframe. > Hi Len, and thanks for the nice reproducer! I can reproduce what you describe, I think, but I must admit that I'm a bit at a loss at the moment. Something similar happens BTW if the server is a GUI Emacs. Pretty weird. And then I found this in admin/notes/multi-tty, under known problems: * The single-kboard mode. If your multi-tty Emacs session seems to be frozen, you probably have a recursive editing session or a pending minibuffer prompt (which is a kind of recursive editing) on another display. To unfreeze your session, switch to that display and complete the recursive edit, for example by pressing C-] ('abort-recursive-edit'). I am sorry to say that currently there is no way to break out of this "single-kboard mode" from a frozen display. If you are unable to switch to the display that locks the others (for example because it is on a remote computer), then you can use emacsclient to break out of all recursive editing sessions: emacsclient -e '(top-level)' Note that this (perhaps) unintuitive behavior is by design. Single-kboard mode is required because of an intrinsic Emacs limitation that is very hard to eliminate. (This limitation is related to the single-threaded nature of Emacs.) I plan to implement better user notification and support for breaking out of single-kboard mode from locked displays. Also see the long list of things to do in the same file, which makes me a bit wary. @Eli: I think we should invoke a multi-tty expert who can tell if what we see here can be kind of expected with the current state of multi-tty or not. And maybe can tell how up-to-date admin/notes/multi-tty is in the first place.