High CPU usage #61

Closed
opened 6 months ago by mitinarseny · 11 comments

I've noticed, that yambar occasionally starts to consume more than 100% of my CPU (I found it out with htop).

In my config I use following modules:

  • river
  • alsa
  • battery
  • network
  • clock

What can it be related with?

I understand, there is a very little information about the problem, but I do not know, how to help you investigate it. Where to dig?

I've noticed, that yambar occasionally starts to consume more than 100% of my CPU (I found it out with `htop`). In my config I use following modules: * river * alsa * battery * network * clock What can it be related with? I understand, there is a very little information about the problem, but I do not know, how to help you investigate it. Where to dig?
Owner

My guess would be river, because it's most likely the least tested one.

As for how to debug this; right now, the easiest way is to remove one module at a time, and see when the issue goes away.

On my end, I'll update yambar to set the thread names. When that's done, you'll be able to see which module is burning CPU in e.g. htop.

My guess would be `river`, because it's most likely the least tested one. As for how to debug this; right now, the easiest way is to remove one module at a time, and see when the issue goes away. On my end, I'll update yambar to set the thread names. When that's done, you'll be able to see which module is burning CPU in e.g. htop.
dnkl added the
bug
label 6 months ago
Owner

If you build the latest git version, the threads will have more descriptive names. Using e.g. htop, make sure threads are being viewed (F5), you'll now be able to see which module is burning CPU:

https://codeberg.org/attachments/eab8608c-4269-4a00-8b32-acb7ba4bbd60

If you build the latest git version, the threads will have more descriptive names. Using e.g. `htop`, make sure threads are being viewed (<kbd>F5</kbd>), you'll now be able to see which module is burning CPU: ![https://codeberg.org/attachments/eab8608c-4269-4a00-8b32-acb7ba4bbd60](https://codeberg.org/attachments/eab8608c-4269-4a00-8b32-acb7ba4bbd60)
Poster

This just happened after I detached my HDMI monitor and launched yambar:

$ yambar
info: fcft.c:257: fcft: 2.3.3 +graphemes
info: fcft.c:267: fontconfig: 2.13.1
info: fcft.c:273: freetype: 2.10.4
info: fcft.c:717: /usr/share/fonts/TTF/SawarabiGothic-Regular.ttf: size=12.00pt/12px, dpi=75.00
info: fcft.c:717: /usr/share/fonts/TTF/FiraCode-Regular.ttf: size=13.44pt/14px, dpi=75.00
info: fcft.c:717: /usr/share/fonts/OTF/Font Awesome 5 Free-Solid-900.otf: size=13.44pt/14px, dpi=75.00
info: bar/wayland.c:447: monitor: eDP-1: 1920x1080+0+0 (310x170mm)
info: modules/network.c:200: wlo1: ifindex=2
 dbg: modules/river.c:217: output: (null): occupied tags: 0xf
 dbg: modules/river.c:189: output: (null): focused tags: 0x00000001
 dbg: modules/river.c:323: seat: default: focused output: eDP-1
 dbg: modules/river.c:370: seat: default: focused view: main:1:zsh - "mitinarseny: yambar"
 dbg: modules/river.c:217: output: (null): occupied tags: 0xf
 dbg: modules/river.c:189: output: (null): focused tags: 0x00000001
 dbg: modules/river.c:323: seat: default: focused output: eDP-1
 dbg: modules/river.c:370: seat: default: focused view: main:1:zsh - "mitinarseny: yambar"
