Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.55k stars 706 forks source link

Freezing at 100% CPU after some time #1464

Closed TheSunCat closed 2 years ago

TheSunCat commented 2 years ago

Hi! After a recent update, waybar started crashing with an error about a value not being a string. I was able to work around it by disabling the weather module. Now however, Waybar seems to freeze completely a minute or two after being started. There is no log when the freeze happens, and I have to manually kill the process and restart it.

Here is my Waybar configuration.

% waybar --version
Waybar v0.9.10

% waybar
[2022-03-08 09:36:38.071] [info] Using configuration file /home/apm/.config/waybar/config
[2022-03-08 09:36:38.071] [info] Using CSS file /home/apm/.config/waybar/style.css
[2022-03-08 09:36:38.085] [warning] For a functional tray you must have libappindicator-* installed and export XDG_CURRENT_DESKTOP=Unity
[2022-03-08 09:36:38.094] [warning] As using a timezone, some format args may be missing as the date library haven't got a release since 2018.

** (waybar:31883): WARNING **: 09:36:38.142: gtk-layer-shell v0.7.0 may not work on GTK v3.24.33. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md
[2022-03-08 09:36:38.224] [info] Bar configured (width: 1920, height: 24) for output: eDP-1

** (waybar:31883): WARNING **: 09:36:38.232: Status Notifier Item with bus name ':1.24' and object path '/org/ayatana/NotificationItem/discord1' is already registered

** (waybar:31883): WARNING **: 09:36:38.233: Status Notifier Item with bus name ':1.25' and object path '/org/ayatana/NotificationItem/Element1' is already registered

** (waybar:31883): WARNING **: 09:36:38.233: Status Notifier Item with bus name ':1.243' and object path '/org/ayatana/NotificationItem/itch1' is already registered

The above is printed when I start Waybar, but nothing is printed at the time of the freeze. The app tray does function, so I'm not sure what that first warning is about.

alkar commented 2 years ago

I get the CPU spike / freezing as well but I don't see anything wrong in the logs, just the standard.

[2022-03-08 09:06:27.203] [info] Using configuration file /home/alkar/.config/waybar/config
[2022-03-08 09:06:27.204] [info] Using CSS file /home/alkar/.config/waybar/style.css
[2022-03-08 09:06:27.234] [warning] For a functional tray you must have libappindicator-* installed and export XDG_CURRENT_DESKTOP=Unity
[2022-03-08 09:06:27.262] [warning] As using a timezone, some format args may be missing as the date library haven't got a release since 2018.

** (waybar:11855): WARNING **: 09:06:27.282: gtk-layer-shell v0.7.0 may not work on GTK v3.24.33. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md

(waybar:11855): GLib-GObject-WARNING **: 09:06:27.293: ../glib/gobject/gsignal.c:2081: type 'GtkWindow' is already overridden for signal id '73'

(waybar:11855): GLib-GObject-WARNING **: 09:06:27.295: ../glib/gobject/gsignal.c:2081: type 'GtkWindow' is already overridden for signal id '72'
[2022-03-08 09:06:27.307] [warning] For a functional tray you must have libappindicator-* installed and export XDG_CURRENT_DESKTOP=Unity
[2022-03-08 09:06:27.338] [warning] As using a timezone, some format args may be missing as the date library haven't got a release since 2018.
[2022-03-08 09:06:27.794] [info] Bar configured (width: 1920, height: 30) for output: eDP-1
[2022-03-08 09:06:27.794] [info] Bar configured (width: 2560, height: 30) for output: HDMI-A-2
be-neth commented 2 years ago

