kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.15k stars 972 forks source link

[wayland] serialize_closure segmentation fault #4156

Closed Safari77 closed 2 years ago

Safari77 commented 2 years ago

Describe the bug glfwSetCursor / serialize_closure segmentation fault happened.

To Reproduce Steps to reproduce the behavior:

  1. No idea

Environment details Only ;6~ is output when I invoke debug_config.

#0  0x000071f1f1d65553 in serialize_closure (buffer_count=<optimized out>, buffer=0x34e1430, closure=0x33208b0) at ../src/connection.c:1150
1150                *p++ = closure->args[i].o ? closure->args[i].o->id : 0;
(gdb) p *closure
$5 = {count = 3, message = 0x71f1f1d6b578 <wl_surface_requests+24>, opcode = 1, sender_id = 3, args = {{i = -822016612, u = 3472950684, f = -822016612, 
      s = 0xd601059ccf01059c <error: Cannot access memory at address 0xd601059ccf01059c>, o = 0xd601059ccf01059c, n = 3472950684, a = 0xd601059ccf01059c, 
      h = -822016612}, {i = 0, u = 0, f = 0, s = 0x0, o = 0x0, n = 0, a = 0x0, h = 0}, {i = 0, u = 0, f = 0, 
      s = 0x71f200000000 "\220\234\005\001\227\234\005\001\236\234\005\001\245\234\005\001\254\234\005\001\263\234\005\001\272\234\005\001\301\234\005\001Ȝ\005\001Ϝ\005\001֜\005\001ݜ\005\001\344\234\005\001\353\234\005\001\362\234\005\001\371\234\005\001", o = 0x71f200000000, n = 0, a = 0x71f200000000, h = 0}, {
      i = -1409219172, u = 2885748124, f = -1409219172, s = 0x71f1ac01059c "", o = 0x71f1ac01059c, n = 2885748124, a = 0x71f1ac01059c, h = -1409219172}, {i = 0, 
      u = 0, f = 0, s = 0x0, o = 0x0, n = 0, a = 0x0, h = 0} <repeats 16 times>}, link = {prev = 0x0, next = 0x0}, proxy = 0x1949c30, extra = 0x3320980}
(gdb) up
#1  wl_closure_send (connection=0x807fa0, closure=0x33208b0) at ../src/connection.c:1218
1218        size = serialize_closure(closure, buffer, buffer_size);
(gdb) p *connection
$12 = {in = {
    data = "H\326\002\000\001\000\000\000\001\000\f\000\\\000\000\000G\000\000\000\000\000\b\000\023\000\000\000\003\000\030\000\277\001\000\000\f\327\002\000\061\000\000\000\001\000\000\000E\000\000\000\000\000\f\000\020\327\002\000\001\000\000\000\001\000\f\000E\000\000\000\\\000\000\000\000\000\f\000\020\327\002\000\001\000\000\000\001\000\f\000\\\000\000\000Y\000\000\000\000\000\b\000E\000\000\000\000\000\f\000!\327\002\000\001\000\000\000\001\000\f\000E\000\000\000\\\000\000\000\000\000\f\000!\327\002\000\001\000\000\000\001\000\f\000\\\000\000\000\023\000\000\000\003\000\030\000\300\001\000\000>\327\002\000\061\000\000\000\000\000\000\000\023\000\000\000\003\000\030\000\301\001\000\000u\327\002\000\024\000\000\000\001\000\000\000"..., head = 40784, tail = 40784}, out = {
    data = "3\000\000\000\001\000\024\000G", '\000' <repeats 11 times>, "\063\000\000\000\002\000\030\000\000\000\000\000\000\000\000\000\377\377\377\177\377\377\377\177\063\000\000\000\006\000\b\000\063\000\000\000\003\000\f\000\\\000\000\000\063\000\000\000\006\000\b\000\063\000\000\000\003\000\f\000E\000\000\000\063\000\000\000\001\000\024\000Y", '\000' <repeats 11 times>, "\063\000\000\000\002\000\030\000\000\000\000\000\000\000\000\000\377\377\377\177\377\377\377\177\063\000\000\000\006\000\b\000\063\000\000\000\003\000\f\000\\\000\000\000\063\000\000\000\006\000\b\000\063\000\000\000\003\000\f\000E\000\000\000\063\000\000\000\001\000\024\000G", '\000' <repeats 11 times>, "\063\000\000\000\002\000\030\000\000\000\000\000\000\000\000\000"..., head = 46876, tail = 46840}, fds_in = {
    data = "\006", '\000' <repeats 4094 times>, head = 4, tail = 4}, fds_out = {
    data = "\r\000\000\000\f\000\000\000\f\000\000\000\017\000\000\000\017\000\000\000\027\000\000\000\027\000\000\000\027\000\000\000\035\000\000\000\035\000\000\000\035", '\000' <repeats 4054 times>, head = 44, tail = 44}, fd = 3, want_flush = 1}
