swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.67k stars 1.11k forks source link

Sway crashes when trying to reload config #363

Closed ajouellette closed 8 years ago

ajouellette commented 8 years ago

I don't know if anyone else has this problem, but whenever I try to reload the config file, sway crashes. The strange thing is though, that coredumpctl does not show any core dumps (does this mean that it isn't an actual crash?) Here is the what is in the log immediately after I tell sway to reload:

Handling command 'reload'
Loading config from /home/aaron/.config/sway/config
Performing configuration file reload
handling config command 'set $mod Mod4'
handling config command 'set $up    k'
handling config command 'set $down  j'
handling config command 'set $left  h'
handling config command 'set $right l'
handling config command 'set $term urxvt'
handling config command 'set $resize 5'
handling config command 'font pango:Fira Mono 10'
Error on line 28 'font pango:Fira Mono 10': Unknown/invalid command
handling config command 'gaps outer 12'
Arranging layout for 0x626060 (ROOT '(null)')
Arranging layout for 0x626060 (null) 0.000000x0.000000+0.000000,0.000000
Arranging output 'eDP-1' at 0.000000,0.000000
Arranging layout for 0x1d302a0 (OUTPUT 'eDP-1')
Arranging layout for 0x1d302a0 eDP-1 1366.000000x768.000000+0.000000,0.000000
Arranging layout for 0x1d1db30 (WORKSPACE '1')
Arranging layout for 0x1d1db30 1 1342.000000x716.000000+12.000000,12.000000
-> Found panel for this workspace: 1366x28, position: 1
Arranging workspace '1' at 12.000000, 12.000000
focus:R      |(0x626060)(p:(nil)   )(f:0x1d302a0)(h:-1)Type:root|layout:-    |w:   0|h:   0|x:   0|y:   0|g:  0|vis:t|children: 1|name:(null)
|focus:X     |(0x1d302a0)(p:0x626060)(f:0x1d1db30)(h: 1)Type:op  |layout:-    |w:1366|h: 768|x:   0|y:   0|g: -1|vis:t|children: 1|name:eDP-1
|-focus:K    |(0x1d1db30)(p:0x1d302a0)(f:(nil)   )(h:-1)Type:ws  |layout:Horiz|w:1342|h: 716|x:  12|y:  12|g: -1|vis:t|children: 0|name:1
handling config command 'gaps inner 15'
Arranging layout for 0x626060 (ROOT '(null)')
Arranging layout for 0x626060 (null) 0.000000x0.000000+0.000000,0.000000
Arranging output 'eDP-1' at 0.000000,0.000000
Arranging layout for 0x1d302a0 (OUTPUT 'eDP-1')
Arranging layout for 0x1d302a0 eDP-1 1366.000000x768.000000+0.000000,0.000000
Arranging layout for 0x1d1db30 (WORKSPACE '1')
Arranging layout for 0x1d1db30 1 1342.000000x716.000000+12.000000,12.000000
-> Found panel for this workspace: 1366x28, position: 1
Arranging workspace '1' at 12.000000, 12.000000
focus:R      |(0x626060)(p:(nil)   )(f:0x1d302a0)(h:-1)Type:root|layout:-    |w:   0|h:   0|x:   0|y:   0|g:  0|vis:t|children: 1|name:(null)
|focus:X     |(0x1d302a0)(p:0x626060)(f:0x1d1db30)(h: 1)Type:op  |layout:-    |w:1366|h: 768|x:   0|y:   0|g: -1|vis:t|children: 1|name:eDP-1
|-focus:K    |(0x1d1db30)(p:0x1d302a0)(f:(nil)   )(h:-1)Type:ws  |layout:Horiz|w:1342|h: 716|x:  12|y:  12|g: -1|vis:t|children: 0|name:1
handling config command 'floating_modifier $mod'
handling config command 'bindsym $mod+Return exec $term'
bindsym - Bound Mod4+Return to command exec urxvt
handling config command 'bindsym $mod+Shift+q kill'
bindsym - Bound Mod4+Shift+q to command kill
handling config command 'bindsym $mod+d exec dmenu_run.sh'
bindsym - Bound Mod4+d to command exec dmenu_run.sh
handling config command 'focus_follows_mouse no'
handling config command 'bindsym $mod+$left  focus left'
bindsym - Bound Mod4+h to command focus left
handling config command 'bindsym $mod+$down  focus down'
bindsym - Bound Mod4+j to command focus down
handling config command 'bindsym $mod+$up    focus up'
bindsym - Bound Mod4+k to command focus up
handling config command 'bindsym $mod+$right focus right'
bindsym - Bound Mod4+l to command focus right
handling config command 'bindsym $mod+Left  focus left'
bindsym - Bound Mod4+Left to command focus left
handling config command 'bindsym $mod+Down  focus down'
bindsym - Bound Mod4+Down to command focus down
handling config command 'bindsym $mod+Up    focus up'
bindsym - Bound Mod4+Up to command focus up
handling config command 'bindsym $mod+Right focus right'
bindsym - Bound Mod4+Right to command focus right
handling config command 'bindsym $mod+Shift+$left  move left'
bindsym - Bound Mod4+Shift+h to command move left
handling config command 'bindsym $mod+Shift+$down  move down'
bindsym - Bound Mod4+Shift+j to command move down
handling config command 'bindsym $mod+Shift+$up    move up'
bindsym - Bound Mod4+Shift+k to command move up
handling config command 'bindsym $mod+Shift+$right move right'
bindsym - Bound Mod4+Shift+l to command move right
handling config command 'bindsym $mod+Shift+Left  move left'
bindsym - Bound Mod4+Shift+Left to command move left
handling config command 'bindsym $mod+Shift+Down  move down'
bindsym - Bound Mod4+Shift+Down to command move down
handling config command 'bindsym $mod+Shift+Up    move up'
bindsym - Bound Mod4+Shift+Up to command move up
handling config command 'bindsym $mod+Shift+Right move right'
bindsym - Bound Mod4+Shift+Right to command move right
handling config command 'bindsym $mod+g splith'
bindsym - Bound Mod4+g to command splith
handling config command 'bindsym $mod+v splitv'
bindsym - Bound Mod4+v to command splitv
handling config command 'bindsym $mod+f fullscreen'
bindsym - Bound Mod4+f to command fullscreen
handling config command 'bindsym $mod+s layout stacking'
bindsym - Bound Mod4+s to command layout stacking
handling config command 'bindsym $mod+w layout tabbed'
bindsym - Bound Mod4+w to command layout tabbed
handling config command 'bindsym $mod+e layout toggle split'
bindsym - Bound Mod4+e to command layout toggle split
handling config command 'bindsym $mod+Shift+space floating toggle'
bindsym - Bound Mod4+Shift+space to command floating toggle
handling config command 'bindsym $mod+space focus mode_toggle'
bindsym - Bound Mod4+space to command focus mode_toggle
handling config command 'bindsym $mod+a focus parent'
bindsym - Bound Mod4+a to command focus parent
handling config command 'bindsym $mod+b focus child'
bindsym - Bound Mod4+b to command focus child
handling config command 'bindsym $mod+Shift+minus move scratchpad'
bindsym - Bound Mod4+Shift+minus to command move scratchpad
handling config command 'bindsym $mod+minus scratchpad show'
bindsym - Bound Mod4+minus to command scratchpad show
handling config command 'bindsym $mod+comma  workspace prev'
bindsym - Bound Mod4+comma to command workspace prev
handling config command 'bindsym $mod+period workspace next'
bindsym - Bound Mod4+period to command workspace next
handling config command 'bindsym $mod+1      workspace 1'
bindsym - Bound Mod4+1 to command workspace 1
handling config command 'bindsym $mod+2      workspace 2'
bindsym - Bound Mod4+2 to command workspace 2
handling config command 'bindsym $mod+3      workspace 3'
bindsym - Bound Mod4+3 to command workspace 3
handling config command 'bindsym $mod+4      workspace 4'
bindsym - Bound Mod4+4 to command workspace 4
handling config command 'bindsym $mod+5      workspace 5'
bindsym - Bound Mod4+5 to command workspace 5
handling config command 'bindsym $mod+6      workspace 6'
bindsym - Bound Mod4+6 to command workspace 6
handling config command 'bindsym $mod+7      workspace 7'
bindsym - Bound Mod4+7 to command workspace 7
handling config command 'bindsym $mod+8      workspace 8'
bindsym - Bound Mod4+8 to command workspace 8
handling config command 'bindsym $mod+9      workspace 9'
bindsym - Bound Mod4+9 to command workspace 9
handling config command 'bindsym $mod+Shift+comma  move container to workspace prev'
bindsym - Bound Mod4+Shift+comma to command move container to workspace prev
handling config command 'bindsym $mod+Shift+period move container to workspace next'
bindsym - Bound Mod4+Shift+period to command move container to workspace next
handling config command 'bindsym $mod+Shift+1      move container to workspace 1'
bindsym - Bound Mod4+Shift+1 to command move container to workspace 1
handling config command 'bindsym $mod+Shift+2      move container to workspace 2'
bindsym - Bound Mod4+Shift+2 to command move container to workspace 2
handling config command 'bindsym $mod+Shift+3      move container to workspace 3'
bindsym - Bound Mod4+Shift+3 to command move container to workspace 3
handling config command 'bindsym $mod+Shift+4      move container to workspace 4'
bindsym - Bound Mod4+Shift+4 to command move container to workspace 4
handling config command 'bindsym $mod+Shift+5      move container to workspace 5'
bindsym - Bound Mod4+Shift+5 to command move container to workspace 5
handling config command 'bindsym $mod+Shift+6      move container to workspace 6'
bindsym - Bound Mod4+Shift+6 to command move container to workspace 6
handling config command 'bindsym $mod+Shift+7      move container to workspace 7'
bindsym - Bound Mod4+Shift+7 to command move container to workspace 7
handling config command 'bindsym $mod+Shift+8      move container to workspace 8'
bindsym - Bound Mod4+Shift+8 to command move container to workspace 8
handling config command 'bindsym $mod+Shift+9      move container to workspace 9'
bindsym - Bound Mod4+Shift+9 to command move container to workspace 9
handling config command 'bindsym $mod+Shift+c reload'
bindsym - Bound Mod4+Shift+c to command reload
handling config command 'bindsym $mod+Shift+r restart'
bindsym - Bound Mod4+Shift+r to command restart
handling config command 'bindsym $mod+Shift+e exit'
bindsym - Bound Mod4+Shift+e to command exit
handling config command 'output * background ~/Pictures/wallpapers/ocean-dark.jpg fill'
Config stored for output * (enabled:-1) (-1 x -1 @ -1, -1) (bg /home/aaron/Pictures/wallpapers/ocean-dark.jpg fill)
handling config command 'bar {'
Configuring bar bar-0
handling config command 'mode dock'
Setting mode: 'dock' for bar: bar-0
handling config command 'position bottom'
Setting bar position 'bottom' for bar: bar-0
handling config command 'strip_workspace_numbers no'
Enabling workspace numbers on bar: bar-0
handling config command 'colors {'
handling config command 'background #343d46'
Setting background color #343d46ff for bar: bar-0
handling config command 'statusline #eff1f5'
Setting statusline color #eff1f5ff for bar: bar-0
handling config command 'separator #323232'
Setting separator color #323232ff for bar: bar-0
handling config command 'focused_workspace #a3be8c #65737e #eff1f5'
Setting focused_workspace_border color #a3be8cff for bar: bar-0
Setting focused_workspace_bg color #65737eff for bar: bar-0
Setting focused_workspace_text color #eff1f5ff for bar: bar-0
handling config command 'active_workspace #4f5b66 #5f676a #eff1f5'
Setting active_workspace_border color #4f5b66ff for bar: bar-0
Setting active_workspace_bg color #5f676aff for bar: bar-0
Setting active_workspace_text color #eff1f5ff for bar: bar-0
handling config command 'inactive_workspace #4f5b66 #4f5b66 #a7adba'
Setting inactive_workspace_border color #4f5b66ff for bar: bar-0
Setting inactive_workspace_bg color #4f5b66ff for bar: bar-0
Setting inactive_workspace_text color #a7adbaff for bar: bar-0
handling config command 'urgent_workspace #bf616a #65737e #eff1f5'
Setting urgent_workspace_border color #bf616aff for bar: bar-0
Setting urgent_workspace_bg color #65737eff for bar: bar-0
Setting urgent_workspace_text color #eff1f5ff for bar: bar-0
handling config command '}'
End of bar colors block
handling config command '}'
End of bar block
handling config command 'exec xrdb ~/.config/x11/Xresources -I$HOME'
Ignoring 'exec xrdb ~/.config/x11/Xresources -I$HOME' due to reload
handling config command 'exec pulseaudio --start'
Ignoring 'exec pulseaudio --start' due to reload
Arranging layout for 0x626060 (ROOT '(null)')
Arranging layout for 0x626060 (null) 0.000000x0.000000+0.000000,0.000000
Arranging output 'eDP-1' at 0.000000,0.000000
Arranging layout for 0x1d302a0 (OUTPUT 'eDP-1')
Arranging layout for 0x1d302a0 eDP-1 1366.000000x768.000000+0.000000,0.000000
Arranging layout for 0x1d1db30 (WORKSPACE '1')
Arranging layout for 0x1d1db30 1 1342.000000x716.000000+12.000000,12.000000
-> Found panel for this workspace: 1366x28, position: 1
Arranging workspace '1' at 12.000000, 12.000000
focus:R      |(0x626060)(p:(nil)   )(f:0x1d302a0)(h:-1)Type:root|layout:-    |w:   0|h:   0|x:   0|y:   0|g:  0|vis:t|children: 1|name:(null)
|focus:X     |(0x1d302a0)(p:0x626060)(f:0x1d1db30)(h: 1)Type:op  |layout:-    |w:1366|h: 768|x:   0|y:   0|g: -1|vis:t|children: 1|name:eDP-1
|-focus:K    |(0x1d1db30)(p:0x1d302a0)(f:(nil)   )(h:-1)Type:ws  |layout:Horiz|w:1342|h: 716|x:  12|y:  12|g: -1|vis:t|children: 0|name:1
Error: Signal 11. Printing backtrace
Backtrace: sway(error_handler+0x2b) [0x41b88b]
Backtrace: /usr/lib/libc.so.6(+0x33680) [0x7f997ae09680]
Backtrace: sway(free_flat_list+0x6) [0x41be66]
Backtrace: sway(read_config+0x402) [0x40cc12]
Backtrace: sway(load_config+0x79) [0x40ce99]
Backtrace: sway() [0x40acb7]
Backtrace: sway(handle_command+0x1a3) [0x407003]
Backtrace: sway() [0x4139a0]
Backtrace: /usr/lib/libwlc.so.0(+0x1935c) [0x7f997b7f035c]
Backtrace: /usr/lib/libwlc.so.0(+0xd95c) [0x7f997b7e495c]
Backtrace: /usr/lib/libwayland-server.so.0(wl_event_loop_dispatch+0x72) [0x7f997b183242]
Backtrace: /usr/lib/libwayland-server.so.0(wl_display_run+0x25) [0x7f997b1819a5]
Backtrace: /usr/lib/libwlc.so.0(wlc_run+0xec) [0x7f997b7fce8c]
Backtrace: sway(main+0x323) [0x406383]
Backtrace: /usr/lib/libc.so.6(__libc_start_main+0xf0) [0x7f997adf6610]
Backtrace: sway(_start+0x29) [0x4063c9]
[wlc] Parent exit (29504)
[wlc] Restoring vt 2 (0x4) (fd 0)
mikkeloscar commented 8 years ago

