* bug#75056: 31.0.50; tty-child-frames with server / multiple clients possible hangs
@ 2024-12-24 5:43 Len Trigg
2024-12-25 11:54 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Len Trigg @ 2024-12-24 5:43 UTC (permalink / raw)
To: 75056
[-- Attachment #1.1: Type: text/plain, Size: 5385 bytes --]
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.
In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0) of 2024-12-24 built on kaka
Repository revision: 6ac38396898e6324d4c6dddb2ad05d1ad0dc5e7c
Repository branch: master
System Description: Ubuntu 24.04.1 LTS
Configured using:
'configure --prefix=/home/len/.local --with-rsvg --with-cairo
--with-native-compilation --with-tree-sitter --with-modules'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LC_MONETARY: en_AU.UTF-8
value of $LC_NUMERIC: en_AU.UTF-8
value of $LC_TIME: en_AU.UTF-8
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Fundamental
Minor modes in effect:
xterm-mouse-mode: t
server-mode: t
vertico-posframe-mode: t
vertico-mode: t
elpaca-use-package-mode: t
override-global-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
blink-cursor-mode: t
minibuffer-regexp-mode: t
buffer-read-only: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr compile comint ansi-osc ansi-color ring comp-run
comp-common rx emacsbug message yank-media puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils xt-mouse term/xterm xterm
server vertico-posframe vertico-multiform vertico compat posframe
vertico-posframe-autoloads vertico-autoloads posframe-autoloads cl-extra
help-mode elpaca-use-package use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
easy-mmode use-package-core elpaca-use-package-autoloads elpaca-log
elpaca-ui elpaca-menu-elpa elpaca-menu-melpa url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core
cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile
url-vars mailcap elpaca-menu-org elpaca warnings icons elpaca-process
cl-loaddefs cl-lib elpaca-autoloads rmc iso-transl tooltip cconv eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo gtk
x-toolkit xinput2 x multi-tty move-toolbar make-network-process
tty-child-frames native-compile emacs)
Memory information:
((conses 16 396223 19518) (symbols 48 15669 0)
(strings 32 187599 3392) (string-bytes 1 2901786) (vectors 16 17588)
(vector-slots 8 194405 8250) (floats 8 78 41) (intervals 56 346 0)
(buffers 992 19))
[-- Attachment #1.2: Type: text/html, Size: 5923 bytes --]
[-- Attachment #2: init.el --]
[-- Type: text/x-emacs-lisp, Size: 3630 bytes --]
;;; init.el --- Emacs initialization
;;; Code:
;; elpaca boilerplate ;;
(setq package-enable-at-startup nil)
;; Use elpaca rather than package.el, it gives better control over package versions
(defvar elpaca-installer-version 0.8)
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
:ref nil :depth 1
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
:build (:not elpaca--activate-package)))
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
(build (expand-file-name "elpaca/" elpaca-builds-directory))
(order (cdr elpaca-order))
(default-directory repo))
(add-to-list 'load-path (if (file-exists-p build) build repo))
(unless (file-exists-p repo)
(make-directory repo t)
(when (< emacs-major-version 28) (require 'subr-x))
(condition-case-unless-debug err
(if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
,@(when-let* ((depth (plist-get order :depth)))
(list (format "--depth=%d" depth) "--no-single-branch"))
,(plist-get order :repo) ,repo))))
((zerop (call-process "git" nil buffer t "checkout"
(or (plist-get order :ref) "--"))))
(emacs (concat invocation-directory invocation-name))
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
((require 'elpaca))
((elpaca-generate-autoloads "elpaca" repo)))
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
(error "%s" (with-current-buffer buffer (buffer-string))))
((error) (warn "%s" err) (delete-directory repo 'recursive))))
(unless (require 'elpaca-autoloads nil t)
(require 'elpaca)
(elpaca-generate-autoloads "elpaca" repo)
(load "./elpaca-autoloads")))
(add-hook 'after-init-hook #'elpaca-process-queues)
(elpaca `(,@elpaca-order))
;; Install use-package support
(elpaca elpaca-use-package
;; Enable :elpaca use-package keyword.
(elpaca-use-package-mode)
;; Assume :elpaca t unless otherwise specified.
(setq elpaca-use-package-by-default t))
;; Block until current queue processed.
(elpaca-wait)
;; (setq custom-file (expand-file-name "custom.el" user-emacs-directory))
;; (add-hook 'elpaca-after-init-hook (lambda () (load custom-file 'noerror)))
(use-package posframe
;;:config
;;(setq posframe-mouse-banish nil)
)
(use-package vertico-posframe
:after posframe vertico
:config
(push '(tty-non-selected-cursor . t) vertico-posframe-parameters)
(push '(background-color . "black") vertico-posframe-parameters)
(push '(undecorated . nil) vertico-posframe-parameters)
(vertico-posframe-mode))
(use-package vertico
:init
(vertico-mode)
;;(advice-add #'tmm-add-prompt :after #'minibuffer-hide-completions)
;; (setq
;; vertico-resize nil
;; vertico-cycle t)
)
(use-package server
:ensure nil
:hook (elpaca-after-init . server-start))
;;; init.el ends here
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#75056: 31.0.50; tty-child-frames with server / multiple clients possible hangs
2024-12-24 5:43 bug#75056: 31.0.50; tty-child-frames with server / multiple clients possible hangs Len Trigg
@ 2024-12-25 11:54 ` Eli Zaretskii
2024-12-25 11:59 ` Gerd Möllmann
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2024-12-25 11:54 UTC (permalink / raw)
To: Len Trigg, Gerd Möllmann; +Cc: 75056
> From: Len Trigg <lenbok@gmail.com>
> Date: Tue, 24 Dec 2024 18:43:29 +1300
>
> 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.
Gerd, could you perhaps look into this?
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#75056: 31.0.50; tty-child-frames with server / multiple clients possible hangs
2024-12-25 11:54 ` Eli Zaretskii
@ 2024-12-25 11:59 ` Gerd Möllmann
0 siblings, 0 replies; 3+ messages in thread
From: Gerd Möllmann @ 2024-12-25 11:59 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Len Trigg, 75056
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Len Trigg <lenbok@gmail.com>
>> Date: Tue, 24 Dec 2024 18:43:29 +1300
>>
>> 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.
>
> Gerd, could you perhaps look into this?
Thanks. Will come back to this after the holidays.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-25 11:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-24 5:43 bug#75056: 31.0.50; tty-child-frames with server / multiple clients possible hangs Len Trigg
2024-12-25 11:54 ` Eli Zaretskii
2024-12-25 11:59 ` Gerd Möllmann
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).