(gdb) bt
#0  0x000071f1f1d65553 in serialize_closure (buffer_count=<optimized out>, buffer=0x34e1430, closure=0x33208b0) at ../src/connection.c:1150
#1  wl_closure_send (connection=0x807fa0, closure=0x33208b0) at ../src/connection.c:1218
#2  wl_proxy_marshal_array_constructor_versioned (proxy=proxy@entry=0x80f0a0, opcode=opcode@entry=1, args=args@entry=0x7ffdfd598ef0, interface=interface@entry=0x0, 
    version=<optimized out>) at ../src/wayland-client.c:757
#3  0x000071f1f1d657fd in wl_proxy_marshal_array_constructor (proxy=proxy@entry=0x80f0a0, opcode=opcode@entry=1, args=args@entry=0x7ffdfd598ef0, 
    interface=interface@entry=0x0) at ../src/wayland-client.c:691
#4  0x000071f1f1d658f2 in wl_proxy_marshal (proxy=proxy@entry=0x80f0a0, opcode=opcode@entry=1) at ../src/wayland-client.c:797
#5  0x000071f1f1dfb6be in wl_surface_attach (y=0, x=0, buffer=0xd601059ccf01059c, wl_surface=0x80f0a0) at /usr/include/wayland-client-protocol.h:3701
#6  setCursorImage (window=window@entry=0xd6ba60, on_theme_change=on_theme_change@entry=false) at glfw/wl_window.c:155
#7  0x000071f1f1dfcd25 in _glfwPlatformSetCursor (window=0xd6ba60, cursor=<optimized out>) at glfw/wl_window.c:1384
#8  0x000071f1f1df2b9f in glfwSetCursor (windowHandle=<optimized out>, cursorHandle=<optimized out>) at glfw/input.c:1003
#9  0x000071f1f2b7794c in set_mouse_cursor (type=<optimized out>) at kitty/glfw.c:476
#10 0x000071f1f2b921a2 in mouse_event (button=button@entry=-1, modifiers=0, action=action@entry=-1) at kitty/mouse.c:752
#11 0x000071f1f2b76d6f in cursor_pos_callback (w=0xd6ba60, x=80, y=1112) at kitty/glfw.c:334
#12 0x000071f1f1df1e5c in _glfwInputCursorPos (window=<optimized out>, xpos=<optimized out>, ypos=<optimized out>) at glfw/input.c:384
#13 0x000071f1f1df85b8 in pointerHandleMotion (data=<optimized out>, pointer=<optimized out>, time=<optimized out>, sx=<optimized out>, sy=<optimized out>)
    at glfw/wl_init.c:185
#14 0x000071f1f2158c04 in ffi_call_unix64 () at ../src/x86/unix64.S:76
#15 0x000071f1f2158107 in ffi_call (cif=cif@entry=0x7ffdfd599300, fn=<optimized out>, rvalue=<optimized out>, rvalue@entry=0x0, avalue=avalue@entry=0x7ffdfd5993d0)
    at ../src/x86/ffi64.c:525
#16 0x000071f1f1d62d10 in wl_closure_invoke (closure=closure@entry=0x3111050, target=<optimized out>, target@entry=0x80efa0, opcode=opcode@entry=2, 
    data=<optimized out>, flags=<optimized out>) at ../src/connection.c:1018