Make sure you have the latest version of sway.

If you have the latest version then please run addr2line on the backtrace lines and post the result.

You can use this script to make it a bit easier. Just run:

$ cat log | python addr2line_sway.py /path/to/sway
ajouellette commented 8 years ago

I do have the latest version of sway and this is what I got:

Backtrace: sway(error_handler+0x2b) [0x41b88b]
/home/aaron/devel/sway/sway/output.c:135

Backtrace: sway(free_flat_list+0x6) [0x41be66]
/home/aaron/devel/sway/sway/resize.c:67

Backtrace: sway(read_config+0x402) [0x40cc12]
/home/aaron/devel/sway/sway/commands.c:2111

Backtrace: sway(load_config+0x79) [0x40ce99]
/home/aaron/devel/sway/sway/commands.c:2161

Backtrace: sway() [0x40acb7]
/home/aaron/devel/sway/sway/commands.c:1483

Backtrace: sway(handle_command+0x1a3) [0x407003]
/home/aaron/devel/sway/sway/commands.c:448

Backtrace: sway() [0x4139a0]
/home/aaron/devel/sway/sway/focus.c:83

Backtrace: sway(main+0x323) [0x406383]
/home/aaron/devel/sway/sway/commands.c:210

Backtrace: sway(_start+0x29) [0x4063c9]
/home/aaron/devel/sway/sway/commands.c:215
ddevault commented 8 years ago

