Swaybar seems to crash after a certain period of time. The rest of sway just keeps on working, and a quick reload restores everything without a problem, till the bar disappears a next time. It is not a problem of configuration, since the problem remained with a default setup.
Anyone else having the same problem? Any idea what might be causing this?
Can you share your bar config and command, and run your bar manually with swaybar -b bar-0 -d and capture its debug output?
Here's my bar config.
set fg #aaaaaa
set ind #ff0000aa
set bgf #000000cc
set bgu #00000033
bar {
position top
status_command i3status --config ~/.config/sway/i3status.conf
strip_workspace_numbers no
pango_markup enabled
font swaybar-icons 14
colors {
# color
statusline $fg
separator $fg
background $bgu
focused_background $bgu
# border bg text
focused_workspace $bgf $bgf $fg
active_workspace $bgf $bgf $fg
inactive_workspace $bgu $bgu $fg
urgent_workspace $ind $ind $bgf
}
}
I replaced my session's bar with a logging one, but no errors so far. I'll update when/if it crashes. Normally takes no longer than an hour.
Hm, strange, after about 38 minutes of working smoothly (no errors whatsoever), the bar crashes with a single line in the log: "Bus error (core dumped)".
Ouch. Can you upload the core dump?
How would I do such a thing?
Consult your distro's docs.
I'll do so tomorrow.
Here's the core dump of yesterday
PID: 2989 (swaybar)
UID: 1000 (termontwouter)
GID: 100 (users)
Signal: 7 (BUS)
Timestamp: Mon 2017-02-27 18:38:29 CET (14h ago)
Command Line: swaybar -b bar-0
Executable: /usr/bin/swaybar
Control Group: /user.slice/user-1000.slice/session-c2.scope
Unit: session-c2.scope
Slice: user-1000.slice
Session: c2
Owner UID: 1000 (termontwouter)
Boot ID: 9605ca0861e44557b74582d3d0946284
Machine ID: bfc07103349344b495f16a376ea25227
Hostname: zenbook
Storage: /var/lib/systemd/coredump/core.swaybar.1000.9605ca0861e44557b74582d3d0946284.2989.1488217109000000000000.lz4
Message: Process 2989 (swaybar) of user 1000 dumped core.
Stack trace of thread 2989:
#0 0x00007f865ba937d0 n/a (libpixman-1.so.0)
#1 0x00007f865ba7873b n/a (libpixman-1.so.0)
#2 0x00007f865ba32df9 pixman_fill (libpixman-1.so.0)
#3 0x00007f865d6f15b6 n/a (libcairo.so.2)
#4 0x00007f865d72d14d n/a (libcairo.so.2)
#5 0x00007f865d72d77e n/a (libcairo.so.2)
#6 0x00007f865d72da99 n/a (libcairo.so.2)
#7 0x00007f865d6e52d1 n/a (libcairo.so.2)
#8 0x00007f865d730b89 n/a (libcairo.so.2)
#9 0x00007f865d6edd75 n/a (libcairo.so.2)
#10 0x00007f865d6dfcb5 cairo_paint (libcairo.so.2)
#11 0x000000000040532e render (swaybar)
#12 0x0000000000406b9a bar_run (swaybar)
#13 0x0000000000404e13 main (swaybar)
#14 0x00007f865c31d291 __libc_start_main (libc.so.6)
#15 0x0000000000404eba _start (swaybar)
Is this a cairo / pixman issue, or are the crashes due to sway?
I second this.
This is happening to me too. I have a core dump available upon request (stack trace looks the same as one above).
Consider it requested.
Here it is. Sorry it took so long. I was on mobile before, then I forgot. My bad.
So far as I can tell, sway isn't doing anything wrong here. Can you compile cairo and pixman with debug symbols so we can dig into those to be sure?
Been a while since I used sway, and it seems that this issue is still present. So, I compiled cairo and pixman with debug symbols and here's the latest core dump.
PID: 27535 (swaybar)
UID: 1000 (termontwouter)
GID: 100 (users)
Signal: 7 (BUS)
Timestamp: Sun 2017-09-03 19:41:54 CEST (33min ago)
Command Line: swaybar -b bar-0
Executable: /usr/bin/swaybar
Control Group: /user.slice/user-1000.slice/session-c1.scope
Unit: session-c1.scope
Slice: user-1000.slice
Session: c1
Owner UID: 1000 (termontwouter)
Boot ID: 999692128a3f4e11b53b3756a6aaa095
Machine ID: 30ee9800dc854ec895dbecc721280b6f
Hostname: zenbook
Storage: /var/lib/systemd/coredump/core.swaybar.1000.999692128a3f4e11b53b3756a6aaa095.27535.1504460514000000.lz4
Message: Process 27535 (swaybar) of user 1000 dumped core.
Stack trace of thread 27535:
#0 0x00007f29c3c7d690 _mm_store_si128 (libpixman-1.so.0)
#1 0x00007f29c3c62739 _pixman_implementation_fill (libpixman-1.so.0)
#2 0x00007f29c3c1bbf9 pixman_fill (libpixman-1.so.0)
#3 0x00007f29c5b3e6a6 fill_boxes (libcairo.so.2)
#4 0x00007f29c5b79b22 composite_aligned_boxes (libcairo.so.2)
#5 0x00007f29c5b7a34e clip_and_composite_boxes (libcairo.so.2)
#6 0x00007f29c5b7a3cc _cairo_spans_compositor_paint (libcairo.so.2)
#7 0x00007f29c5b32891 _cairo_compositor_paint (libcairo.so.2)
#8 0x00007f29c5b7d76c _cairo_surface_paint (libcairo.so.2)
#9 0x00007f29c5b3ae67 _cairo_gstate_paint (libcairo.so.2)
#10 0x00007f29c5b2d1d5 INT_cairo_paint (libcairo.so.2)
#11 0x0000562801d6e0f4 render (swaybar)
#12 0x0000562801d6fbf3 bar_run (swaybar)
#13 0x0000562801d6db7f main (swaybar)
#14 0x00007f29c42fd4ca __libc_start_main (libc.so.6)
#15 0x0000562801d6dc7a _start (swaybar)
Anyone know what's the issue here? Is it swaybar, cairo or pixman?
Latest Arch. Have crashes of swaybar every several minutes with the same callstack.
Same issue here - running latest Arch with the same call-stack.
We get it, the isssue exists. Saying "I can reproduce" without any debugging adds absolutely nothing to the discussion.
Did some initial digging on this. The end of the stack trace appears to be a sse2 optimized fill in cairo. It appears to be using a "move aligned" instruction under the hood, so this is probably due to a malloc somewhere not returning something aligned to the correct boundary. Most likely in the swaybar code as I imagine such an issue would have been caught in cairo by now. This would also explain the probabilistic nature of the crash.
Building cairo without sse2 support and seeing if things crash is probably the easiest test until me or someone else has time to dig into the code.
I'm closing issues that are resolved by the yet-unreleased sway 1.0.
Most helpful comment
Latest Arch. Have crashes of swaybar every several minutes with the same callstack.