Subject: bug#67653: 29.1; Regression: When using a minibuffer-only frame, setting `resize-mini-frames' hangs Emacs

From: Eli Zaretskii <[email-masked]>
Date: Thu, 07 Dec 2023 12:49:04 +0200

> From: Stephen Berman <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Thu, 07 Dec 2023 11:26:58 +0100
> 
> Thread 1 (Thread 0x7fffe871c140 (LWP 7267) "emacs"):
> #0  0x00007fffeccc6041 in pselect64_syscall (sigmask=0x0, timeout=<optimized out>, exceptfds=0x0, writefds=0x0, readfds=0x7fffffff6f10, nfds=5) at ../sysdeps/unix/sysv/linux/pselect.c:34
> #1  __pselect (nfds=nfds@entry=5, readfds=readfds@entry=0x7fffffff6f10, writefds=writefds@entry=0x0, exceptfds=exceptfds@entry=0x0, timeout=<optimized out>, timeout@entry=0x7fffffff6f00, sigmask=sigmask@entry=0x0) at ../sysdeps/unix/sysv/linux/pselect.c:56
> #2  0x00005555556b211f in x_wait_for_event (f=f@entry=0x5555561964f0, eventtype=eventtype@entry=22) at /home/steve/src/emacs/emacs-master/src/xterm.c:28336
> #3  0x00005555556dc87a in xg_frame_set_char_size (f=f@entry=0x5555561964f0, width=88, height=17) at /home/steve/src/emacs/emacs-master/src/gtkutil.c:1339
> #4  0x00005555556bf49f in x_set_window_size (f=0x5555561964f0, change_gravity=<optimized out>, width=<optimized out>, height=<optimized out>) at /home/steve/src/emacs/emacs-master/src/xterm.c:28429
> #5  0x00005555555f8fc0 in adjust_frame_size (f=f@entry=0x5555561964f0, new_text_width=<optimized out>, new_text_width@entry=56, new_text_height=new_text_height@entry=17, inhibit=inhibit@entry=1, pretend=pretend@entry=false, parameter=<optimized out>) at /home/steve/src/emacs/emacs-master/src/frame.c:783
> #6  0x00005555555fc643 in gui_set_frame_parameters_1 (f=f@entry=0x5555561964f0, alist=<optimized out>, alist@entry=XIL(0x7fffe7a11123), default_parameter=default_parameter@entry=false) at /home/steve/src/emacs/emacs-master/src/frame.c:4466
> #7  0x00005555555fcae1 in gui_set_frame_parameters (f=f@entry=0x5555561964f0, alist=alist@entry=XIL(0x7fffe7a11123)) at /home/steve/src/emacs/emacs-master/src/frame.c:4558
> [...]
> Lisp Backtrace:
> "modify-frame-parameters" (0xd9de2318)
> "fit-frame-to-buffer-1" (0xd9de2188)
> "fit-mini-frame-to-buffer" (0xd9de2150)
> "window--resize-mini-frame" (0xffff7528)
> "redisplay_internal (C function)" (0x0)
> "read-from-minibuffer" (0xd9de20e8)
> "completing-read-default" (0xffffd028)
> "read-extended-command-1" (0xffffd2e0)
> "read-extended-command" (0xd9de2040)
> "byte-code" (0xffffd4b0)
> "command-execute" (0xffffd858)

This seems to say that we wait for the ConfigureNotify event to come
from X.  But that wait has a timeout of 0.1 sec, so I wonder how come
we wait forever.  Po Lu, any ideas?

Thanks.