Subject: bug#65116: 29.1; query-replace-read-args fails reading second arg in detached minibuf

From: Jim Rees <[email-masked]>
Date: Sun, 14 Jan 2024 10:59:16 -0600

While Po's patch fixes the read-args focus bug, I now have a new bug. It
happens irregularly and I can't say for sure yet that it's caused by Po's
patch. I don't know what triggers it but it seems I need to have at least
two edit frames open.

What happens first is the mouse pointer disappears, but I can still edit.
After a while emacs hangs and ignores all input. A bit later it won't even
redisplay frames on X exposure.

Here is the stack when it hangs:

% sudo gdb -batch -ex bt -p 174496
[New LWP 174497]
[New LWP 174498]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
0x00007f7f6ee3e9d8 in pthread_sigmask () from /usr/lib/libc.so.6
#0  0x00007f7f6ee3e9d8 in pthread_sigmask () at /usr/lib/libc.so.6
#1  0x000055e30363ed64 in block_interrupt_signal ()
#2  0x000055e3036d3a2a in really_call_select ()
#3  0x000055e3036d3ee9 in thread_select ()
#4  0x000055e3036ec3e4 in xg_select ()
#5  0x000055e3036baaa2 in wait_reading_process_output ()
#6  0x000055e303634352 in read_char ()
#7  0x000055e303635b0d in read_key_sequence ()
#8  0x000055e303636999 in command_loop_1 ()
#9  0x000055e3036870a9 in internal_condition_case ()
#10 0x000055e30362a3d2 in command_loop_2 ()
#11 0x000055e303687027 in internal_catch ()
#12 0x000055e30362a374 in command_loop ()
#13 0x000055e30362d1c3 in recursive_edit_1 ()
#14 0x000055e30362d418 in Frecursive_edit ()
#15 0x000055e30356b311 in main ()
[Inferior 1 (process 174496) detached]

Note this is Po's patch on top of stock 29.1. If I get ambitious I'll try
building from master.

I would not normally report a bug with such sketchy information but I
thought you should know. If I figure out anything more I will make a proper
bug report.