I have the same issue. after some time, I see that waybar is unresponsive (and doesn't update module like active workspace).

I am currently running waybar with strace but nothing interesting found yet…

I confirm that this bug appear with waybar (waybar-0.9.10-1) update and wlroots (wlroots-0.15.1-3) from monday on Archlinux.

Alexays commented 2 years ago

Can you try disabling sway/window module?

japhir commented 2 years ago

I've got the same issue here.

waybar
[2022-03-08 10:32:08.422] [info] Using configuration file /home/japhir/.config/waybar/config
[2022-03-08 10:32:08.423] [info] Using CSS file /home/japhir/.config/waybar/style.css
[2022-03-08 10:32:08.432] [warning] As using a timezone, some format args may be missing as the date library haven't got a release since 2018.
[2022-03-08 10:32:08.434] [warning] For a functional tray you must have libappindicator-* installed and export XDG_CURRENT_DESKTOP=Unity

** (waybar:59620): WARNING **: 10:32:08.468: gtk-layer-shell v0.7.0 may not work on GTK v3.24.33. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md

(waybar:59620): GLib-GObject-WARNING **: 10:32:08.470: ../glib/gobject/gsignal.c:2081: type 'GtkWindow' is already overridden for signal id '73'

(waybar:59620): GLib-GObject-WARNING **: 10:32:08.470: ../glib/gobject/gsignal.c:2081: type 'GtkWindow' is already overridden for signal id '72'
[2022-03-08 10:32:08.519] [warning] As using a timezone, some format args may be missing as the date library haven't got a release since 2018.
[2022-03-08 10:32:08.519] [warning] For a functional tray you must have libappindicator-* installed and export XDG_CURRENT_DESKTOP=Unity

** (waybar:59620): WARNING **: 10:32:08.798: Status Notifier Item with bus name ':1.32' and object path '/org/ayatana/NotificationItem/blueman' is already registered

** (waybar:59620): WARNING **: 10:32:08.798: Status Notifier Item with bus name ':1.5' and object path '/org/ayatana/NotificationItem/nm_applet' is already registered

** (waybar:59620): WARNING **: 10:32:08.799: Status Notifier Item with bus name ':1.5' and object path '/org/ayatana/NotificationItem/nm_applet' is already registered

** (waybar:59620): WARNING **: 10:32:08.800: Status Notifier Item with bus name ':1.32' and object path '/org/ayatana/NotificationItem/blueman' is already registered
[2022-03-08 10:32:08.846] [warning] Requested height: 24 is less than the minimum height: 25 required by the modules
[2022-03-08 10:32:08.846] [info] Bar configured (width: 1920, height: 25) for output: HDMI-A-2
[2022-03-08 10:32:08.852] [warning] Requested height: 24 is less than the minimum height: 25 required by the modules
[2022-03-08 10:32:08.852] [info] Bar configured (width: 1920, height: 25) for output: eDP-1
^C

after disabling the sway/window module it does seem to work again. Maybe it has something to do with the recently added icon that's displaying there? (which I love btw!) :)

be-neth commented 2 years ago

Can you try disabling sway/window module?

Its exactly what I am trying before reading your comment. it seems that I have no issue so far without sway/window module.

alkar commented 2 years ago

Can you try disabling sway/window module?

It seems to work in my case. I don't get excessive CPU usage or freezing.

alkar commented 2 years ago

Maybe it has something to do with the recently added icon that's displaying there? (which I love btw!) :)

I thought that was new! :D

tsdh commented 2 years ago

I also get waybar freezes although not always with it taking 100% of one core. So now I've built it myself with debugging symbols and will post a backtrace here if I get another freeze.

TheSunCat commented 2 years ago

Removing the sway/window module seems to have fixed the freezing for me as well.

rnestler commented 2 years ago

Removing the sway/window module seems to have fixed the freezing for me as well.

For me it was enough to disable the icons with

    "sway/window": {
        "icon": false
    },
alkar commented 2 years ago

Removing the sway/window module seems to have fixed the freezing for me as well.

For me it was enough to disable the icons with

    "sway/window": {
        "icon": false
    },

Can confirm this works for me too.

Alexays commented 2 years ago

On latest version, icon is disabled by default

tsdh commented 2 years ago

I have them enabled in my config but since I run with a build with debugging symbols, I don't get the freeze anymore. :-)

tsdh commented 2 years ago

Ok, I've had a freeze again and was able to attach GDB and get a backtrace:


(gdb) thread apply all bt full

Thread 19 (Thread 0x7f4e2f7f6640 (LWP 940) "waybar"):
#0  0x00007f4e5cd2e15a in __futex_abstimed_wait_common () at /usr/lib/libc.so.6
#1  0x00007f4e5cd30c64 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /usr/lib/libc.so.6
#2  0x0000559856072483 in std::cv_status std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) ()
#3  0x000055985606f728 in waybar::modules::Clock::Clock(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Json::Value const&)::{lambda()#2}::operator()() const ()
#4  0x000055985606f7af in std::_Function_handler<void (), waybar::modules::Clock::Clock(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Json::Value const&)::{lambda()#2}>::_M_invoke(std::_Any_data const&) ()
#5  0x0000559855fcbaa1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() ()
#6  0x00007f4e5d0864d4 in std::execute_native_thread_routine(void*) (__p=0x559857ac5b50) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#7  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#8  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 18 (Thread 0x7f4e2fff7640 (LWP 939) "waybar"):
#0  0x00007f4e5cda61ec in read () at /usr/lib/libc.so.6
#1  0x0000559855ff3aee in std::_Function_handler<void (), waybar::modules::Battery::worker()::{lambda()#3}>::_M_invoke(std::_Any_data const&) ()
#2  0x0000559855fcbaa1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() ()
#3  0x00007f4e5d0864d4 in std::execute_native_thread_routine(void*) (__p=0x559857d29ba0) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#4  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#5  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 17 (Thread 0x7f4e307f8640 (LWP 938) "waybar"):
#0  0x00007f4e5cda61ec in read () at /usr/lib/libc.so.6
#1  0x0000559855ff111a in std::_Function_handler<void (), waybar::modules::Battery::worker()::{lambda()#2}>::_M_invoke(std::_Any_data const&) ()
#2  0x0000559855fcbaa1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() ()
#3  0x00007f4e5d0864d4 in std::execute_native_thread_routine(void*) (__p=0x559857d2a340) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#4  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#5  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 16 (Thread 0x7f4e30ff9640 (LWP 937) "waybar"):
#0  0x00007f4e5cd2e15a in __futex_abstimed_wait_common () at /usr/lib/libc.so.6
#1  0x00007f4e5cd30f32 in pthread_cond_clockwait@GLIBC_2.30 () at /usr/lib/libc.so.6
#2  0x0000559855fcc4aa in std::cv_status std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) ()
#3  0x0000559855fcc590 in waybar::util::SleeperThread::sleep_for(std::chrono::duration<long, std::ratio<1l, 1000000000l> >) ()
#4  0x0000559855ff3aa7 in std::_Function_handler<void (), waybar::modules::Battery::worker()::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#5  0x0000559855fcbaa1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() ()
#6  0x00007f4e5d0864d4 in std::execute_native_thread_routine(void*) (__p=0x559857c7f080) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#7  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#8  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 15 (Thread 0x7f4e317fa640 (LWP 936) "waybar"):
#0  0x00007f4e5cdb69ae in epoll_wait () at /usr/lib/libc.so.6
#1  0x00005598560439e2 in waybar::modules::Network::worker()::{lambda()#2}::operator()() const ()
#2  0x0000559856043ae3 in std::_Function_handler<void (), waybar::modules::Network::worker()::{lambda()#2}>::_M_invoke(std::_Any_data const&) ()
#3  0x0000559855fcbaa1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() ()
#4  0x00007f4e5d0864d4 in std::execute_native_thread_routine(void*) (__p=0x559857b90990) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#5  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#6  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 14 (Thread 0x7f4e39ffb640 (LWP 935) "waybar"):
#0  0x00007f4e5cd2e15a in __futex_abstimed_wait_common () at /usr/lib/libc.so.6
#1  0x00007f4e5cd30f32 in pthread_cond_clockwait@GLIBC_2.30 () at /usr/lib/libc.so.6
#2  0x0000559855fcc4aa in std::cv_status std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) ()
#3  0x0000559855fcc590 in waybar::util::SleeperThread::sleep_for(std::chrono::duration<long, std::ratio<1l, 1000000000l> >) ()
#4  0x0000559856044eae in std::_Function_handler<void (), waybar::modules::Network::worker()::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#5  0x0000559855fcbaa1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() ()
#6  0x00007f4e5d0864d4 in std::execute_native_thread_routine(void*) (__p=0x559857b909d0) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#7  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#8  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 13 (Thread 0x7f4e3a7fc640 (LWP 934) "waybar"):
#0  0x00007f4e5cd2e15a in __futex_abstimed_wait_common () at /usr/lib/libc.so.6
#1  0x00007f4e5cd30f32 in pthread_cond_clockwait@GLIBC_2.30 () at /usr/lib/libc.so.6
#2  0x0000559855fcc4aa in std::cv_status std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) ()
#3  0x0000559855fcc590 in waybar::util::SleeperThread::sleep_for(std::chrono::duration<long, std::ratio<1l, 1000000000l> >) ()
#4  0x0000559855fd0399 in std::_Function_handler<void (), waybar::modules::Temperature::Temperature(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Json::Value const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#5  0x0000559855fcbaa1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() ()
#6  0x00007f4e5d0864d4 in std::execute_native_thread_routine(void*) (__p=0x559857d20200) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#7  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#8  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 12 (Thread 0x7f4e3affd640 (LWP 933) "waybar"):
#0  0x00007f4e5cd2e15a in __futex_abstimed_wait_common () at /usr/lib/libc.so.6
#1  0x00007f4e5cd30f32 in pthread_cond_clockwait@GLIBC_2.30 () at /usr/lib/libc.so.6
#2  0x0000559855fcc4aa in std::cv_status std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) ()
#3  0x0000559855fcc590 in waybar::util::SleeperThread::sleep_for(std::chrono::duration<long, std::ratio<1l, 1000000000l> >) ()
#4  0x0000559856000571 in std::_Function_handler<void (), waybar::modules::Memory::Memory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Json::Value const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#5  0x0000559855fcbaa1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() ()
#6  0x00007f4e5d0864d4 in std::execute_native_thread_routine(void*) (__p=0x559857d33930) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#7  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#8  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 11 (Thread 0x7f4e3b7fe640 (LWP 932) "waybar"):
#0  0x00007f4e5cd2e15a in __futex_abstimed_wait_common () at /usr/lib/libc.so.6
#1  0x00007f4e5cd30f32 in pthread_cond_clockwait@GLIBC_2.30 () at /usr/lib/libc.so.6
#2  0x0000559855fcc4aa in std::cv_status std::condition_variable::__wait_until_impl<std::chrono::duration<long, std::ratio<1l, 1000000000l> > >(std::unique_lock<std::mutex>&, --Type <RET> for more, q to quit, c to continue without paging--
std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) ()
#3  0x0000559855fcc590 in waybar::util::SleeperThread::sleep_for(std::chrono::duration<long, std::ratio<1l, 1000000000l> >) ()
#4  0x0000559855ffa8f6 in std::_Function_handler<void (), waybar::modules::Cpu::Cpu(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Json::Value const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#5  0x0000559855fcbaa1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() ()
#6  0x00007f4e5d0864d4 in std::execute_native_thread_routine(void*) (__p=0x559857c29e30) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#7  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#8  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 10 (Thread 0x7f4e3bfff640 (LWP 931) "waybar"):
#0  0x00007f4e5cdb69ae in epoll_wait () at /usr/lib/libc.so.6
#1  0x000055985605ba05 in waybar::modules::Backlight::Backlight(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Json::Value const&)::{lambda()#1}::operator()() const ()
#2  0x000055985605bb78 in std::_Function_handler<void (), waybar::modules::Backlight::Backlight(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Json::Value const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#3  0x0000559855fcbaa1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() ()
#4  0x00007f4e5d0864d4 in std::execute_native_thread_routine(void*) (__p=0x559857c18c10) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#5  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#6  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 9 (Thread 0x7f4e54d03640 (LWP 928) "threaded-ml"):
#0  0x00007f4e5cdaa2af in poll () at /usr/lib/libc.so.6
#1  0x00007f4e5d2eb02f in  () at /usr/lib/libpulse.so.0
#2  0x00007f4e5d2d4751 in pa_mainloop_poll () at /usr/lib/libpulse.so.0
#3  0x00007f4e5d2deafd in pa_mainloop_iterate () at /usr/lib/libpulse.so.0
#4  0x00007f4e5d2debb1 in pa_mainloop_run () at /usr/lib/libpulse.so.0
#5  0x00007f4e5d2ef322 in  () at /usr/lib/libpulse.so.0
#6  0x00007f4e5c31e1c7 in  () at /usr/lib/pulseaudio/libpulsecommon-15.0.so
#7  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#8  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 8 (Thread 0x7f4e55504640 (LWP 926) "waybar"):
#0  0x00007f4e5cdb818e in recv () at /usr/lib/libc.so.6
#1  0x000055985600456b in waybar::modules::sway::Ipc::recv(int) ()
#2  0x0000559856004bb4 in waybar::modules::sway::Ipc::handleEvent() ()
#3  0x0000559856011ad6 in std::_Function_handler<void (), waybar::modules::sway::Window::Window(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, waybar::Bar const&, Json::Value const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#4  0x0000559855fcbaa1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() ()
#5  0x00007f4e5d0864d4 in std::execute_native_thread_routine(void*) (__p=0x559857cba230) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#6  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#7  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 7 (Thread 0x7f4e55d05640 (LWP 924) "waybar"):
#0  0x00007f4e5cdb818e in recv () at /usr/lib/libc.so.6
#1  0x000055985600456b in waybar::modules::sway::Ipc::recv(int) ()
#2  0x0000559856004bb4 in waybar::modules::sway::Ipc::handleEvent() ()
#3  0x00005598560091bd in std::_Function_handler<void (), waybar::modules::sway::Mode::Mode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Json::Value const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#4  0x0000559855fcbaa1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() ()
#5  0x00007f4e5d0864d4 in std::execute_native_thread_routine(void*) (__p=0x559857c774c0) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#6  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#7  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 6 (Thread 0x7f4e56506640 (LWP 923) "waybar"):
#0  0x00007f4e5cdb818e in recv () at /usr/lib/libc.so.6
#1  0x000055985600456b in waybar::modules::sway::Ipc::recv(int) ()
#2  0x0000559856004bb4 in waybar::modules::sway::Ipc::handleEvent() ()
#3  0x000055985602b9d3 in std::_Function_handler<void (), waybar::modules::sway::Workspaces::Workspaces(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, waybar::Bar const&, Json::Value const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) ()
#4  0x0000559855fcbaa1 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<waybar::util::SleeperThread::operator=(std::function<void ()>)::{lambda()#1}> > >::_M_run() ()
#5  0x00007f4e5d0864d4 in std::execute_native_thread_routine(void*) (__p=0x559857bad320) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#6  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#7  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7f4e56f1e640 (LWP 873) "dconf worker"):
#0  0x00007f4e5cdaa2af in poll () at /usr/lib/libc.so.6
#1  0x00007f4e5d3fb086 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f4e5d3a2455 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f4e5e753ebe in  () at /usr/lib/gio/modules/libdconfsettings.so
#4  0x00007f4e5d3d4815 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#6  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7f4e57754640 (LWP 872) "gdbus"):
#0  0x00007f4e5cdaa2af in poll () at /usr/lib/libc.so.6
#1  0x00007f4e5d3fb086 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f4e5d3a4433 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#3  0x00007f4e5d6a114c in  () at /usr/lib/libgio-2.0.so.0
#4  0x00007f4e5d3d4815 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#6  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7f4e58756640 (LWP 870) "gmain"):
#0  0x00007f4e5cdaa2af in poll () at /usr/lib/libc.so.6
#1  0x00007f4e5d3fb086 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f4e5d3a2455 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f4e5d3a24a2 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007f4e5d3d4815 in  () at /usr/lib/libglib-2.0.so.0
#5  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#6  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7f4e59297640 (LWP 869) "waybar"):
#0  0x00007f4e5cce724a in sigtimedwait () at /usr/lib/libc.so.6
#1  0x00007f4e5cce68ec in sigwait () at /usr/lib/libc.so.6
#2  0x0000559855fd2594 in signalThread(void*) ()
#3  0x00007f4e5cd315c2 in start_thread () at /usr/lib/libc.so.6
#4  0x00007f4e5cdb6584 in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7f4e5929d240 (LWP 824) "waybar"):
#0  0x00007f4e5cdaa2af in poll () at /usr/lib/libc.so.6
#1  0x00007f4e5d3fb086 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f4e5d3a2455 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f4e5d6746ee in g_application_run () at /usr/lib/libgio-2.0.so.0
#4  0x0000559855fe00df in waybar::Client::main(int, char**) ()
#5  0x0000559855fd2895 in main ()
``
tsdh commented 2 years ago

