aristocratos / btop

A monitor of resources
Apache License 2.0
21.34k stars 654 forks source link

[BUG] Btop freezes when booting if logfile is large #852

Open kernaltrap8 opened 6 months ago

kernaltrap8 commented 6 months ago

Read the README.md and search for similar issues before posting a bug report!

Any bug that can be solved by just reading the prerequisites section of the README will likely be ignored.

Describe the bug

Upon launching Btop, sometimes (around 4/10 times), it will freeze at this screen: image Deleting the btop log resolved the hanging issue. The logfile was 1MB or so in size.

To Reproduce

Launch Btop with a large logfile present in ~/.config/btop

Expected behavior

Btop should start as normal.

Screenshots

[If applicable, add screenshots to help explain your problem.]

Info (please complete the following information):

Additional context

Contents of ~/.config/btop/btop.log

Note: The snap uses: ~/snap/btop/current/.config/btop

(try running btop with --debug flag if btop.log is empty)

GDB Backtrace

If btop++ is crashing at start the following steps could be helpful:

(Extra helpful if compiled with make OPTFLAGS="-O0 -g")

  1. run (linux): gdb btop (macos): lldb btop

  2. r to run, wait for crash and press enter if prompted, CTRL+L to clear screen if needed.

  3. (gdb): thread apply all bt (lldb): bt all to get backtrace for all threads

  4. Copy and paste the backtrace here:

kernaltrap8 commented 6 months ago

okay seems i was sort of wrong. here is a logfile, it seems to hang starting the "runner thread".

2024/05/14 (18:54:38) | ===> btop++ v.1.3.2
2024/05/14 (18:54:38) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (18:54:38) | WARNING: ROCm SMI: Failed to get GPU power usage
2024/05/14 (18:54:45) | ERROR: Stall in Runner thread, restarting!
2024/05/14 (18:54:50) | ERROR: Stall in Runner thread, restarting!
2024/05/14 (18:54:56) | ERROR: Stall in Runner thread, restarting!
kernaltrap8 commented 6 months ago

heres a bigger log, its sorta intermittent


2024/05/14 (18:54:38) | ===> btop++ v.1.3.2
2024/05/14 (18:54:38) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (18:54:38) | WARNING: ROCm SMI: Failed to get GPU power usage
2024/05/14 (18:54:45) | ERROR: Stall in Runner thread, restarting!
2024/05/14 (18:54:50) | ERROR: Stall in Runner thread, restarting!
2024/05/14 (18:54:56) | ERROR: Stall in Runner thread, restarting!

2024/05/14 (18:57:42) | ===> btop++ v.1.3.2
2024/05/14 (18:57:42) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (18:57:42) | WARNING: ROCm SMI: Failed to get GPU power usage
2024/05/14 (18:57:48) | ERROR: Stall in Runner thread, restarting!
2024/05/14 (18:57:54) | ERROR: Stall in Runner thread, restarting!

2024/05/14 (18:58:03) | ===> btop++ v.1.3.2
2024/05/14 (18:58:03) | DEBUG: Running in DEBUG mode!
2024/05/14 (18:58:03) | INFO: Logger set to DEBUG
2024/05/14 (18:58:03) | DEBUG: Using locale en_US.utf8
2024/05/14 (18:58:03) | INFO: Running on /dev/pts/3
2024/05/14 (18:58:03) | INFO: Failed to load libnvidia-ml.so, NVIDIA GPUs will not be detected: libnvidia-ml.so.1: cannot open shared object file: No such file or directory
2024/05/14 (18:58:03) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (18:58:03) | WARNING: ROCm SMI: Failed to get GPU power usage
2024/05/14 (18:58:04) | DEBUG: Shared::init() : Initialized.
2024/05/14 (18:58:04) | DEBUG: Loading theme file: /usr/share/btop/themes/horizon.theme
2024/05/14 (18:58:10) | ERROR: Stall in Runner thread, restarting!
2024/05/14 (18:58:16) | ERROR: Stall in Runner thread, restarting!
2024/05/14 (18:58:16) | INFO: Quitting! Runtime: 00:00:13

