Sway: Swayidle crashes and eventually leads to hang on entire system

Created on 18 May 2018  路  9Comments  路  Source: swaywm/sway

(sway version 1.0-alpha.2-29-g6a13f3eb on Arch with kernel 4.16.9)
Earlier I noticed that any new shells I tried to start from within sway would hang. I exited sway and noticed my login shell was hanging as well, and any other TTYs I tried to switch to just showed a black screen. Interestingly, before I quit sway, firefox had still been working fine. After cutting the power to my computer and rebooting, I found the following in journalctl:

May 17 16:15:51 spectre systemd-coredump[17568]: Process 519 (swayidle) of user 1000 dumped core.

                                                 Stack trace of thread 519:
                                                 #0  0x00007feaa2f2886b raise (libc.so.6)
                                                 #1  0x00007feaa2f1340e abort (libc.so.6)
                                                 #2  0x00007feaa2f6a8b8 __libc_message (libc.so.6)
                                                 #3  0x00007feaa2ffb80d __GI___fortify_fail_abort (libc.so.6)
                                                 #4  0x00007feaa2ffb7c2 __stack_chk_fail (libc.so.6)
                                                 #5  0x000055841d9a3f52 n/a (swayidle)
                                                 #6  0x00007feaa32d3657 n/a (libsystemd.so.0)
                                                 #7  0x00007feaa32d338f n/a (libsystemd.so.0)
                                                 #8  0x00007feaa32d38ee n/a (libsystemd.so.0)
                                                 #9  0x00007feaa32d338f n/a (libsystemd.so.0)
                                                 #10 0x00007feaa32d38ee n/a (libsystemd.so.0)
                                                 #11 0x00007feaa32d338f n/a (libsystemd.so.0)
                                                 #12 0x00007feaa32d38ee n/a (libsystemd.so.0)
                                                 #13 0x00007feaa32d338f n/a (libsystemd.so.0)
                                                 #14 0x00007feaa32d38ee n/a (libsystemd.so.0)
                                                 #15 0x00007feaa32d338f n/a (libsystemd.so.0)
                                                 #16 0x00007feaa32d346e n/a (libsystemd.so.0)
                                                 #17 0x00007feaa32d32b5 n/a (libsystemd.so.0)
                                                 #18 0x00007feaa32be21f n/a (libsystemd.so.0)
                                                 #19 0x00007feaa33120a6 n/a (libsystemd.so.0)
                                                 #20 0x000055841d9a3933 n/a (swayidle)
                                                 #21 0x00007feaa37aea42 wl_event_loop_dispatch (libwayland-server.so.0)
                                                 #22 0x000055841d9a366f n/a (swayidle)
                                                 #23 0x00007feaa2f1506b __libc_start_main (libc.so.6)
                                                 #24 0x000055841d9a378a n/a (swayidle)
May 17 16:18:54 spectre kernel: INFO: task kworker/u8:5:186 blocked for more than 120 seconds.
May 17 16:18:54 spectre kernel:       Not tainted 4.16.8-1-ARCH #1
May 17 16:18:54 spectre kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
May 17 16:18:54 spectre kernel: INFO: task systemd-sleep:17585 blocked for more than 120 seconds.
May 17 16:18:54 spectre kernel:       Not tainted 4.16.8-1-ARCH #1
May 17 16:18:54 spectre kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
May 17 16:20:56 spectre kernel: INFO: task kworker/u8:5:186 blocked for more than 120 seconds.
May 17 16:20:56 spectre kernel:       Not tainted 4.16.8-1-ARCH #1
May 17 16:20:56 spectre kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
May 17 16:20:56 spectre kernel: INFO: task systemd-sleep:17585 blocked for more than 120 seconds.
May 17 16:20:56 spectre kernel:       Not tainted 4.16.8-1-ARCH #1
May 17 16:20:56 spectre kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

with that last message repeating until everything began to hang. This happened randomly but if I can reproduce I'll provide more info.

The swayidle command I had in my config was:

exec swayidle \
    timeout 180 'swaymsg "output * dpms off"' \
        resume 'swaymsg "output * dpms on"' \
    timeout 600 'exec systemctl suspend' \
    before-sleep 'swaylock -i /home/gmend/.dotfiles/sway/lockscreen.png'

Most helpful comment

Whatever jerk maintains the AUR package should add this to it:

options=(!strip)

All 9 comments

Please provide a stack trace with coredumpctl