#17 0x000071f1f1d6342b in dispatch_event (display=display@entry=0x7e3440, queue=<optimized out>, queue=<optimized out>) at ../src/wayland-client.c:1452
#18 0x000071f1f1d6361c in dispatch_queue (queue=0x7e3510, display=0x7e3440) at ../src/wayland-client.c:1598
#19 wl_display_dispatch_queue_pending (display=display@entry=0x7e3440, queue=queue@entry=0x7e3510) at ../src/wayland-client.c:1840
#20 0x000071f1f1d63670 in wl_display_dispatch_pending (display=display@entry=0x7e3440) at ../src/wayland-client.c:1903
#21 0x000071f1f1dfa138 in handleEvents (timeout=-1) at glfw/wl_window.c:674
#22 0x000071f1f1dfcac0 in _glfwPlatformWaitEvents () at glfw/wl_window.c:1170
#23 0x000071f1f1df9585 in _glfwPlatformRunMainLoop (tick_callback=0x71f1f2b47430 <process_global_state>, data=0x71f1f31e5180) at glfw/main_loop.h:30
#24 0x000071f1f1df1411 in glfwRunMainLoop (callback=<optimized out>, data=<optimized out>) at glfw/init.c:352
#25 0x000071f1f2b7876c in run_main_loop (cb=cb@entry=0x71f1f2b47430 <process_global_state>, cb_data=cb_data@entry=0x71f1f31e5180) at kitty/glfw.c:1456
#26 0x000071f1f2b442cf in main_loop (self=0x71f1f31e5180, a=<optimized out>) at kitty/child-monitor.c:1097
#27 0x000071f200cf3ff5 in method_vectorcall_NOARGS (func=<method_descriptor at remote 0x71f1f319ac20>, args=0x864c40, nargsf=<optimized out>, kwnames=0x0)
    at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Objects/descrobject.c:434
#28 0x000071f200ce45eb in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x864c40, callable=<method_descriptor at remote 0x71f1f319ac20>, 
    tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:118
#29 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x864c40, callable=<method_descriptor at remote 0x71f1f319ac20>)
    at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:127
