Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 637294

Summary: sys-process/htop-2.0.2: "cripples" ./.config/htop/htoprc config file
Product: Gentoo Linux Reporter: Tomas Thiemel <thiemel>
Component: Current packagesAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED FIXED    
Severity: normal CC: tsmksubc
Priority: Lowest    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Tomas Thiemel 2017-11-13 00:13:32 UTC
From time to time, htop 2.0.2 "cripples" CPU info as per diff below. Don't know why :-(

# diff -Naur ./.config/htop/htoprc.bak ./.config/htop/htoprc
--- ./.config/htop/htoprc.bak   2017-10-20 20:52:07.780245104 +0200
+++ ./.config/htop/htoprc       2017-11-13 01:01:39.525777303 +0100
@@ -20,7 +20,7 @@
 account_guest_in_cpu_meter=1
 color_scheme=0
 delay=30
-left_meters=CPU(1) CPU(3) CPU(5) CPU(7) Memory Swap Clock
+left_meters=CPU CPU CPU CPU Memory Swap Clock
 left_meter_modes=1 1 1 1 1 1 2
-right_meters=CPU(2) CPU(4) CPU(6) CPU(8) Tasks LoadAverage Uptime
+right_meters=CPU CPU CPU CPU Tasks LoadAverage Uptime
 right_meter_modes=1 1 1 1 2 2 2
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-04-28 11:22:36 UTC
Is this still an issue with =sys-process/htop-2.2.0 release?
Comment 2 Tomas Thiemel 2019-04-29 19:03:38 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #1)
> Is this still an issue with =sys-process/htop-2.2.0 release?

Yes, still happens ocasionally. In =sys-process/htop-2.2.0 too :-(
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-05-03 16:51:57 UTC
Can you perhaps attach screenshots? One "before" and one "after" the crippling would be sufficient.
Comment 4 Tomas Thiemel 2019-05-13 14:04:54 UTC
Hi,
after "heavy testing" the bug did not occur for some (long) time. Weird. It may be related to (my) specific OS configuration.

Let's assume it has been fixed.

Thank you.
Comment 5 Tomas Thiemel 2019-08-06 13:22:51 UTC
Hi,
finally I was able to reproduce the bug 🤓️

1)
# htop --version
htop 2.2.0 - (C) 2004-2019 Hisham Muhammad


2)
# cat /root/.config/htop/htoprc
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=1
shadow_other_users=1
show_thread_names=1
show_program_path=1
highlight_base_name=1
highlight_megabytes=1
highlight_threads=1
tree_view=1
header_margin=1
detailed_cpu_time=1
cpu_count_from_zero=0
update_process_names=0
account_guest_in_cpu_meter=1
color_scheme=0
delay=30
left_meters=CPU CPU CPU CPU Memory Swap Clock
left_meter_modes=1 1 1 1 1 2 2
right_meters=CPU CPU CPU CPU Tasks LoadAverage Uptime
right_meter_modes=1 1 1 1 2 2 2


3)
Now:
- run htop
- change the view (e.g. press "F5" or press "P")
- quit htop BEFORE the screen is refreshed (less than 3 sec)

4)
Voilà, config is "crippled":

# cat /root/.config/htop/htoprc
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=1
shadow_other_users=1
show_thread_names=1
show_program_path=1
highlight_base_name=1
highlight_megabytes=1
highlight_threads=1
tree_view=1
header_margin=1
detailed_cpu_time=1
cpu_count_from_zero=0
update_process_names=0
account_guest_in_cpu_meter=1
color_scheme=0
delay=30
left_meters=CPU CPU CPU CPU Memory Swap Clock
left_meter_modes=1 1 1 1 1 2 2
right_meters=CPU CPU CPU CPU Tasks LoadAverage Uptime
right_meter_modes=1 1 1 1 2 2 2
Comment 6 Tomas Thiemel 2019-08-06 13:25:23 UTC
Sorry for error, here is "uncrippled" version: 😔️

# cat /root/.config/htop/htoprc
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=1
shadow_other_users=1
show_thread_names=1
show_program_path=1
highlight_base_name=1
highlight_megabytes=1
highlight_threads=1
tree_view=0
header_margin=1
detailed_cpu_time=1
cpu_count_from_zero=0
update_process_names=0
account_guest_in_cpu_meter=1
color_scheme=0
delay=30
left_meters=CPU(1) CPU(3) CPU(5) CPU(7) Memory Swap Clock
left_meter_modes=1 1 1 1 1 2 2
right_meters=CPU(2) CPU(4) CPU(6) CPU(8) Tasks LoadAverage Uptime
right_meter_modes=1 1 1 1 2 2 2


(In reply to Tomas Thiemel from comment #5)
> Hi,
> finally I was able to reproduce the bug 🤓️
> 
> 1)
> # htop --version
> htop 2.2.0 - (C) 2004-2019 Hisham Muhammad
> 
> 
> 2)
> # cat /root/.config/htop/htoprc
> # Beware! This file is rewritten by htop when settings are changed in the
> interface.
> # The parser is also very primitive, and not human-friendly.
> fields=0 48 17 18 38 39 40 2 46 47 49 1
> sort_key=46
> sort_direction=1
> hide_threads=0
> hide_kernel_threads=1
> hide_userland_threads=1
> shadow_other_users=1
> show_thread_names=1
> show_program_path=1
> highlight_base_name=1
> highlight_megabytes=1
> highlight_threads=1
> tree_view=1
> header_margin=1
> detailed_cpu_time=1
> cpu_count_from_zero=0
> update_process_names=0
> account_guest_in_cpu_meter=1
> color_scheme=0
> delay=30
> left_meters=CPU CPU CPU CPU Memory Swap Clock
> left_meter_modes=1 1 1 1 1 2 2
> right_meters=CPU CPU CPU CPU Tasks LoadAverage Uptime
> right_meter_modes=1 1 1 1 2 2 2
> 
> 
> 3)
> Now:
> - run htop
> - change the view (e.g. press "F5" or press "P")
> - quit htop BEFORE the screen is refreshed (less than 3 sec)
> 
> 4)
> Voilà, config is "crippled":
> 
> # cat /root/.config/htop/htoprc
> # Beware! This file is rewritten by htop when settings are changed in the
> interface.
> # The parser is also very primitive, and not human-friendly.
> fields=0 48 17 18 38 39 40 2 46 47 49 1
> sort_key=46
> sort_direction=1
> hide_threads=0
> hide_kernel_threads=1
> hide_userland_threads=1
> shadow_other_users=1
> show_thread_names=1
> show_program_path=1
> highlight_base_name=1
> highlight_megabytes=1
> highlight_threads=1
> tree_view=1
> header_margin=1
> detailed_cpu_time=1
> cpu_count_from_zero=0
> update_process_names=0
> account_guest_in_cpu_meter=1
> color_scheme=0
> delay=30
> left_meters=CPU CPU CPU CPU Memory Swap Clock
> left_meter_modes=1 1 1 1 1 2 2
> right_meters=CPU CPU CPU CPU Tasks LoadAverage Uptime
> right_meter_modes=1 1 1 1 2 2 2
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2022-01-14 09:01:37 UTC
Is this still an issue with htop-3.x series?
Comment 8 Tomas Thiemel 2022-01-14 09:24:23 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #7)
> Is this still an issue with htop-3.x series?

The problem has been fixed in htop-3.x (3.0.5-r2). 
Thank you.