2024/05/14 (18:58:20) | ===> btop++ v.1.3.2
2024/05/14 (18:58:20) | DEBUG: Running in DEBUG mode!
2024/05/14 (18:58:20) | INFO: Logger set to DEBUG
2024/05/14 (18:58:20) | DEBUG: Using locale en_US.utf8
2024/05/14 (18:58:20) | INFO: Running on /dev/pts/3
2024/05/14 (18:58:20) | INFO: Failed to load libnvidia-ml.so, NVIDIA GPUs will not be detected: libnvidia-ml.so.1: cannot open shared object file: No such file or directory
2024/05/14 (18:58:20) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (18:58:20) | WARNING: ROCm SMI: Failed to get GPU power usage
2024/05/14 (18:58:21) | DEBUG: Shared::init() : Initialized.
2024/05/14 (18:58:21) | DEBUG: Loading theme file: /usr/share/btop/themes/horizon.theme
2024/05/14 (18:58:26) | ERROR: Stall in Runner thread, restarting!

2024/05/14 (18:58:44) | ===> btop++ v.1.3.2
2024/05/14 (18:58:44) | DEBUG: Running in DEBUG mode!
2024/05/14 (18:58:44) | INFO: Logger set to DEBUG
2024/05/14 (18:58:44) | DEBUG: Using locale en_US.utf8
2024/05/14 (18:58:44) | INFO: Running on /dev/pts/1
2024/05/14 (18:58:44) | INFO: Failed to load libnvidia-ml.so, NVIDIA GPUs will not be detected: libnvidia-ml.so.1: cannot open shared object file: No such file or directory
2024/05/14 (18:58:44) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (18:58:44) | WARNING: ROCm SMI: Failed to get GPU power usage
2024/05/14 (18:58:45) | DEBUG: Shared::init() : Initialized.
2024/05/14 (18:58:45) | DEBUG: Loading theme file: /usr/share/btop/themes/horizon.theme

2024/05/14 (18:58:53) | ===> btop++ v.1.3.2
2024/05/14 (18:58:53) | DEBUG: Running in DEBUG mode!
2024/05/14 (18:58:53) | INFO: Logger set to DEBUG
2024/05/14 (18:58:53) | DEBUG: Using locale en_US.utf8
2024/05/14 (18:58:53) | INFO: Running on /dev/pts/1
2024/05/14 (18:58:53) | INFO: Failed to load libnvidia-ml.so, NVIDIA GPUs will not be detected: libnvidia-ml.so.1: cannot open shared object file: No such file or directory
2024/05/14 (18:58:53) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (18:58:53) | WARNING: ROCm SMI: Failed to get GPU power usage
2024/05/14 (18:58:54) | DEBUG: Shared::init() : Initialized.
2024/05/14 (18:58:54) | DEBUG: Loading theme file: /usr/share/btop/themes/horizon.theme
2024/05/14 (18:59:00) | ERROR: Stall in Runner thread, restarting!
2024/05/14 (18:59:00) | INFO: Quitting! Runtime: 00:00:07

2024/05/14 (18:59:01) | ===> btop++ v.1.3.2
2024/05/14 (18:59:01) | DEBUG: Running in DEBUG mode!
2024/05/14 (18:59:01) | INFO: Logger set to DEBUG
2024/05/14 (18:59:01) | DEBUG: Using locale en_US.utf8
2024/05/14 (18:59:01) | INFO: Running on /dev/pts/1
2024/05/14 (18:59:01) | INFO: Failed to load libnvidia-ml.so, NVIDIA GPUs will not be detected: libnvidia-ml.so.1: cannot open shared object file: No such file or directory
2024/05/14 (18:59:01) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (18:59:01) | WARNING: ROCm SMI: Failed to get GPU power usage
2024/05/14 (18:59:02) | DEBUG: Shared::init() : Initialized.
2024/05/14 (18:59:02) | DEBUG: Loading theme file: /usr/share/btop/themes/horizon.theme
2024/05/14 (18:59:06) | INFO: Quitting! Runtime: 00:00:05
kernaltrap8 commented 6 months ago

now its working every time i start it. wtf is going on here

2024/05/14 (19:01:50) | ===> btop++ v.1.3.2
2024/05/14 (19:01:50) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (19:01:50) | WARNING: ROCm SMI: Failed to get GPU power usage

