btop: [BUG] ERROR: Exception in runner thread -> Cpu:: -> graphs, clock, meter : unordered_map::at

Just compiled and installed the latest code from github on my old desktop PC:

git clone https://github.com/aristocratos/btop.git
cd btop
make
sudo make install

But when I start, it crashes after 1-2 seconds. The error depends on terminal window size:

$ stty size
25 158

$ btop
ERROR: Exception in runner thread -> Cpu:: -> graphs, clock, meter : unordered_map::at

$ stty size
54 158

$ btop
ERROR: Exception in runner thread -> Cpu:: -> graphs, clock, meter : vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)

I suspect this happens may be due to present GPU with OpenCL on that machine, because on raspberry pi the same btop version works ok.

Here is similar issue which is marked as fixed and closed: https://github.com/aristocratos/btop/issues/162

Info

System: Linux Arch running on i5 760 with GTX460.

$ btop --version
btop version: 1.3.2+e4f69cd
Compiled with: g++ (14.1.1)
Configured with: make STATIC= FORTIFY_SOURCE=true GPU_SUPPORT=true RSMI_STATIC=

$ uname -a
Linux arch 6.9.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 31 May 2024 15:14:45 +0000 x86_64 GNU/Linux

Terminal: lxterminal (raspberry pi os) Font: Monospace Regular 10

log

cat ~/.config/btop/btop.log:

2024/07/30 (19:32:26) | ===> btop++ v.1.3.2
2024/07/30 (19:32:26) | WARNING: NVML: Failed to get maximum GPU power draw, defaulting to 225W: Not Supported
2024/07/30 (19:32:26) | WARNING: NVML: Failed to get maximum GPU temperature, defaulting to 110°C: Not Supported
2024/07/30 (19:32:26) | WARNING: NVML: Failed to get GPU utilization: Not Supported
2024/07/30 (19:32:26) | WARNING: NVML: Failed to get GPU clock speed: Not Supported
2024/07/30 (19:32:26) | WARNING: NVML: Failed to get VRAM clock speed: Not Supported
2024/07/30 (19:32:26) | WARNING: NVML: Failed to get PCIe TX throughput: Not Supported
2024/07/30 (19:32:26) | WARNING: NVML: Failed to get GPU power usage: Not Supported
2024/07/30 (19:32:26) | WARNING: NVML: Failed to get PCIe RX throughput: Not Supported
2024/07/30 (19:32:28) | ERROR: Exception in runner thread -> Cpu:: -> graphs, clock, meter : unordered_map::at

2024/07/30 (19:32:41) | ===> btop++ v.1.3.2
2024/07/30 (19:32:41) | WARNING: NVML: Failed to get maximum GPU power draw, defaulting to 225W: Not Supported
2024/07/30 (19:32:41) | WARNING: NVML: Failed to get maximum GPU temperature, defaulting to 110°C: Not Supported
2024/07/30 (19:32:41) | WARNING: NVML: Failed to get GPU utilization: Not Supported
2024/07/30 (19:32:41) | WARNING: NVML: Failed to get GPU clock speed: Not Supported
2024/07/30 (19:32:41) | WARNING: NVML: Failed to get VRAM clock speed: Not Supported
2024/07/30 (19:32:41) | WARNING: NVML: Failed to get PCIe TX throughput: Not Supported
2024/07/30 (19:32:41) | WARNING: NVML: Failed to get GPU power usage: Not Supported
2024/07/30 (19:32:41) | WARNING: NVML: Failed to get PCIe RX throughput: Not Supported
2024/07/30 (19:32:43) | ERROR: Exception in runner thread -> Cpu:: -> graphs, clock, meter : vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)

When I set show_gpu_info = "Off" in ~/.config/btop/btop.conf, btop works with no error, but it don’t shows gpu info…

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 9
  • Comments: 16

Most upvoted comments

When I set show_gpu_info = "Off" in ~/.config/btop/btop.conf, btop works with no error, but it don’t shows gpu info…

I’d mark this as solution, as btop at least works now

same issue with gtx 780 ti on nvidia 470 proprietary drivers

$ btop --version btop version: 1.4.0 Compiled with: g++ (14.2.1) Configured with: cmake -DBTOP_STATIC=OFF -DBTOP_USE_MOLD=OFF -DBTOP_FORTIFY=ON -DBTOP_GPU=ON

here’s my btop.nix:

{ pkgs, ... }:
{
  programs.btop = {
    enable = true;
    package = pkgs.btop.override {
      cudaSupport = true;
    };
  };
}

if i add programs.btop.settings.show_gpu_info = "Off", then btop works normally

Do a delete of your btop config files:

rm -rf ~/.config/btop/

Then try again, that work for me, I was moving from another pc.

same issue here

Same issue on GTX 650, Ubuntu 24.04.2 LTS x86_64

Setting show_gpu_info = "Off" in the config resolved, though it would be nice for GPU info to work in the future!

Same issue,

2024/09/02 (12:17:10) | ===> btop++ v.1.3.2
2024/09/02 (12:17:10) | DEBUG: Running in DEBUG mode!
2024/09/02 (12:17:10) | INFO: Logger set to DEBUG
2024/09/02 (12:17:10) | DEBUG: Setting LC_ALL=en_US.UTF-8
2024/09/02 (12:17:10) | INFO: Running on /dev/pts/4
2024/09/02 (12:17:10) | WARNING: NVML: Failed to get maximum GPU power draw, defaulting to 225W: Not Supported
2024/09/02 (12:17:10) | WARNING: NVML: Failed to get maximum GPU temperature, defaulting to 110°C: Not Supported
2024/09/02 (12:17:10) | WARNING: NVML: Failed to get GPU utilization: Not Supported
2024/09/02 (12:17:10) | WARNING: NVML: Failed to get GPU clock speed: Not Supported
2024/09/02 (12:17:10) | WARNING: NVML: Failed to get VRAM clock speed: Not Supported
2024/09/02 (12:17:10) | WARNING: NVML: Failed to get GPU power usage: Not Supported
2024/09/02 (12:17:10) | WARNING: NVML: Failed to get PCIe TX throughput: Not Supported
2024/09/02 (12:17:10) | WARNING: NVML: Failed to get PCIe RX throughput: Not Supported
2024/09/02 (12:17:10) | INFO: Failed to load librocm_smi64.so, AMD GPUs will not be detected: librocm_smi64.so.6: cannot open shared object file: No such file or directory
2024/09/02 (12:17:10) | DEBUG: Shared::init() : Initialized.
2024/09/02 (12:17:12) | ERROR: Exception in runner thread -> Cpu:: -> graphs, clock, meter : unordered_map::at
2024/09/02 (12:17:12) | INFO: Quitting! Runtime: 00:00:02

Nvidia GT 730

Same issue with Nvidia GT 730

btop --version btop version: 1.4.0 Compiled with: g++ (14.2.1) Configured with: make STATIC= FORTIFY_SOURCE=true GPU_SUPPORT=true RSMI_STATIC=

using endeavor os

ERROR: Exception in runner thread -> Cpu:: -> key not found

Distributor ID: Ubuntu Description: Ubuntu 22.04.5 LTS Release: 22.04 Codename: jammy btop version: 1.2.3

When I set show_gpu_info = "Off" in ~/.config/btop/btop.conf, btop works with no error, but it don’t shows gpu info…

Works for me an my old GTX650