Subject: bug#75056: 31.0.50; tty-child-frames with server / multiple clients possible hangs

From: Len Trigg <[email-masked]>
Date: Fri, 24 Jan 2025 05:00:33 +1300

On Fri, 24 Jan 2025 at 04:45, Len Trigg <[email-masked]> wrote:

> Fatal error 11: Segmentation fault
> Backtrace:
> emacs(+0x1b1e12)[0x64b571445e12]
> emacs(+0x57927)[0x64b5712eb927]
> emacs(+0x57e6a)[0x64b5712ebe6a]
> emacs(+0x1aff58)[0x64b571443f58]
> emacs(+0x1affdd)[0x64b571443fdd]
> /lib/x86_64-linux-gnu/libc.so.6(+0x45320)[0x726c12045320]
> emacs(+0x699ef)[0x64b5712fd9ef]
> emacs(+0xb192b)[0x64b57134592b]
> emacs(+0xb309d)[0x64b57134709d]
> emacs(+0x1a569e)[0x64b57143969e]
> emacs(+0x286cc6)[0x64b57151acc6]
> emacs(+0x6d004)[0x64b571301004]
> emacs(+0x1a074b)[0x64b57143474b]
> emacs(+0x1a1ab7)[0x64b571435ab7]
> emacs(+0x1a3714)[0x64b571437714]
> emacs(+0x221547)[0x64b5714b5547]
> emacs(+0x18ecde)[0x64b571422cde]
> emacs(+0x221489)[0x64b5714b5489]
> emacs(+0x18ec71)[0x64b571422c71]
> emacs(+0x196ce5)[0x64b57142ace5]
> emacs(+0x197084)[0x64b57142b084]
> emacs(+0x60e3f)[0x64b5712f4e3f]
> /lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca)[0x726c1202a1ca]
> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b)[0x726c1202a28b]
> emacs(+0x613e5)[0x64b5712f53e5]
> Segmentation fault (core dumped)
>

I'm really not familiar with C debugging, but I managed to run my case
under gdb and trigger the crash. "where" shows:

#0  combine_updates_for_frame (f=f@entry=0x555556ca8d58,
inhibit_scrolling=inhibit_scrolling@entry=false) at dispnew.c:3973
#1  0x000055555560592b in redisplay_internal () at xdisp.c:17702
#2  0x000055555560709d in redisplay_preserve_echo_area
(from_where=from_where@entry=8) at xdisp.c:17842
#3  0x00005555556f969e in detect_input_pending_run_timers
(do_display=do_display@entry=true) at keyboard.c:11579
#4  0x00005555557dacc6 in wait_reading_process_output
    (time_limit=time_limit@entry=30, nsecs=nsecs@entry=0,
read_kbd=read_kbd@entry=-1, do_display=do_display@entry=true,
wait_for_cell=wait_for_cell@entry=0x0, wait_proc=wait_proc@entry=0x0,
just_wait_proc=0) at process.c:5862
#5  0x00005555555c1004 in sit_for (timeout=timeout@entry=0x7a,
reading=reading@entry=true, display_option=display_option@entry=1) at
dispnew.c:6894
#6  0x00005555556f474b in read_char
    (commandflag=1, map=map@entry=0x7fffecb615b3, prev_event=0x0,
used_mouse_menu=used_mouse_menu@entry=0x7fffffffc6cb,
end_time=end_time@entry=0x0) at keyboard.c:2925
#7  0x00005555556f5ab7 in read_key_sequence
    (keybuf=keybuf@entry=0x7fffffffc820, prompt=prompt@entry=0x0,
dont_downcase_last=dont_downcase_last@entry=false,
can_return_switch_frame=can_return_switch_frame@entry=true,
fix_current_buffer=fix_current_buffer@entry=true,
prevent_redisplay=prevent_redisplay@entry=false,
disable_text_conversion_p=false) at keyboard.c:10746
#8  0x00005555556f7714 in command_loop_1 () at keyboard.c:1424
#9  0x0000555555775547 in internal_condition_case
    (bfun=bfun@entry=0x5555556f7550 <command_loop_1>,
handlers=handlers@entry=0x90, hfun=hfun@entry=0x5555556eb170 <cmd_error>)
at eval.c:1607
#10 0x00005555556e2cde in command_loop_2 (handlers=handlers@entry=0x90) at
keyboard.c:1163
#11 0x0000555555775489 in internal_catch (tag=tag@entry=0x12360,
func=func@entry=0x5555556e2cb0 <command_loop_2>, arg=arg@entry=0x90) at
eval.c:1286
#12 0x00005555556e2c71 in command_loop () at keyboard.c:1141
#13 0x00005555556eace5 in recursive_edit_1 () at keyboard.c:749
#14 0x00005555556eb084 in Frecursive_edit () at keyboard.c:832
#15 0x00005555555b4e3f in main (argc=3, argv=<optimized out>) at
emacs.c:2628