#30 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:5075
#31 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:3504
#32 0x000071f200ce300d in _PyEval_EvalFrame (throwflag=0, f=Frame 0x864a70, for file /usr/bin/../lib64/kitty/kitty/main.py, line 424, in _run_app (opts=<Options(color_table=<array.array at remote 0x71f1f1e9cd70>, active_border_color=<Color at remote 0x71f1f1e71900>, active_tab_background=<Color at remote 0x71f1f2085f90>, active_tab_font_style=(True, True), active_tab_foreground=<Color at remote 0x71f1f2093310>, active_tab_title_template=None, adjust_baseline=0, adjust_column_width=0, adjust_line_height=0, allow_hyperlinks=3, allow_remote_control='n', background=<Color at remote 0x71f1f1e71c70>, background_image=None, background_image_layout='tiled', background_image_linear=False, background_opacity=<float at remote 0x71f1f218c910>, background_tint=0, bell_border_color=<Color at remote 0x71f1f1e71a40>, bell_on_tab=True, bell_path=None, bold_font='auto', bold_italic_font='auto', box_drawing_scale=(<float at remote 0x71f1f218c770>, <float at remote 0x71f1f218c910>, <float at remote 0x71f1f218c970>, <float at remote 0x71f1f218ca10>), clear_all_mouse_actions=False, clear_a...(truncated), tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/internal/pycore_ceval.h:40
#33 _PyEval_EvalCode (tstate=<optimized out>, _co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x71f1f1ffeba0, kwcount=0, kwstep=1, defs=0x71f1f327eda8, defcount=1, kwdefs=0x0, closure=0x0, name='_run_app', qualname='_run_app') at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:4327
#34 0x000071f200cf0cee in _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Objects/call.c:396
#35 0x000071f200ce438c in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x71f1f1ffeb88, callable=<function at remote 0x71f1f1f34ca0>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:118
#36 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x71f1f1ffeb88, callable=<function at remote 0x71f1f1f34ca0>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:127
#37 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:5075
#38 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:3518
#39 0x000071f200ce300d in _PyEval_EvalFrame (throwflag=0, f=Frame 0x71f1f1ffe9f0, for file /usr/bin/../lib64/kitty/kitty/main.py, line 185, in __call__ (self=<AppRunner(cached_values_name='main', first_window_callback=<function at remote 0x71f1f1f34d30>, initial_window_size_func=<function at remote 0x71f1f20718b0>) at remote 0x71f1f327edf0>, opts=<Options(color_table=<array.array at remote 0x71f1f1e9cd70>, active_border_color=<Color at remote 0x71f1f1e71900>, active_tab_background=<Color at remote 0x71f1f2085f90>, active_tab_font_style=(True, True), active_tab_foreground=<Color at remote 0x71f1f2093310>, active_tab_title_template=None, adjust_baseline=0, adjust_column_width=0, adjust_line_height=0, allow_hyperlinks=3, allow_remote_control='n', background=<Color at remote 0x71f1f1e71c70>, background_image=None, background_image_layout='tiled', background_image_linear=False, background_opacity=<float at remote 0x71f1f218c910>, background_tint=0, bell_border_color=<Color at remote 0x71f1f1e71a40>, bell_on_tab=True, bell_path=None, bold_font='auto', bold_italic_font='auto...(truncated), tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/internal/pycore_ceval.h:40
#40 _PyEval_EvalCode (tstate=<optimized out>, _co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x7ffdfd599b80, kwcount=0, kwstep=1, defs=0x71f1f327e9b8, defcount=1, kwdefs=0x0, closure=0x0, name='__call__', qualname='AppRunner.__call__') at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:4327
#41 0x000071f200cf0cee in _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Objects/call.c:396
#42 0x000071f200cec1d7 in _PyObject_FastCallDictTstate (tstate=0x6270d0, callable=<function at remote 0x71f1f1f34e50>, args=<optimized out>, nargsf=<optimized out>, kwargs=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Objects/call.c:118
#43 0x000071f200cf807c in _PyObject_Call_Prepend (tstate=0x6270d0, callable=<function at remote 0x71f1f1f34e50>, obj=<unknown at remote 0x7ffdfd599b60>, args=<optimized out>, kwargs=0x0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Objects/call.c:489
#44 0x000071f200d957f2 in slot_tp_call (self=<AppRunner(cached_values_name='main', first_window_callback=<function at remote 0x71f1f1f34d30>, initial_window_size_func=<function at remote 0x71f1f20718b0>) at remote 0x71f1f327edf0>, args=(<Options(color_table=<array.array at remote 0x71f1f1e9cd70>, active_border_color=<Color at remote 0x71f1f1e71900>, active_tab_background=<Color at remote 0x71f1f2085f90>, active_tab_font_style=(True, True), active_tab_foreground=<Color at remote 0x71f1f2093310>, active_tab_title_template=None, adjust_baseline=0, adjust_column_width=0, adjust_line_height=0, allow_hyperlinks=3, allow_remote_control='n', background=<Color at remote 0x71f1f1e71c70>, background_image=None, background_image_layout='tiled', background_image_linear=False, background_opacity=<float at remote 0x71f1f218c910>, background_tint=0, bell_border_color=<Color at remote 0x71f1f1e71a40>, bell_on_tab=True, bell_path=None, bold_font='auto', bold_italic_font='auto', box_drawing_scale=(<float at remote 0x71f1f218c770>, <float at remote 0x71f1f218c910>, <float at remote 0x71f1f218c970>, <float at remote 0x71f1f218ca10>), clear_all_mouse_actions=False, clear_all_shortcuts=False, click_interval=<float at remote 0x71f1f218c710>, clipboard_control=('wr...(truncated), kwds=0x0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Objects/typeobject.c:6718
#45 0x000071f200cec677 in _PyObject_MakeTpCall (tstate=0x6270d0, callable=<AppRunner(cached_values_name='main', first_window_callback=<function at remote 0x71f1f1f34d30>, initial_window_size_func=<function at remote 0x71f1f20718b0>) at remote 0x71f1f327edf0>, args=<optimized out>, nargs=3, keywords=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Objects/call.c:191
#46 0x000071f200ce914e in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7cf4b0, callable=<optimized out>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:116
#47 _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7cf4b0, callable=<optimized out>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:103
#48 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7cf4b0, callable=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:127
#49 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:5075
#50 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:3518
#51 0x000071f200cf0fe3 in _PyEval_EvalFrame (throwflag=0, f=Frame 0x7cf2c0, for file /usr/bin/../lib64/kitty/kitty/main.py, line 352, in _main (rpath='/usr/bin', modify_path=False, existing='/usr/bin/kitty', args=[], cwd_ok=True, cli_opts=<CLIOptions(cls='kitty', name=None, title=None, config=[], override=[], directory='.', detach=False, session=None, hold=False, single_instance=False, instance_group=None, wait_for_single_instance_window_close=False, listen_on=None, start_as='normal', version=False, dump_commands=False, replay_commands=None, dump_bytes=None, debug_rendering=False, debug_keyboard=False, debug_font_fallback=False, watcher=None, execute=False, args=[]) at remote 0x71f1f327e310>, rest=[...], bad_lines=[], opts=<Options(color_table=<array.array at remote 0x71f1f1e9cd70>, active_border_color=<Color at remote 0x71f1f1e71900>, active_tab_background=<Color at remote 0x71f1f2085f90>, active_tab_font_style=(True, True), active_tab_foreground=<Color at remote 0x71f1f2093310>, active_tab_title_template=None, adjust_baseline=0, adjust_column_width=0, adjust_line_he...(truncated), tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/internal/pycore_ceval.h:40
#52 function_code_fastcall (tstate=0x6270d0, co=<optimized out>, args=<optimized out>, nargs=0, globals=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Objects/call.c:330
#53 0x000071f200ce438c in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x71f1f3319940, callable=<function at remote 0x71f1f1f38310>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:118
#54 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x71f1f3319940, callable=<function at remote 0x71f1f1f38310>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:127
#55 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:5075
#56 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:3518
#57 0x000071f200cf0fe3 in _PyEval_EvalFrame (throwflag=0, f=Frame 0x71f1f33197c0, for file /usr/bin/../lib64/kitty/kitty/main.py, line 359, in main (), tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/internal/pycore_ceval.h:40
#58 function_code_fastcall (tstate=0x6270d0, co=<optimized out>, args=<optimized out>, nargs=0, globals=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Objects/call.c:330
#59 0x000071f200ce438c in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x71f1f3449548, callable=<function at remote 0x71f1f1f383a0>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:118
#60 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x71f1f3449548, callable=<function at remote 0x71f1f1f383a0>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:127
#61 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:5075
#62 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:3518
#63 0x000071f200cf0fe3 in _PyEval_EvalFrame (throwflag=0, f=Frame 0x71f1f34493c0, for file /usr/bin/../lib64/kitty/__main__.py, line 147, in main (first_arg='', func=None, kitty_main=<function at remote 0x71f1f1f383a0>), tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/internal/pycore_ceval.h:40
#64 function_code_fastcall (tstate=0x6270d0, co=<optimized out>, args=<optimized out>, nargs=0, globals=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Objects/call.c:330
#65 0x000071f200ce438c in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x71f1f32a0c90, callable=<function at remote 0x71f1f3281ee0>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:118
#66 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x71f1f32a0c90, callable=<function at remote 0x71f1f3281ee0>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:127
#67 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:5075
#68 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:3518
#69 0x000071f200ce300d in _PyEval_EvalFrame (throwflag=0, f=Frame 0x71f1f32a0b20, for file /usr/bin/../lib64/kitty/__main__.py, line 409, in <module> (), tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/internal/pycore_ceval.h:40
#70 _PyEval_EvalCode (tstate=<optimized out>, _co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:4327
#71 0x000071f200d5f635 in _PyEval_EvalCodeWithName (_co=<optimized out>, globals=<optimized out>, locals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': <SourceFileLoader(name='__main__', path='/usr/bin/../lib64/kitty/__main__.py') at remote 0x71f1f33abd90>, '__spec__': <ModuleSpec(name='__main__', loader=<...>, origin='/usr/bin/../lib64/kitty/__main__.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/usr/bin/../lib64/kitty/__pycache__/__main__.cpython-39.pyc') at remote 0x71f1f33ab040>, '__annotations__': {}, '__builtins__': <module at remote 0x71f1f34a6860>, '__file__': '/usr/bin/../lib64/kitty/__main__.py', '__cached__': '/usr/bin/../lib64/kitty/__pycache__/__main__.cpython-39.pyc', 'os': <module at remote 0x71f1f33d94a0>, 'sys': <module at remote 0x71f1f349d7c0>, 'List': <_SpecialGenericAlias(_inst=False, _name='List', __origin__=<type at remote 0x71f200f08380>, __slots__=None, _nparams=1, __doc__='A generic version of list.') at remote 0x71f1f329d730>, 'icat': <function at remote 0x71f1f32818b0>, 'list_fonts': <function at remote 0x71f1f3281940...(truncated), args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:4359
#72 0x000071f200d5f5cd in PyEval_EvalCodeEx (_co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kws=<optimized out>, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:4375
#73 0x000071f200d5f57f in PyEval_EvalCode (co=<optimized out>, globals=<optimized out>, locals=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:826
#74 0x000071f200d650f3 in builtin_exec_impl (module=<optimized out>, locals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': <SourceFileLoader(name='__main__', path='/usr/bin/../lib64/kitty/__main__.py') at remote 0x71f1f33abd90>, '__spec__': <ModuleSpec(name='__main__', loader=<...>, origin='/usr/bin/../lib64/kitty/__main__.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/usr/bin/../lib64/kitty/__pycache__/__main__.cpython-39.pyc') at remote 0x71f1f33ab040>, '__annotations__': {}, '__builtins__': <module at remote 0x71f1f34a6860>, '__file__': '/usr/bin/../lib64/kitty/__main__.py', '__cached__': '/usr/bin/../lib64/kitty/__pycache__/__main__.cpython-39.pyc', 'os': <module at remote 0x71f1f33d94a0>, 'sys': <module at remote 0x71f1f349d7c0>, 'List': <_SpecialGenericAlias(_inst=False, _name='List', __origin__=<type at remote 0x71f200f08380>, __slots__=None, _nparams=1, __doc__='A generic version of list.') at remote 0x71f1f329d730>, 'icat': <function at remote 0x71f1f32818b0>, 'list_fonts': <function at remote 0x71f1f3281940...(truncated), globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': <SourceFileLoader(name='__main__', path='/usr/bin/../lib64/kitty/__main__.py') at remote 0x71f1f33abd90>, '__spec__': <ModuleSpec(name='__main__', loader=<...>, origin='/usr/bin/../lib64/kitty/__main__.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/usr/bin/../lib64/kitty/__pycache__/__main__.cpython-39.pyc') at remote 0x71f1f33ab040>, '__annotations__': {}, '__builtins__': <module at remote 0x71f1f34a6860>, '__file__': '/usr/bin/../lib64/kitty/__main__.py', '__cached__': '/usr/bin/../lib64/kitty/__pycache__/__main__.cpython-39.pyc', 'os': <module at remote 0x71f1f33d94a0>, 'sys': <module at remote 0x71f1f349d7c0>, 'List': <_SpecialGenericAlias(_inst=False, _name='List', __origin__=<type at remote 0x71f200f08380>, __slots__=None, _nparams=1, __doc__='A generic version of list.') at remote 0x71f1f329d730>, 'icat': <function at remote 0x71f1f32818b0>, 'list_fonts': <function at remote 0x71f1f3281940...(truncated), source=<code at remote 0x71f1f3289500>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/bltinmodule.c:1026
#75 builtin_exec (module=<optimized out>, args=args@entry=0x65fbc0, nargs=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/clinic/bltinmodule.c.h:396
#76 0x000071f200cf12cc in cfunction_vectorcall_FASTCALL (func=<built-in method exec of module object at remote 0x71f1f34a6860>, args=0x65fbc0, nargsf=<optimized out>, kwnames=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Objects/methodobject.c:430
#77 0x000071f200ce438c in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x65fbc0, callable=<built-in method exec of module object at remote 0x71f1f34a6860>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:118
#78 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x65fbc0, callable=<built-in method exec of module object at remote 0x71f1f34a6860>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:127
#79 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:5075
#80 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:3518
#81 0x000071f200ce300d in _PyEval_EvalFrame (throwflag=0, f=Frame 0x65fa00, for file /usr/lib64/python3.9/runpy.py, line 343, in _run_code (code=<code at remote 0x71f1f3289500>, run_globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': <SourceFileLoader(name='__main__', path='/usr/bin/../lib64/kitty/__main__.py') at remote 0x71f1f33abd90>, '__spec__': <ModuleSpec(name='__main__', loader=<...>, origin='/usr/bin/../lib64/kitty/__main__.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/usr/bin/../lib64/kitty/__pycache__/__main__.cpython-39.pyc') at remote 0x71f1f33ab040>, '__annotations__': {}, '__builtins__': <module at remote 0x71f1f34a6860>, '__file__': '/usr/bin/../lib64/kitty/__main__.py', '__cached__': '/usr/bin/../lib64/kitty/__pycache__/__main__.cpython-39.pyc', 'os': <module at remote 0x71f1f33d94a0>, 'sys': <module at remote 0x71f1f349d7c0>, 'List': <_SpecialGenericAlias(_inst=False, _name='List', __origin__=<type at remote 0x71f200f08380>, __slots__=None, _nparams=1, __doc__='A generic version o...(truncated), tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/internal/pycore_ceval.h:40
#82 _PyEval_EvalCode (tstate=<optimized out>, _co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x683800, kwcount=0, kwstep=1, defs=0x71f1f335baa8, defcount=5, kwdefs=0x0, closure=0x0, name='_run_code', qualname='_run_code') at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:4327
#83 0x000071f200cf0cee in _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Objects/call.c:396
#84 0x000071f200ce438c in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x6837d8, callable=<function at remote 0x71f1f3266040>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:118
#85 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x6837d8, callable=<function at remote 0x71f1f3266040>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/cpython/abstract.h:127
#86 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:5075
#87 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:3518
#88 0x000071f200ce300d in _PyEval_EvalFrame (throwflag=0, f=Frame 0x683630, for file /usr/lib64/python3.9/runpy.py, line 453, in _run_module_as_main (mod_name='__main__', alter_argv=False, mod_spec=<ModuleSpec(name='__main__', loader=<SourceFileLoader(name='__main__', path='/usr/bin/../lib64/kitty/__main__.py') at remote 0x71f1f33abd90>, origin='/usr/bin/../lib64/kitty/__main__.py', loader_state=None, submodule_search_locations=None, _set_fileattr=True, _cached='/usr/bin/../lib64/kitty/__pycache__/__main__.cpython-39.pyc') at remote 0x71f1f33ab040>, code=<code at remote 0x71f1f3289500>, main_globals={'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': <...>, '__spec__': <...>, '__annotations__': {}, '__builtins__': <module at remote 0x71f1f34a6860>, '__file__': '/usr/bin/../lib64/kitty/__main__.py', '__cached__': '/usr/bin/../lib64/kitty/__pycache__/__main__.cpython-39.pyc', 'os': <module at remote 0x71f1f33d94a0>, 'sys': <module at remote 0x71f1f349d7c0>, 'List': <_SpecialGenericAlias(_inst=False, _name='List', __origin__=<type at remote 0x71f20...(truncated), tstate=0x6270d0) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Include/internal/pycore_ceval.h:40
#89 _PyEval_EvalCode (tstate=<optimized out>, _co=<optimized out>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0, kwargs=0x71f1f3264768, kwcount=0, kwstep=1, defs=0x71f1f33aac88, defcount=1, kwdefs=0x0, closure=0x0, name='_run_module_as_main', qualname='_run_module_as_main') at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Python/ceval.c:4327
#90 0x000071f200cf0cee in _PyFunction_Vectorcall (func=<optimized out>, stack=<optimized out>, nargsf=<optimized out>, kwnames=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Objects/call.c:396
#91 0x000071f200d7fac9 in pymain_run_module (modname=<optimized out>, set_argv0=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Modules/main.c:291
#92 0x000071f200c5c91c in pymain_run_python (exitcode=0x7ffdfd59a940) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Modules/main.c:595
#93 Py_RunMain () at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Modules/main.c:677
#94 0x000071f200cd1e91 in Py_Main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/python3.9-3.9.7-1.fc34.x86_64/Modules/main.c:719
#95 0x0000000000401386 in main ()
(gdb)
Safari77 commented 2 years ago

Fedora 34 gnome-shell 40.5-1 xorg-x11-server-Xwayland-21.1.2.901-1.fc34 wayland 1.19.0 mesa-21.2.4

kovidgoyal commented 2 years ago

that's a segfault in a wayland client library not kitty code. The last call in kitty code is to wl_surface_attach() which is fine. if you can figure out a way to reproduce update this and I will debug. As it stands that trace isnt showing a bug in kitty code. Or alternatively run kitty from source with make asan that should help track down the underlying cause if it happens again. https://sw.kovidgoyal.net/kitty/build/

Closing until more information is availabe.