Waybar crashes with a segfault at random times

Created on 8 May 2019  路  8Comments  路  Source: Alexays/Waybar

What happens: waybar crashes with a segfault
When: at random times
Versions of waybar

  • v0.6.0 from the Manjaro repositories
  • v0.6.1 from the archlinux repositories

Hi,

At random times, waybar will crash without any apparent reason. When I say without any apparent reason, is that I stay on the same sway workspace, I don't do any interaction with the bar, the volume, the backlight don't change, the only things that might change are the date, the network state, and the battery level.

Here is a gist with all information that might help.

There is the config file, the style.css, the systemd service file that I use for running waybar (taken from this wiki page from sway), and the output from waybar. I've removed the restart without segfaults, so timestamps might not be coherent.

It can crash multiple times one after the other, or not in a long time. I've tested with the version v0.6.1, because it looked like an issue with concurrency and JSON, so maybe d027243a19997b24a26ae962e28ccdbe434a1153 could fix it, but it seems like it didn't.

bug

Most helpful comment

Fixed with 362c393b1d503c708a1c6ae1b1b133c1789e1725
Tested for 20mn with while true; do swaymsg output eDP-1 disable && sleep 1 && swaymsg output eDP-1 enable; sleep 2; done

All 8 comments

Check with latest version from master 5a44c8c6debcf92722f6920b81ed44db8736a5da may fix it

Thanks, I've installed it, I'll go back to you if there is any crashes any more or not

I've gotten much more stable behavior since updating my waybar-git to latest (from e5d5735), so add another data point towards this being fixed.

Well, it did crash... Two times, to be precise, but it looks like it is more robust, at least.
Here is the log of the crash:


Log of waybar built from 4688002f23fff3146d00a2016fc23afc0697f4ed

