kovidgoyal / kitty

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

AMD GPU, monitor reconnect, core dumped #7325

Closed llj098 closed 6 months ago

llj098 commented 6 months ago

Describe the bug Crash, core dump

To Reproduce

hard to reproduce, the monitor reconnect, then kitty crashed. Occured randomly.

Screenshots If applicable, add screenshots to help explain your problem.

Environment details

kitty 0.33.0 created by Kovid Goyal
Linux lj-82y8 6.8.2-zen2-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 28 Mar 2024 17:06:20 +0000 x86_64
EndeavourOS Linux 6.8.2-zen2-1-zen (/dev/tty)

DISTRIB_ID="EndeavourOS"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="EndeavourOS Linux"
DISTRIB_CODENAME="rolling"
Running under: Wayland
Frozen: False
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /usr/bin/zsh
Loaded config files:
  /home/lj/.config/kitty/kitty.conf
Loaded config overrides:
  allow_remote_control yes
  enabled_layouts tall

Config options different from defaults:
allow_remote_control    yes
copy_on_select          clipboard
cursor_text_color       None
enabled_layouts         ['tall']
font_family             PragmataPro
font_size               12.0
Colors:
    active_tab_background   #f8f8f2   
    active_tab_foreground   #282a36   
    background              #282a36   
    color0                  #21222c   
    color1                  #ff5555   
    color10                 #69ff94   
    color11                 #ffffa5   
    color12                 #d6acff   
    color13                 #ff92df   
    color14                 #a4ffff   
    color2                  #50fa7b   
    color3                  #f1fa8c   
    color4                  #bd93f9   
    color5                  #ff79c6   
    color6                  #8be9fd   
    color7                  #f8f8f2   
    color8                  #6272a4   
    color9                  #ff6e6e   
    cursor                  #f8f8f2   
    foreground              #f8f8f2   
    inactive_tab_background #6272a4   
    inactive_tab_foreground #282a36   
    mark1_background        #ff5555   
    mark1_foreground        #282a36   
    selection_background    #44475a   
    selection_foreground    #ffffff   
    url_color               #8be9fd   

Important environment variables seen by the kitty process:
    PATH                                /opt/google-cloud-cli/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
    LANG                                en_US.UTF-8
    EDITOR                              vim
    SHELL                               /usr/bin/zsh
    DISPLAY                             :1
    WAYLAND_DISPLAY                     wayland-0
    USER                                lj
    LC_ADDRESS                          zh_CN.UTF-8
    LC_IDENTIFICATION                   zh_CN.UTF-8
    LC_MEASUREMENT                      zh_CN.UTF-8
    LC_MONETARY                         zh_CN.UTF-8
    LC_NAME                             zh_CN.UTF-8
    LC_NUMERIC                          zh_CN.UTF-8
    LC_PAPER                            zh_CN.UTF-8
    LC_TELEPHONE                        zh_CN.UTF-8
    LC_TIME                             zh_CN.UTF-8
    XDG_CONFIG_DIRS                     /home/lj/.config/kdedefaults:/etc/xdg
    XDG_CONFIG_HOME                     /home/lj/.config/
    XDG_CURRENT_DESKTOP                 KDE
    XDG_DATA_DIRS                       /home/lj/.local/share/:/usr/local/share/:/usr/share/
    XDG_MENU_PREFIX                     plasma-
    XDG_RUNTIME_DIR                     /run/user/1000
    XDG_SEAT                            seat0
    XDG_SEAT_PATH                       /org/freedesktop/DisplayManager/Seat0
    XDG_SESSION_CLASS                   user
    XDG_SESSION_DESKTOP                 KDE
    XDG_SESSION_ID                      2
    XDG_SESSION_PATH                    /org/freedesktop/DisplayManager/Session1
    XDG_SESSION_TYPE                    wayland
    XDG_VTNR                            1

Additional context