None of that makes sense.

mikkeloscar commented 8 years ago

Indeed, is it the same sway binary you used when producing the log and when running addr2line?

ajouellette commented 8 years ago

I'll see what I can figure out when I get home. I might have actually used the wrong sway binary ...

ajouellette commented 8 years ago

Sorry about that, it does look like I used two different sway binaries. Using the manually compiled binary, this is what I got:

Backtrace: bin/sway(error_handler+0xaa) [0x41e144]
/home/aaron/devel/sway/common/log.c:147

Backtrace: bin/sway(free_flat_list+0x3d) [0x41e6ca]
/home/aaron/devel/sway/common/stringop.c:87 (discriminator 1)

Backtrace: bin/sway() [0x40daee]
/home/aaron/devel/sway/sway/config.c:57

Backtrace: bin/sway() [0x40dc39]
/home/aaron/devel/sway/sway/config.c:83 (discriminator 3)

Backtrace: bin/sway(read_config+0x39d) [0x40e50c]
/home/aaron/devel/sway/sway/config.c:319

Backtrace: bin/sway(load_config+0xfc) [0x40e144]
/home/aaron/devel/sway/sway/config.c:210

Backtrace: bin/sway() [0x4095d3]
/home/aaron/devel/sway/sway/commands.c:1099

Backtrace: bin/sway(handle_command+0x2ef) [0x40d411]
/home/aaron/devel/sway/sway/commands.c:2299

Backtrace: bin/sway() [0x414ca4]
/home/aaron/devel/sway/sway/handlers.c:374

Backtrace: bin/sway(main+0x3b8) [0x41aee0]
/home/aaron/devel/sway/sway/main.c:203

Backtrace: bin/sway(_start+0x29) [0x405e99]
??:?

Does this make any more sense?