swaywm / wlroots

A modular Wayland compositor library
https://gitlab.freedesktop.org/wlroots/wlroots/
MIT License
2.15k stars 342 forks source link

segfault crash on reload #1684

Open mxmilkiib opened 5 years ago

mxmilkiib commented 5 years ago

As requested on IRC:

coredumpctl gdb sway
           PID: 14513 (sway)
           UID: 1000 (milk)
           GID: 1000 (milk)
        Signal: 11 (SEGV)
     Timestamp: Mon 2019-04-29 21:36:08 BST (17min ago)
  Command Line: sway
    Executable: /usr/bin/sway
 Control Group: /user.slice/user-1000.slice/session-1.scope
          Unit: session-1.scope
         Slice: user-1000.slice
       Session: 1
     Owner UID: 1000 (milk)
       Boot ID: 909207c119dd4b30ba9ef60b6ff4b803
    Machine ID: 868484078e134905a6dcbc0fdd2079bb
      Hostname: rose.local
       Storage: /var/lib/systemd/coredump/core.sway.1000.909207c119dd4b30ba9ef60b6ff4b803.14513.1556570168000000.lz4
       Message: Process 14513 (sway) of user 1000 dumped core.

                Stack trace of thread 14513:
                #0  0x00007f997c4b51c3 wl_list_insert (libwayland-server.so.0)
                #1  0x00007f997c426d51 wl_signal_add (libwlroots.so.2)
                #2  0x00007f997c427820 xserver_handle_ready (libwlroots.so.2)
                #3  0x00007f997c4b2195 n/a (libwayland-server.so.0)
                #4  0x00007f997c4b27f2 wl_event_loop_dispatch (libwayland-server.so.0)
                #5  0x00007f997c4b139c wl_display_run (libwayland-server.so.0)
                #6  0x000056260ff42a0f server_run (sway)
                #7  0x000056260ff41f26 main (sway)
                #8  0x00007f997c1dfce3 __libc_start_main (libc.so.6)
                #9  0x000056260ff33f3e _start (sway)

                Stack trace of thread 14515:
                #0  0x00007f997c1a8bac pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
                #1  0x00007f997499f254 n/a (i965_dri.so)
                #2  0x00007f997499ef78 n/a (i965_dri.so)
                #3  0x00007f997c1a2a92 start_thread (libpthread.so.0)
                #4  0x00007f997c2b6cd3 __clone (libc.so.6)