2024/05/14 (19:02:03) | ===> btop++ v.1.3.2
2024/05/14 (19:02:03) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (19:02:03) | WARNING: ROCm SMI: Failed to get GPU power usage

2024/05/14 (19:02:09) | ===> btop++ v.1.3.2
2024/05/14 (19:02:09) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (19:02:09) | WARNING: ROCm SMI: Failed to get GPU power usage

2024/05/14 (19:02:14) | ===> btop++ v.1.3.2
2024/05/14 (19:02:14) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (19:02:14) | WARNING: ROCm SMI: Failed to get GPU power usage

2024/05/14 (19:02:19) | ===> btop++ v.1.3.2
2024/05/14 (19:02:19) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (19:02:19) | WARNING: ROCm SMI: Failed to get GPU power usage

2024/05/14 (19:02:24) | ===> btop++ v.1.3.2
2024/05/14 (19:02:24) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (19:02:24) | WARNING: ROCm SMI: Failed to get GPU power usage

2024/05/14 (19:02:30) | ===> btop++ v.1.3.2
2024/05/14 (19:02:30) | DEBUG: Running in DEBUG mode!
2024/05/14 (19:02:30) | INFO: Logger set to DEBUG
2024/05/14 (19:02:30) | DEBUG: Using locale en_US.utf8
2024/05/14 (19:02:30) | INFO: Running on /dev/pts/2
2024/05/14 (19:02:30) | INFO: Failed to load libnvidia-ml.so, NVIDIA GPUs will not be detected: libnvidia-ml.so.1: cannot open shared object file: No such file or directory
2024/05/14 (19:02:30) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (19:02:30) | WARNING: ROCm SMI: Failed to get GPU power usage
2024/05/14 (19:02:31) | DEBUG: Shared::init() : Initialized.
2024/05/14 (19:02:31) | DEBUG: Loading theme file: /usr/share/btop/themes/horizon.theme
2024/05/14 (19:02:35) | INFO: Quitting! Runtime: 00:00:05

2024/05/14 (19:03:37) | ===> btop++ v.1.3.2
2024/05/14 (19:03:37) | DEBUG: Running in DEBUG mode!
2024/05/14 (19:03:37) | INFO: Logger set to DEBUG
2024/05/14 (19:03:37) | DEBUG: Using locale en_US.utf8
2024/05/14 (19:03:37) | INFO: Running on /dev/pts/2
2024/05/14 (19:03:37) | INFO: Failed to load libnvidia-ml.so, NVIDIA GPUs will not be detected: libnvidia-ml.so.1: cannot open shared object file: No such file or directory
2024/05/14 (19:03:37) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (19:03:37) | WARNING: ROCm SMI: Failed to get GPU power usage
2024/05/14 (19:03:38) | DEBUG: Shared::init() : Initialized.
2024/05/14 (19:03:38) | DEBUG: Loading theme file: /usr/share/btop/themes/horizon.theme
2024/05/14 (19:03:42) | INFO: Quitting! Runtime: 00:00:05

2024/05/14 (19:06:44) | ===> btop++ v.1.3.2
2024/05/14 (19:06:44) | DEBUG: Running in DEBUG mode!
2024/05/14 (19:06:44) | INFO: Logger set to DEBUG
2024/05/14 (19:06:44) | DEBUG: Using locale en_US.utf8
2024/05/14 (19:06:44) | INFO: Running on /dev/pts/3
2024/05/14 (19:06:44) | INFO: Failed to load libnvidia-ml.so, NVIDIA GPUs will not be detected: libnvidia-ml.so.1: cannot open shared object file: No such file or directory
2024/05/14 (19:06:44) | WARNING: ROCm SMI: Failed to get maximum GPU temperature, defaulting to 110°C
2024/05/14 (19:06:44) | WARNING: ROCm SMI: Failed to get GPU power usage
2024/05/14 (19:06:45) | DEBUG: Shared::init() : Initialized.
2024/05/14 (19:06:45) | DEBUG: Loading theme file: /usr/share/btop/themes/horizon.theme
2024/05/14 (19:06:48) | INFO: Quitting! Runtime: 00:00:04