zsh: segmentation fault  yambar
This just happened after I detached my HDMI monitor and launched yambar: ```sh $ yambar info: fcft.c:257: fcft: 2.3.3 +graphemes info: fcft.c:267: fontconfig: 2.13.1 info: fcft.c:273: freetype: 2.10.4 info: fcft.c:717: /usr/share/fonts/TTF/SawarabiGothic-Regular.ttf: size=12.00pt/12px, dpi=75.00 info: fcft.c:717: /usr/share/fonts/TTF/FiraCode-Regular.ttf: size=13.44pt/14px, dpi=75.00 info: fcft.c:717: /usr/share/fonts/OTF/Font Awesome 5 Free-Solid-900.otf: size=13.44pt/14px, dpi=75.00 info: bar/wayland.c:447: monitor: eDP-1: 1920x1080+0+0 (310x170mm) info: modules/network.c:200: wlo1: ifindex=2 dbg: modules/river.c:217: output: (null): occupied tags: 0xf dbg: modules/river.c:189: output: (null): focused tags: 0x00000001 dbg: modules/river.c:323: seat: default: focused output: eDP-1 dbg: modules/river.c:370: seat: default: focused view: main:1:zsh - "mitinarseny: yambar" dbg: modules/river.c:217: output: (null): occupied tags: 0xf dbg: modules/river.c:189: output: (null): focused tags: 0x00000001 dbg: modules/river.c:323: seat: default: focused output: eDP-1 dbg: modules/river.c:370: seat: default: focused view: main:1:zsh - "mitinarseny: yambar" zsh: segmentation fault yambar ```
Owner

Can you get a debug backtrace of that? That output alone is unfortunately not very helpful. But a full backtrace from a debug build will likely be able to tell us exactly what's wrong.

Can you get a debug backtrace of that? That output alone is unfortunately not very helpful. But a full backtrace from a debug build will likely be able to tell us exactly what's wrong.
Poster

The same result can be achieved with following steps:

  1. start pipewire
  2. start yambar
  3. kill pipewire
The same result can be achieved with following steps: 1. start pipewire 1. start yambar 1. kill pipewire
Owner

Is the crash at all related to the high CPU usage? If not, can you open a separate issue for that?

For the high CPU usage, can check the threads in htop, to see which module (or the bar itself) that is reponsible?

Is the crash at all related to the high CPU usage? If not, can you open a separate issue for that? For the high CPU usage, can check the threads in htop, to see which module (or the bar itself) that is reponsible?
dnkl closed this issue 4 months ago
Poster

Can't wait for upgraded yambar version with this fix to hit the void linux repositories to try if it fixes the problem

Can't wait for upgraded `yambar` version with this fix to hit the void linux repositories to try if it fixes the problem
Poster

Is it planned to release a new version with this fix anytime soon?

Is it planned to release a new version with this fix anytime soon?
mitinarseny reopened this issue 3 months ago

If you build the latest git version, the threads will have more descriptive names. Using e.g. htop, make sure threads are being viewed (F5), you'll now be able to see which module is burning CPU:

https://codeberg.org/attachments/eab8608c-4269-4a00-8b32-acb7ba4bbd60

I'm sorry to ask it here, but... Which font is that? :o

> If you build the latest git version, the threads will have more descriptive names. Using e.g. `htop`, make sure threads are being viewed (<kbd>F5</kbd>), you'll now be able to see which module is burning CPU: > > ![https://codeberg.org/attachments/eab8608c-4269-4a00-8b32-acb7ba4bbd60](https://codeberg.org/attachments/eab8608c-4269-4a00-8b32-acb7ba4bbd60) I'm sorry to ask it here, but... Which font is that? :o
Owner

Is it planned to release a new version with this fix anytime soon?

@mitinarseny as usual, there's no dates. But I think we can do a release when the two most recent PRs have been merged.

I'm sorry to ask it here, but... Which font is that? :o

@marcosrdac Dina

> Is it planned to release a new version with this fix anytime soon? @mitinarseny as usual, there's no dates. But I think we can do a release when the two most recent PRs have been merged. > I'm sorry to ask it here, but... Which font is that? :o @marcosrdac [Dina](https://www.dcmembers.com/jibsen/download/61/)
Owner

1.7.0 has been released.

[1.7.0](https://codeberg.org/dnkl/yambar/releases/tag/1.7.0) has been released.
dnkl closed this issue 3 months ago
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.