[root@spectre netctl]# coredumpctl gdb 519
           PID: 519 (swayidle)
           UID: 1000 (gmend)
           GID: 1000 (gmend)
        Signal: 6 (ABRT)
     Timestamp: Thu 2018-05-17 16:15:50 CDT (5h 12min ago)
  Command Line: swayidle timeout 180 swaymsg "output * dpms off" resume swaymsg "output * dpms on" timeout 600 exec systemctl suspend before-sleep swaylock -i /home/gmend/.dotfiles/sway/lockscreen.png
    Executable: /usr/bin/swayidle
 Control Group: /user.slice/user-1000.slice/session-c1.scope
          Unit: session-c1.scope
         Slice: user-1000.slice
       Session: c1
     Owner UID: 1000 (gmend)
       Boot ID: 4b610dd9dee9445dbbcf99eeb43ef541
    Machine ID: 9abc13d0191f400db2d10e00a47913e8
      Hostname: spectre
       Storage: /var/lib/systemd/coredump/core.swayidle.1000.4b610dd9dee9445dbbcf99eeb43ef541.519.1526591750000000.lz4
       Message: Process 519 (swayidle) of user 1000 dumped core.

                Stack trace of thread 519:
                #0  0x00007feaa2f2886b raise (libc.so.6)
                #1  0x00007feaa2f1340e abort (libc.so.6)
                #2  0x00007feaa2f6a8b8 __libc_message (libc.so.6)
                #3  0x00007feaa2ffb80d __GI___fortify_fail_abort (libc.so.6)
                #4  0x00007feaa2ffb7c2 __stack_chk_fail (libc.so.6)
                #5  0x000055841d9a3f52 n/a (swayidle)
                #6  0x00007feaa32d3657 n/a (libsystemd.so.0)
                #7  0x00007feaa32d338f n/a (libsystemd.so.0)
                #8  0x00007feaa32d38ee n/a (libsystemd.so.0)
                #9  0x00007feaa32d338f n/a (libsystemd.so.0)
                #10 0x00007feaa32d38ee n/a (libsystemd.so.0)
                #11 0x00007feaa32d338f n/a (libsystemd.so.0)
                #12 0x00007feaa32d38ee n/a (libsystemd.so.0)
                #13 0x00007feaa32d338f n/a (libsystemd.so.0)
                #14 0x00007feaa32d38ee n/a (libsystemd.so.0)
                #15 0x00007feaa32d338f n/a (libsystemd.so.0)
                #16 0x00007feaa32d346e n/a (libsystemd.so.0)
                #17 0x00007feaa32d32b5 n/a (libsystemd.so.0)
                #18 0x00007feaa32be21f n/a (libsystemd.so.0)
                #19 0x00007feaa33120a6 n/a (libsystemd.so.0)
                #20 0x000055841d9a3933 n/a (swayidle)
                #21 0x00007feaa37aea42 wl_event_loop_dispatch (libwayland-server.so.0)
                #22 0x000055841d9a366f n/a (swayidle)
                #23 0x00007feaa2f1506b __libc_start_main (libc.so.6)
                #24 0x000055841d9a378a n/a (swayidle)

GNU gdb (GDB) 8.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/swayidle...(no debugging symbols found)...done.
[New LWP 519]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `swayidle timeout 180 swaymsg "output * dpms off" resume swaymsg "output * dpms'.
Program terminated with signal SIGABRT, Aborted.
#0  0x00007feaa2f2886b in raise () from /usr/lib/libc.so.6
(gdb) bt full
#0  0x00007feaa2f2886b in raise () at /usr/lib/libc.so.6
#1  0x00007feaa2f1340e in abort () at /usr/lib/libc.so.6
#2  0x00007feaa2f6a8b8 in __libc_message () at /usr/lib/libc.so.6
#3  0x00007feaa2ffb80d in __fortify_fail_abort () at /usr/lib/libc.so.6
#4  0x00007feaa2ffb7c2 in  () at /usr/lib/libc.so.6
#5  0x000055841d9a3f52 in  ()
#6  0x00007feaa32d3657 in  () at /usr/lib/libsystemd.so.0
#7  0x00007feaa32d338f in  () at /usr/lib/libsystemd.so.0
#8  0x00007feaa32d38ee in  () at /usr/lib/libsystemd.so.0
#9  0x00007feaa32d338f in  () at /usr/lib/libsystemd.so.0
#10 0x00007feaa32d38ee in  () at /usr/lib/libsystemd.so.0
#11 0x00007feaa32d338f in  () at /usr/lib/libsystemd.so.0
#12 0x00007feaa32d38ee in  () at /usr/lib/libsystemd.so.0
#13 0x00007feaa32d338f in  () at /usr/lib/libsystemd.so.0
#14 0x00007feaa32d38ee in  () at /usr/lib/libsystemd.so.0
#15 0x00007feaa32d338f in  () at /usr/lib/libsystemd.so.0
#16 0x00007feaa32d346e in  () at /usr/lib/libsystemd.so.0
#17 0x00007feaa32d32b5 in  () at /usr/lib/libsystemd.so.0
#18 0x00007feaa32be21f in  () at /usr/lib/libsystemd.so.0
#19 0x00007feaa33120a6 in  () at /usr/lib/libsystemd.so.0
#20 0x000055841d9a3933 in  ()
#21 0x00007feaa37aea42 in wl_event_loop_dispatch () at /usr/lib/libwayland-server.so.0
#22 0x000055841d9a366f in  ()
#23 0x00007feaa2f1506b in __libc_start_main () at /usr/lib/libc.so.6
#24 0x000055841d9a378a in  ()
(gdb) 

I'm very new to this, but I tried to get a stack trace from gdb as above - it doesn't seem to have any new information, however, so I apologize if I'm doing something wrong.
I also ran thread apply all bt full at the gdb prompt and got the same output.

OK, I was reading up on some other issues and believe the issue is that I installed from AUR. I will build from source again and if the issue reoccurs provide a stack trace. Is there something I need to do differently for a debug build? Unless I am missing something, the build commands given in the readme and in the PKGBUILD from the AUR seem to be the same?

If I'm not mistaken, makepkg will strip symbols from all of the binaries it will generate.
If you build it straight from git with the default options, it will have debugging symbols intact.

I think makepkg can be configured to not strip binaries, but I'm not sure.

Whatever jerk maintains the AUR package should add this to it:

options=(!strip)

Yep, I added options=('!strip' 'debug') to my local PKGBUILDs.

@SirCmpwn Please stay professional and stop insulting people. :)

Please stop making packages for software releases I explicitly, in bold, ask people not to package.

Closing because we can't do anything without a proper stack trace. Feel free to reopen if you get one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DpoBoceka picture DpoBoceka  路  4Comments

mcmfb picture mcmfb  路  3Comments

cauebs picture cauebs  路  3Comments

ddevault picture ddevault  路  4Comments

dnkl picture dnkl  路  4Comments