-- Logs begin at Wed 2018-05-09 18:49:10 CEST, end at Fri 2019-05-10 22:18:00 CEST. --
mai 10 00:50:02 HOSTNAME systemd[1185]: Started /home/justin/git/github/Alexays/Waybar/./build/waybar.
mai 10 00:50:03 HOSTNAME waybar[24657]: Resources files: /home/justin/.config/waybar/config, /home/justin/.config/waybar/style.css
mai 10 00:50:03 HOSTNAME waybar[24657]: xkbcommon: ERROR: Key "<CAPS>" added to modifier map for multiple modifiers; Using Control, ignoring Lock
mai 10 00:50:03 HOSTNAME waybar[24657]: Bar configured (width: 1920, height: 30) for output: eDP-1
mai 10 01:39:25 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f32640 as popup because it doesn't have a parent
mai 10 01:39:26 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f32640 as popup because it doesn't have a parent
mai 10 01:39:26 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f32640 as popup because it doesn't have a parent
mai 10 01:39:26 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f32640 as popup because it doesn't have a parent
mai 10 01:39:26 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f32640 as popup because it doesn't have a parent
mai 10 01:39:26 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f32640 as popup because it doesn't have a parent
mai 10 01:39:27 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f32640 as popup because it doesn't have a parent
mai 10 01:39:27 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f32640 as popup because it doesn't have a parent
mai 10 01:39:27 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f32640 as popup because it doesn't have a parent
mai 10 01:39:27 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f32640 as popup because it doesn't have a parent
mai 10 01:39:27 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f32640 as popup because it doesn't have a parent
mai 10 01:39:28 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f32640 as popup because it doesn't have a parent
mai 10 01:39:28 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f32640 as popup because it doesn't have a parent
mai 10 01:39:31 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f327d0 as popup because it doesn't have a parent
mai 10 01:39:31 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f327d0 as popup because it doesn't have a parent
mai 10 01:39:31 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f327d0 as popup because it doesn't have a parent
mai 10 01:39:32 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f327d0 as popup because it doesn't have a parent
mai 10 01:39:32 HOSTNAME waybar[24657]: Couldn't map as window 0x558956f327d0 as popup because it doesn't have a parent
mai 10 09:47:26 HOSTNAME systemd[1185]: run-rdb6c6aae816743e482977060c8afb0fe.service: Main process exited, code=dumped, status=11/SEGV
mai 10 09:47:26 HOSTNAME systemd[1185]: run-rdb6c6aae816743e482977060c8afb0fe.service: Failed with result 'core-dump'.
mai 10 09:47:26 HOSTNAME systemd-coredump[30213]: Process 24657 (waybar) of user 1000 dumped core.

                                                     Stack trace of thread 24657:
                                                     #0  0x00007fd087d4cc41 n/a (libgtk-3.so.0)
                                                     #1  0x00007fd087d31546 n/a (libgtk-3.so.0)
                                                     #2  0x00007fd087cda4e8 n/a (libgtk-3.so.0)
                                                     #3  0x00007fd087f4b05d gtk_widget_size_allocate_with_baseline (libgtk-3.so.0)
                                                     #4  0x00007fd087f61ad4 n/a (libgtk-3.so.0)
                                                     #5  0x00007fd0878d8e75 g_closure_invoke (libgobject-2.0.so.0)
                                                     #6  0x00007fd0878c6188 n/a (libgobject-2.0.so.0)
                                                     #7  0x00007fd0878ca1ae g_signal_emit_valist (libgobject-2.0.so.0)
                                                     #8  0x00007fd0878cb080 g_signal_emit (libgobject-2.0.so.0)
                                                     #9  0x00007fd087f4b3d0 gtk_widget_size_allocate_with_baseline (libgtk-3.so.0)
                                                     #10 0x00007fd087f62390 n/a (libgtk-3.so.0)
                                                     #11 0x00007fd0878ca3b5 g_signal_emit_valist (libgobject-2.0.so.0)
                                                     #12 0x00007fd0878cb080 g_signal_emit (libgobject-2.0.so.0)
                                                     #13 0x00007fd087d26001 n/a (libgtk-3.so.0)
                                                     #14 0x00007fd0878d8e75 g_closure_invoke (libgobject-2.0.so.0)
                                                     #15 0x00007fd0878c5fd5 n/a (libgobject-2.0.so.0)
                                                     #16 0x00007fd0878ca1ae g_signal_emit_valist (libgobject-2.0.so.0)
                                                     #17 0x00007fd0878cb080 g_signal_emit (libgobject-2.0.so.0)
                                                     #18 0x00007fd087b0059b n/a (libgdk-3.so.0)
                                                     #19 0x00007fd087aeac3b n/a (libgdk-3.so.0)
                                                     #20 0x00007fd0877e8e53 n/a (libglib-2.0.so.0)
                                                     #21 0x00007fd0877e9661 g_main_context_dispatch (libglib-2.0.so.0)
                                                     #22 0x00007fd0877eb739 n/a (libglib-2.0.so.0)
                                                     #23 0x00007fd0877eb77e g_main_context_iteration (libglib-2.0.so.0)
                                                     #24 0x00007fd0879a3f5e g_application_run (libgio-2.0.so.0)
                                                     #25 0x0000558955cf08f3 n/a (/home/justin/git/github/Alexays/Waybar/build/waybar)


But really, it has crashed way less than before.

Hope it helps!

I'm on the current master, and it seems the mpd module has issue when switching output.
It causes mpd: Bad file descriptor and crashes soon after.

Fixed with 362c393b1d503c708a1c6ae1b1b133c1789e1725
Tested for 20mn with while true; do swaymsg output eDP-1 disable && sleep 1 && swaymsg output eDP-1 enable; sleep 2; done

for some reason it still crashes, ~maybe has something to do with my waybar config?~
https://github.com/Alexays/Waybar/issues/281

bt:

waybar: ../src/ierror.h:130: mpd_error_get_message: Assertion `error->message != NULL || error->code == MPD_ERROR_OOM' failed.

Thread 8 "waybar" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffe37fe700 (LWP 6971)]
0x00007ffff5e1882f in raise () from /usr/lib/libc.so.6
(gdb) error
Undefined command: "error".  Try "help".
(gdb) p error
$1 = {<text variable, no debug info>} 0x7ffff5ed8cf0 <error>

@Moelf This issue is a known issue, look at #281

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kakashiiiiy picture Kakashiiiiy  路  4Comments

Sqvid picture Sqvid  路  5Comments

atomheartother picture atomheartother  路  3Comments

cryptoluks picture cryptoluks  路  4Comments

piu130 picture piu130  路  4Comments