Subject: bug#57364: 28.1.91; asynchronous X server error when creating a second frame on alternate DISPLAY

From: andrés ramírez <[email-masked]>
Date: Thu, 25 Aug 2022 15:13:14 +0000

Hi. Po.

After sending previous email. I though a little bit about the
libX11.so.6. So I decided compiling libx11 with debug symbols. Let me
know if this backtraces give us more light for tracking the offending
line. As I am inspecting it by myself the offending line could be
unblock_input within x_delete_terminal.

Best Regards
* new backtrace on x_error_handler
Thread 1 "emacs" hit Breakpoint 4, x_error_handler (display=0x5555560e8370, event=0x7fffffffb520) at ../../src/xterm.c:10270
10270	  if (x_error_message)
(gdb) bt
#0  x_error_handler (display=0x5555560e8370, event=0x7fffffffb520) at ../../src/xterm.c:10270
#1  0x00007ffff7bf433c in _XError (dpy=dpy@entry=0x5555560e8370, rep=rep@entry=0x5555567ba850) at XlibInt.c:1503
#2  0x00007ffff7bf0e58 in handle_error (dpy=0x5555560e8370, err=0x5555567ba850, in_XReply=<optimized out>) at xcb_io.c:211
#3  0x00007ffff7bf0ef5 in handle_response (dpy=dpy@entry=0x5555560e8370, response=0x5555567ba850, in_XReply=in_XReply@entry=1) at xcb_io.c:403
#4  0x00007ffff7bf20bd in _XReply (dpy=dpy@entry=0x5555560e8370, rep=rep@entry=0x7fffffffb6e0, extra=extra@entry=0, discard=discard@entry=1) at xcb_io.c:722
#5  0x00007ffff7bed5f1 in XSync (dpy=0x5555560e8370, discard=0) at Sync.c:44
#6  0x00005555557059c1 in x_catch_errors_with_handler (dpy=0x5555560e8370, handler=0x0, handler_data=0x0) at ../../src/xterm.c:10015
#7  0x0000555555705a37 in x_catch_errors (dpy=0x5555560e8370) at ../../src/xterm.c:10028
#8  0x00005555556f8b6d in x_frame_highlight (f=0x5555562a1740) at ../../src/xterm.c:4491
#9  0x00005555556f9a51 in x_frame_rehighlight (dpyinfo=0x555556108ed0) at ../../src/xterm.c:4878
#10 0x00005555556f8d35 in x_new_focus_frame (dpyinfo=0x555556108ed0, frame=0x5555562a1740) at ../../src/xterm.c:4544
#11 0x00005555556f8d85 in x_focus_changed (type=9, state=2, dpyinfo=0x555556108ed0, frame=0x5555562a1740, bufp=0x7fffffffb990) at ../../src/xterm.c:4558
#12 0x00005555556f9863 in x_detect_focus_change (dpyinfo=0x555556108ed0, frame=0x5555562a1740, event=0x7fffffffc090, bufp=0x7fffffffb990) at ../../src/xterm.c:4811
#13 0x0000555555702826 in handle_one_xevent (dpyinfo=0x555556108ed0, event=0x7fffffffc090, finish=0x7fffffffc080, hold_quit=0x7fffffffc1b0) at ../../src/xterm.c:8881
#14 0x00005555557042ab in XTread_socket (terminal=0x555555f352a0, hold_quit=0x7fffffffc1b0) at ../../src/xterm.c:9506
#15 0x0000555555755cec in gobble_input () at ../../src/keyboard.c:6980
#16 0x00005555557562e8 in handle_async_input () at ../../src/keyboard.c:7211
#17 0x0000555555756307 in process_pending_signals () at ../../src/keyboard.c:7225
#18 0x0000555555756347 in unblock_input_to (level=0) at ../../src/keyboard.c:7240
#19 0x000055555575636b in unblock_input () at ../../src/keyboard.c:7259
#20 0x000055555570d1f3 in x_delete_terminal (terminal=0x55555679fea0) at ../../src/xterm.c:13524
#21 0x000055555571d53c in Fx_close_connection (terminal=XIL(0x5555567a0c14)) at ../../src/xfns.c:5785
#22 0x0000555555830de7 in funcall_subr (subr=0x555555e24380 <Sx_close_connection>, numargs=1, args=0x7fffffffc3f0) at ../../src/eval.c:3098
#23 0x0000555555830826 in Ffuncall (nargs=2, args=0x7fffffffc3e8) at ../../src/eval.c:3023
#24 0x0000555555890e41 in exec_byte_code (bytestr=XIL(0x7ffff2d214f4), vector=XIL(0x7ffff2d21355), maxdepth=make_fixnum(7), args_template=make_fixnum(257), nargs=1, args=0x7fffffffcc18) at ../../src/bytecode.c:632
#25 0x00005555558310bd in fetch_and_exec_byte_code (fun=XIL(0x7ffff2d211fd), syms_left=make_fixnum(257), nargs=1, args=0x7fffffffcc10) at ../../src/eval.c:3147
#26 0x0000555555831584 in funcall_lambda (fun=XIL(0x7ffff2d211fd), nargs=1, arg_vector=0x7fffffffcc10) at ../../src/eval.c:3228
#27 0x000055555583087a in Ffuncall (nargs=2, args=0x7fffffffcc08) at ../../src/eval.c:3027
#28 0x00005555558239a3 in Ffuncall_interactively (nargs=2, args=0x7fffffffcc08) at ../../src/callint.c:260
#29 0x0000555555830cb4 in funcall_subr (subr=0x555555e2c340 <Sfuncall_interactively>, numargs=2, args=0x7fffffffcc08) at ../../src/eval.c:3078
#30 0x0000555555830826 in Ffuncall (nargs=3, args=0x7fffffffcc00) at ../../src/eval.c:3023
#31 0x000055555582f4bf in Fapply (nargs=3, args=0x7fffffffcc00) at ../../src/eval.c:2610
#32 0x0000555555823e46 in Fcall_interactively (function=XIL(0x2aaa9ce6cfe8), record_flag=XIL(0xc6c0), keys=XIL(0x55555932632d)) at ../../src/callint.c:353
#33 0x0000555555830e47 in funcall_subr (subr=0x555555e2c380 <Scall_interactively>, numargs=3, args=0x7fffffffcdb0) at ../../src/eval.c:3103
#34 0x0000555555830826 in Ffuncall (nargs=4, args=0x7fffffffcda8) at ../../src/eval.c:3023
#35 0x0000555555890e41 in exec_byte_code (bytestr=XIL(0x7ffff28b4b4c), vector=XIL(0x7ffff28b47b5), maxdepth=make_fixnum(13), args_template=make_fixnum(1025), nargs=2, args=0x7fffffffd340) at ../../src/bytecode.c:632
#36 0x00005555558310bd in fetch_and_exec_byte_code (fun=XIL(0x7ffff28b4785), syms_left=make_fixnum(1025), nargs=2, args=0x7fffffffd330) at ../../src/eval.c:3147
#37 0x0000555555831584 in funcall_lambda (fun=XIL(0x7ffff28b4785), nargs=2, arg_vector=0x7fffffffd330) at ../../src/eval.c:3228
#38 0x000055555583087a in Ffuncall (nargs=3, args=0x7fffffffd328) at ../../src/eval.c:3027
#39 0x0000555555890e41 in exec_byte_code (bytestr=XIL(0x7ffff2ac40a4), vector=XIL(0x7ffff2ac3815), maxdepth=make_fixnum(17), args_template=make_fixnum(769), nargs=3, args=0x7fffffffda08) at ../../src/bytecode.c:632
#40 0x00005555558310bd in fetch_and_exec_byte_code (fun=XIL(0x7ffff2ac2d8d), syms_left=make_fixnum(769), nargs=3, args=0x7fffffffd9f0) at ../../src/eval.c:3147
#41 0x0000555555831584 in funcall_lambda (fun=XIL(0x7ffff2ac2d8d), nargs=3, arg_vector=0x7fffffffd9f0) at ../../src/eval.c:3228
#42 0x000055555583087a in Ffuncall (nargs=4, args=0x7fffffffd9e8) at ../../src/eval.c:3027
#43 0x00005555558239a3 in Ffuncall_interactively (nargs=4, args=0x7fffffffd9e8) at ../../src/callint.c:260
#44 0x0000555555830cb4 in funcall_subr (subr=0x555555e2c340 <Sfuncall_interactively>, numargs=4, args=0x7fffffffd9e8) at ../../src/eval.c:3078
#45 0x0000555555830826 in Ffuncall (nargs=5, args=0x7fffffffd9e0) at ../../src/eval.c:3023
#46 0x000055555582f895 in Fapply (nargs=3, args=0x7fffffffdc20) at ../../src/eval.c:2653
#47 0x0000555555823e46 in Fcall_interactively (function=XIL(0x2aaa9cc0eb58), record_flag=XIL(0), keys=XIL(0x5555592936c5)) at ../../src/callint.c:353
#48 0x0000555555830e47 in funcall_subr (subr=0x555555e2c380 <Scall_interactively>, numargs=3, args=0x7fffffffddd0) at ../../src/eval.c:3103
#49 0x0000555555830826 in Ffuncall (nargs=4, args=0x7fffffffddc8) at ../../src/eval.c:3023
#50 0x0000555555890e41 in exec_byte_code (bytestr=XIL(0x7ffff28b4b4c), vector=XIL(0x7ffff28b47b5), maxdepth=make_fixnum(13), args_template=make_fixnum(1025), nargs=1, args=0x7fffffffe320) at ../../src/bytecode.c:632
#51 0x00005555558310bd in fetch_and_exec_byte_code (fun=XIL(0x7ffff28b4785), syms_left=make_fixnum(1025), nargs=1, args=0x7fffffffe318) at ../../src/eval.c:3147
#52 0x0000555555831584 in funcall_lambda (fun=XIL(0x7ffff28b4785), nargs=1, arg_vector=0x7fffffffe318) at ../../src/eval.c:3228
#53 0x000055555583087a in Ffuncall (nargs=2, args=0x7fffffffe310) at ../../src/eval.c:3027
#54 0x0000555555830019 in call1 (fn=XIL(0x4590), arg1=XIL(0x2aaa9cc0eb58)) at ../../src/eval.c:2883
#55 0x0000555555745a6c in command_loop_1 () at ../../src/keyboard.c:1505
#56 0x000055555582be77 in internal_condition_case (bfun=0x5555557451a3 <command_loop_1>, handlers=XIL(0x90), hfun=0x555555744586 <cmd_error>) at ../../src/eval.c:1450
#57 0x0000555555744d5c in command_loop_2 (handlers=XIL(0x90)) at ../../src/keyboard.c:1133
#58 0x000055555582b006 in internal_catch (tag=XIL(0xe850), func=0x555555744d32 <command_loop_2>, arg=XIL(0x90)) at ../../src/eval.c:1181
#59 0x0000555555744cfe in command_loop () at ../../src/keyboard.c:1111
#60 0x0000555555744032 in recursive_edit_1 () at ../../src/keyboard.c:720
#61 0x0000555555744254 in Frecursive_edit () at ../../src/keyboard.c:803
#62 0x000055555573fd00 in main (argc=5, argv=0x7fffffffe828) at ../../src/emacs.c:2358

Lisp Backtrace:
"x-close-connection" (0xffffc3f0)
"close-display-connection" (0xffffcc10)
"funcall-interactively" (0xffffcc08)
"call-interactively" (0xffffcdb0)
"command-execute" (0xffffd330)
"execute-extended-command" (0xffffd9f0)
"funcall-interactively" (0xffffd9e8)
"call-interactively" (0xffffddd0)
"command-execute" (0xffffe318)
(gdb)