the core dump info:

           PID: 592684 (kitty)
           UID: 1000 (lj)
           GID: 1000 (lj)
        Signal: 6 (ABRT)
     Timestamp: Tue 2024-04-09 11:12:12 CST (19min ago)
  Command Line: /usr/bin/kitty -o allow_remote_control=yes -o enabled_layouts=tall --session /home/lj/kitty.session
    Executable: /usr/bin/kitty
 Control Group: /user.slice/user-1000.slice/user@1000.service/app.slice/app-kitty-3202175cdb9a47968e2657eb4a70dbb2.scope
          Unit: user@1000.service
     User Unit: app-kitty-3202175cdb9a47968e2657eb4a70dbb2.scope
         Slice: user-1000.slice
     Owner UID: 1000 (lj)
       Boot ID: 152a4a767b5a436fbbd4ad212c03bea1
    Machine ID: 5c1a17e6ed2749d0b6b7192250f77f0a
      Hostname: lj-82y8
       Storage: /var/lib/systemd/coredump/core.kitty.1000.152a4a767b5a436fbbd4ad212c03bea1.592684.1712632332000000.zst (present)
  Size on Disk: 6.4M
       Message: Process 592684 (kitty) of user 1000 dumped core.

                Stack trace of thread 592686:
                #0  0x000075d03e0ab32c n/a (libc.so.6 + 0x8d32c)
                #1  0x000075d03e05a6c8 raise (libc.so.6 + 0x3c6c8)
                #2  0x000075d03e0424b8 abort (libc.so.6 + 0x244b8)
                #3  0x000075d039648397 n/a (radeonsi_dri.so + 0x848397)
                #4  0x000075d03964e2b4 n/a (radeonsi_dri.so + 0x84e2b4)
                #5  0x000075d038e864ad n/a (radeonsi_dri.so + 0x864ad)
                #6  0x000075d038e9e39c n/a (radeonsi_dri.so + 0x9e39c)
                #7  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #8  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592684:
                #0  0x000075d03e12488d syscall (libc.so.6 + 0x10688d)
                #1  0x000075d038e850fe n/a (radeonsi_dri.so + 0x850fe)
                #2  0x000075d039638031 n/a (radeonsi_dri.so + 0x838031)
                #3  0x000075d03939692f n/a (radeonsi_dri.so + 0x59692f)
                #4  0x000075d038f1e18f n/a (radeonsi_dri.so + 0x11e18f)
                #5  0x000075d038e3c9a4 n/a (radeonsi_dri.so + 0x3c9a4)
                #6  0x000075d03b849c28 n/a (libEGL_mesa.so.0 + 0x27c28)
                #7  0x000075d03b83a988 n/a (libEGL_mesa.so.0 + 0x18988)
                #8  0x000075d03b83206d n/a (libEGL_mesa.so.0 + 0x1006d)
                #9  0x000075d03c003611 glfwSwapBuffers (glfw-wayland.so + 0xf611)
                #10 0x000075d03d01b8a4 n/a (fast_data_types.so + 0x1b8a4)
                #11 0x000075d03c005a7b glfwRunMainLoop (glfw-wayland.so + 0x11a7b)
                #12 0x000075d03d01416c n/a (fast_data_types.so + 0x1416c)
                #13 0x000075d03e38dd7e n/a (libpython3.11.so.1.0 + 0x18dd7e)
                #14 0x000075d03e374237 PyObject_Vectorcall (libpython3.11.so.1.0 + 0x174237)
                #15 0x000075d03e3665d3 _PyEval_EvalFrameDefault (libpython3.11.so.1.0 + 0x1665d3)
                #16 0x000075d03e38d9b0 _PyFunction_Vectorcall (libpython3.11.so.1.0 + 0x18d9b0)
                #17 0x000075d03e35fdf7 _PyObject_FastCallDictTstate (libpython3.11.so.1.0 + 0x15fdf7)
                #18 0x000075d03e395bdd _PyObject_Call_Prepend (libpython3.11.so.1.0 + 0x195bdd)
                #19 0x000075d03e45a952 n/a (libpython3.11.so.1.0 + 0x25a952)
                #20 0x000075d03e35b0dc _PyObject_MakeTpCall (libpython3.11.so.1.0 + 0x15b0dc)
                #21 0x000075d03e3665d3 _PyEval_EvalFrameDefault (libpython3.11.so.1.0 + 0x1665d3)
                #22 0x000075d03e41fae4 n/a (libpython3.11.so.1.0 + 0x21fae4)
                #23 0x000075d03e41f4cc PyEval_EvalCode (libpython3.11.so.1.0 + 0x21f4cc)
                #24 0x000075d03e4358b2 n/a (libpython3.11.so.1.0 + 0x2358b2)
                #25 0x000075d03e37512a n/a (libpython3.11.so.1.0 + 0x17512a)
                #26 0x000075d03e374237 PyObject_Vectorcall (libpython3.11.so.1.0 + 0x174237)
                #27 0x000075d03e3665d3 _PyEval_EvalFrameDefault (libpython3.11.so.1.0 + 0x1665d3)
                #28 0x000075d03e38d9b0 _PyFunction_Vectorcall (libpython3.11.so.1.0 + 0x18d9b0)
                #29 0x000075d03e448557 n/a (libpython3.11.so.1.0 + 0x248557)
                #30 0x000075d03e2af707 n/a (libpython3.11.so.1.0 + 0xaf707)
                #31 0x000060f3c0ae160a main (kitty + 0x260a)
                #32 0x000075d03e043cd0 n/a (libc.so.6 + 0x25cd0)
                #33 0x000075d03e043d8a __libc_start_main (libc.so.6 + 0x25d8a)
                #34 0x000060f3c0ae1715 _start (kitty + 0x2715)

                Stack trace of thread 592688:
                #0  0x000075d03e0a5ebe n/a (libc.so.6 + 0x87ebe)
                #1  0x000075d03e0a8750 pthread_cond_wait (libc.so.6 + 0x8a750)
                #2  0x000075d038e863ec n/a (radeonsi_dri.so + 0x863ec)
                #3  0x000075d038e9e39c n/a (radeonsi_dri.so + 0x9e39c)
                #4  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #5  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592692:
                #0  0x000075d03e0a5ebe n/a (libc.so.6 + 0x87ebe)
                #1  0x000075d03e0a8750 pthread_cond_wait (libc.so.6 + 0x8a750)
                #2  0x000075d038e863ec n/a (radeonsi_dri.so + 0x863ec)
                #3  0x000075d038e9e39c n/a (radeonsi_dri.so + 0x9e39c)
                #4  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #5  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592691:
                #0  0x000075d03e0a5ebe n/a (libc.so.6 + 0x87ebe)
                #1  0x000075d03e0a8750 pthread_cond_wait (libc.so.6 + 0x8a750)
                #2  0x000075d038e863ec n/a (radeonsi_dri.so + 0x863ec)
                #3  0x000075d038e9e39c n/a (radeonsi_dri.so + 0x9e39c)
                #4  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #5  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592696:
                #0  0x000075d03e0a5ebe n/a (libc.so.6 + 0x87ebe)
                #1  0x000075d03e0a8750 pthread_cond_wait (libc.so.6 + 0x8a750)
                #2  0x000075d038e863ec n/a (radeonsi_dri.so + 0x863ec)
                #3  0x000075d038e9e39c n/a (radeonsi_dri.so + 0x9e39c)
                #4  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #5  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592698:
                #0  0x000075d03e0a5ebe n/a (libc.so.6 + 0x87ebe)
                #1  0x000075d03e0a8750 pthread_cond_wait (libc.so.6 + 0x8a750)
                #2  0x000075d038e863ec n/a (radeonsi_dri.so + 0x863ec)
                #3  0x000075d038e9e39c n/a (radeonsi_dri.so + 0x9e39c)
                #4  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #5  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592694:
                #0  0x000075d03e0a5ebe n/a (libc.so.6 + 0x87ebe)
                #1  0x000075d03e0a8750 pthread_cond_wait (libc.so.6 + 0x8a750)
                #2  0x000075d038e863ec n/a (radeonsi_dri.so + 0x863ec)
                #3  0x000075d038e9e39c n/a (radeonsi_dri.so + 0x9e39c)
                #4  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #5  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592697:
                #0  0x000075d03e0a5ebe n/a (libc.so.6 + 0x87ebe)
                #1  0x000075d03e0a8750 pthread_cond_wait (libc.so.6 + 0x8a750)
                #2  0x000075d038e863ec n/a (radeonsi_dri.so + 0x863ec)
                #3  0x000075d038e9e39c n/a (radeonsi_dri.so + 0x9e39c)
                #4  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #5  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592687:
                #0  0x000075d03e0a5ebe n/a (libc.so.6 + 0x87ebe)
                #1  0x000075d03e0a8750 pthread_cond_wait (libc.so.6 + 0x8a750)
                #2  0x000075d038e863ec n/a (radeonsi_dri.so + 0x863ec)
                #3  0x000075d038e9e39c n/a (radeonsi_dri.so + 0x9e39c)
                #4  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #5  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592693:
                #0  0x000075d03e0a5ebe n/a (libc.so.6 + 0x87ebe)
                #1  0x000075d03e0a8750 pthread_cond_wait (libc.so.6 + 0x8a750)
                #2  0x000075d038e863ec n/a (radeonsi_dri.so + 0x863ec)
                #3  0x000075d038e9e39c n/a (radeonsi_dri.so + 0x9e39c)
                #4  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #5  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592689:
                #0  0x000075d03e0a5ebe n/a (libc.so.6 + 0x87ebe)
                #1  0x000075d03e0a8750 pthread_cond_wait (libc.so.6 + 0x8a750)
                #2  0x000075d038e863ec n/a (radeonsi_dri.so + 0x863ec)
                #3  0x000075d038e9e39c n/a (radeonsi_dri.so + 0x9e39c)
                #4  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #5  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592695:
                #0  0x000075d03e0a5ebe n/a (libc.so.6 + 0x87ebe)
                #1  0x000075d03e0a8750 pthread_cond_wait (libc.so.6 + 0x8a750)
                #2  0x000075d038e863ec n/a (radeonsi_dri.so + 0x863ec)
                #3  0x000075d038e9e39c n/a (radeonsi_dri.so + 0x9e39c)
                #4  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #5  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592690:
                #0  0x000075d03e0a5ebe n/a (libc.so.6 + 0x87ebe)
                #1  0x000075d03e0a8750 pthread_cond_wait (libc.so.6 + 0x8a750)
                #2  0x000075d038e863ec n/a (radeonsi_dri.so + 0x863ec)
                #3  0x000075d038e9e39c n/a (radeonsi_dri.so + 0x9e39c)
                #4  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #5  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592795:
                #0  0x000075d03e1196bc read (libc.so.6 + 0xfb6bc)
                #1  0x000075d03d01f4d2 n/a (fast_data_types.so + 0x1f4d2)
                #2  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #3  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592796:
                #0  0x000075d03e1190bf __poll (libc.so.6 + 0xfb0bf)
                #1  0x000075d02d2dd9b7 n/a (libpulse.so.0 + 0x339b7)
                #2  0x000075d02d2c745c pa_mainloop_poll (libpulse.so.0 + 0x1d45c)
                #3  0x000075d02d2d161c pa_mainloop_iterate (libpulse.so.0 + 0x2761c)
                #4  0x000075d02d2d16d1 pa_mainloop_run (libpulse.so.0 + 0x276d1)
                #5  0x000075d02d2e1bf2 n/a (libpulse.so.0 + 0x37bf2)
                #6  0x000075d02d27f2b7 n/a (libpulsecommon-17.0.so + 0x5c2b7)
                #7  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #8  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)

                Stack trace of thread 592699:
                #0  0x000075d03e1190bf __poll (libc.so.6 + 0xfb0bf)
                #1  0x000075d03d015205 n/a (fast_data_types.so + 0x15205)
                #2  0x000075d03e0a955a n/a (libc.so.6 + 0x8b55a)
                #3  0x000075d03e126a3c n/a (libc.so.6 + 0x108a3c)
                ELF object binary architecture: AMD x86-64
kovidgoyal commented 6 months ago

From the stack trace that's a crash occurring inside the radeon drivers, not kitty. In radeonsi_dri.so to be precise when egl_swap_buffers is called. Nothing kitty can do about it.

llj098 commented 6 months ago

Thanks for the reply. FYI, the system runs emacs, chromium, and many other programs, only kitty crashed.