GNU gdb (GDB) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/sway...done.
[New LWP 14513]
[New LWP 14515]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `sway'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f997c4b51c3 in wl_list_insert () from /usr/lib/libwayland-server.so.0
[Current thread is 1 (Thread 0x7f9975225a40 (LWP 14513))]
>>> bt full
#0  0x00007f997c4b51c3 in wl_list_insert () at /usr/lib/libwayland-server.so.0
#1  0x00007f997c426d51 in wl_signal_add (signal=0x562612169798, listener=0x562612895100) at /usr/include/wayland-server-core.h:435
#2  0x00007f997c426d51 in xwm_set_seat (xwm=0x562612894d60, seat=0x5626121694e0) at ../xwayland/selection/selection.c:309
#3  0x00007f997c427820 in xserver_handle_ready (signal_number=<optimized out>, data=0x56261219d440) at ../xwayland/xwayland.c:237
        wlr_xwayland = 0x56261219d440
        stat_val = 0
#4  0x00007f997c4b2195 in  () at /usr/lib/libwayland-server.so.0
#5  0x00007f997c4b27f2 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#6  0x00007f997c4b139c in wl_display_run () at /usr/lib/libwayland-server.so.0
#7  0x000056260ff42a0f in server_run (server=0x56260ffa9ea0 <server>) at ../sway/sway/server.c:216
#8  0x000056260ff41f26 in main (argc=1, argv=0x7ffd61d93658) at ../sway/sway/main.c:397
        verbose = 0
        debug = 0
        validate = 0
        allow_unsupported_gpu = 0
        long_options = {[0] = {
            name = 0x56260ff8ef60 "help", 
            has_arg = 0, 
            flag = 0x0, 
            val = 104
          }, [1] = {
            name = 0x56260ff8ef65 "config", 
            has_arg = 1, 
            flag = 0x0, 
            val = 99
          }, [2] = {
            name = 0x56260ff8ef6c "validate", 
            has_arg = 0, 
            flag = 0x0, 
            val = 67
          }, [3] = {
            name = 0x56260ff8ef75 "debug", 
            has_arg = 0, 
            flag = 0x0, 
            val = 100
          }, [4] = {
            name = 0x56260ff8ef7b "version", 
            has_arg = 0, 
            flag = 0x0, 
            val = 118
          }, [5] = {
            name = 0x56260ff8ef83 "verbose", 
            has_arg = 0, 
            flag = 0x0, 
            val = 86
          }, [6] = {
            name = 0x56260ff8ef8b "get-socketpath", 
            has_arg = 0, 
            flag = 0x0, 
            val = 112
          }, [7] = {
            name = 0x56260ff8ef9a "unsupported-gpu", 
            has_arg = 0, 
            flag = 0x0, 
            val = 117
          }, [8] = {
            name = 0x56260ff8efaa "my-next-gpu-wont-be-nvidia", 
            has_arg = 0, 
            flag = 0x0, 
            val = 117
          }, [9] = {
            name = 0x0, 
            has_arg = 0, 
            flag = 0x0, 
            val = 0
          }}
        config_path = 0x0
        usage = 0x56260ff8ea28 "Usage: sway [options] [command]\n\n  -h, --help", ' ' <repeats 13 times>, "Show help message and quit.\n  -c, --config <config>  Specify a config file.\n  -C, --validate         Check the validity of the config file, th"...
        c = -1

wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:

https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1684

kaihendry commented 5 years ago

Archlinux package user also experiencing a similar crash https://s.natalian.org/2019-05-11/bt.txt

KL1RL commented 4 years ago

Can confirm same crash on an Arch system. Updated as of yesterday. Sway version 1.4 package shows sway 1:1.4-9


$ coredumpctl debug sway
           PID: 20588 (sway)
           UID: 1000 (redacted)
           GID: 1000 (redacted)
        Signal: 11 (SEGV)
     Timestamp: Wed 2020-06-17 13:02:19 AKDT (5min ago)
  Command Line: sway
    Executable: /usr/bin/sway
 Control Group: /user.slice/user-1000.slice/session-1.scope
          Unit: session-1.scope
         Slice: user-1000.slice
       Session: 1
     Owner UID: 1000 (redacted)
       Boot ID: redacted
    Machine ID: redacted
      Hostname: redacted
       Storage: /var/lib/systemd/coredump/core.sway.1000.redacted
       Message: Process 20588 (sway) of user 1000 dumped core.

                Stack trace of thread 20588:
                #0  0x00007f364fdb74b5 __strlen_avx2 (libc.so.6 + 0x1624b5)
                #1  0x00007f364fce4233 __strdup (libc.so.6 + 0x8f233)
                #2  0x0000560bec6af442 n/a (sway + 0x4f442)
                #3  0x0000560bec691b6f n/a (sway + 0x31b6f)
                #4  0x0000560bec694961 n/a (sway + 0x34961)
                #5  0x00007f364f6611dd wl_event_loop_dispatch (libwayland-server.so.0 + 0xb1dd)
                #6  0x00007f364f65f4e7 wl_display_run (libwayland-server.so.0 + 0x94e7)
                #7  0x0000560bec66f5ff n/a (sway + 0xf5ff)
                #8  0x00007f364fc7c002 __libc_start_main (libc.so.6 + 0x27002)
                #9  0x0000560bec66f94e n/a (sway + 0xf94e)

                Stack trace of thread 20590:
                #0  0x00007f364f520e32 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfe32)
                #1  0x00007f364d9963bc n/a (iris_dri.so + 0x4ae3bc)
                #2  0x00007f364d994db8 n/a (iris_dri.so + 0x4acdb8)
                #3  0x00007f364f51a422 start_thread (libpthread.so.0 + 0x9422)
                #4  0x00007f364fd54bf3 __clone (libc.so.6 + 0xffbf3)

                Stack trace of thread 20591:
                #0  0x00007f364f520e32 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfe32)
                #1  0x00007f364d9963bc n/a (iris_dri.so + 0x4ae3bc)
                #2  0x00007f364d994db8 n/a (iris_dri.so + 0x4acdb8)
                #3  0x00007f364f51a422 start_thread (libpthread.so.0 + 0x9422)
                #4  0x00007f364fd54bf3 __clone (libc.so.6 + 0xffbf3)

                Stack trace of thread 20592:
                #0  0x00007f364f520e32 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfe32)
                #1  0x00007f364d9963bc n/a (iris_dri.so + 0x4ae3bc)
                #2  0x00007f364d994db8 n/a (iris_dri.so + 0x4acdb8)
                #3  0x00007f364f51a422 start_thread (libpthread.so.0 + 0x9422)
                #4  0x00007f364fd54bf3 __clone (libc.so.6 + 0xffbf3)

                Stack trace of thread 20593:
                #0  0x00007f364f520e32 pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0 + 0xfe32)
                #1  0x00007f364d9963bc n/a (iris_dri.so + 0x4ae3bc)
                #2  0x00007f364d994db8 n/a (iris_dri.so + 0x4acdb8)
                #3  0x00007f364f51a422 start_thread (libpthread.so.0 + 0x9422)
                #4  0x00007f364fd54bf3 __clone (libc.so.6 + 0xffbf3)

GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/sway...
(No debugging symbols found in /usr/bin/sway)
[New LWP 20588]
[New LWP 20590]
[New LWP 20591]
[New LWP 20592]
[New LWP 20593]

warning: Unexpected size of section `.reg-xstate/20588' in core file.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `sway'.
Program terminated with signal SIGSEGV, Segmentation fault.

warning: Unexpected size of section `.reg-xstate/20588' in core file.
#0  0x00007f364fdb74b5 in __strlen_avx2 () from /usr/lib/libc.so.6
[Current thread is 1 (Thread 0x7f364ec74dc0 (LWP 20588))]
(gdb) bt full
#0  0x00007f364fdb74b5 in __strlen_avx2 () at /usr/lib/libc.so.6
#1  0x00007f364fce4233 in strdup () at /usr/lib/libc.so.6
#2  0x0000560bec6af442 in  ()
#3  0x0000560bec691b6f in  ()
#4  0x0000560bec694961 in  ()
#5  0x00007f364f6611dd in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#6  0x00007f364f65f4e7 in wl_display_run () at /usr/lib/libwayland-server.so.0
#7  0x0000560bec66f5ff in  ()
#8  0x00007f364fc7c002 in __libc_start_main () at /usr/lib/libc.so.6
#9  0x0000560bec66f94e in  ()
(gdb)
RedSoxFan commented 4 years ago

@KL1RL Your backtrace is different than the others. Unfortunately, it's missing debug symbols so it will be difficult to pin point the issue. Can you please compile sway from source? It's possible that it's already been fixed on sway master. If you are able to replicate, please open a sway issue with the backtrace and a debug log.