Here's another backtrace from a freeze. gdb.txt

alkar commented 2 years ago

Thanks for #1522 @FlexW!

However, you also mentioned:

EDIT: I'm not entirely sure it will solve https://github.com/Alexays/Waybar/issues/1464.

Could you share a bit more information?

FlexW commented 2 years ago

@alkar I could confirm the freeze, but not the 100% CPU usage. Therefore I'm not sure if it also went away. Best would be if you test it and report back if the problem is gone:)

KorigamiK commented 1 year ago

@alkar I could confirm the freeze, but not the 100% CPU usage. Therefore I'm not sure if it also went away. Best would be if you test it and report back if the problem is gone:)

Hi, I have been experiencing this issue as well. The issue doesn't seem to be fixed yet

angel-gruevski commented 11 months ago

Same, waybar consumer 100% of all my cores. If I disable it, CPU usage drops significantly.

wjoel commented 11 months ago

I see this every once in a while at work on a laptop with Waybar v0.9.22, Sway 1.8.1, Fedora 39 (I also saw it on Fedora 38), an older XPS13 with Intel iGPU, and a second monitor attached via USB-C. It's a laptop, so that second monitor does get detached and reattached every once in a while, in case that's relevant, but I haven't seen any direct connection between the 100% CPU and this happening (it happened now, and the laptop has been plugged in the whole day).

This time I noticed that the clock had stopped updating on the built-in screen, but it was still updating on the external screen.

I have a similar setup at home (Fedora 39, etc.) with Nvidia and 2x 4k screens and a 4k TV which is mostly turned off (so similar to unplugging, I suppose?), and never had any issues with Waybar.