aristocratos / btop

A monitor of resources
Apache License 2.0
21.38k stars 656 forks source link

[BUG] Crash on startup #707

Open jnordberg opened 11 months ago

jnordberg commented 11 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

Launching btop (version 1.3.0, commit 36842a3bccfb78f5c27642435bff387b42f7d13b) crashes with the error:

ERROR: Exception in runner thread -> Cpu:: -> deque::_M_range_check: __n (which is 5)>= this->size() (which is 2)

Info (please complete the following information):

Additional context

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

2024/01/08 (12:40:41) | ===> btop++ v.1.3.0
2024/01/08 (12:40:41) | DEBUG: Starting in DEBUG mode!
2024/01/08 (12:40:41) | INFO: Logger set to DEBUG
2024/01/08 (12:40:41) | DEBUG: Using locale C.UTF-8
2024/01/08 (12:40:41) | INFO: Running on /dev/pts/4
2024/01/08 (12:40:41) | INFO: Failed to load librocm_smi64.so, AMD GPUs will not be detected: librocm_smi64.so.1.0: cannot open shared object file: No such file or directory
2024/01/08 (12:40:41) | DEBUG: Shared::init() : Initialized.
2024/01/08 (12:40:41) | ERROR: Exception in runner thread -> Cpu:: -> deque::_M_range_check: __n (which is 5)>= this->size() (which is 2)

GDB Backtrace

Starting program: /mnt/nfs/code/btop/bin/btop
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
caubuntu@play-3:/mnt/nfs/code/btop$ cat gdb.txt
Starting program: /mnt/nfs/code/btop/bin/btop
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff63ff640 (LWP 3596631)]
[New Thread 0x7ffff5bfe640 (LWP 3596632)]
[Thread 0x7ffff63ff640 (LWP 3596631) exited]
[Thread 0x7ffff5bfe640 (LWP 3596632) exited]
[New Thread 0x7ffff5bfe640 (LWP 3596633)]
[New Thread 0x7ffff63ff640 (LWP 3596634)]
[Thread 0x7ffff5bfe640 (LWP 3596633) exited]
[Thread 0x7ffff63ff640 (LWP 3596634) exited]
[New Thread 0x7ffff63ff640 (LWP 3596635)]
[New Thread 0x7ffff5bfe640 (LWP 3596636)]
[Thread 0x7ffff63ff640 (LWP 3596635) exited]
[Thread 0x7ffff5bfe640 (LWP 3596636) exited]
[New Thread 0x7ffff5bfe640 (LWP 3596637)]
[New Thread 0x7ffff63ff640 (LWP 3596638)]
[Thread 0x7ffff5bfe640 (LWP 3596637) exited]
[Thread 0x7ffff63ff640 (LWP 3596638) exited]
[New Thread 0x7ffff63ff640 (LWP 3596639)]
[New Thread 0x7ffff5bfe640 (LWP 3596640)]
[Thread 0x7ffff63ff640 (LWP 3596639) exited]
[Thread 0x7ffff5bfe640 (LWP 3596640) exited]
[New Thread 0x7ffff5bfe640 (LWP 3596641)]
[New Thread 0x7ffff63ff640 (LWP 3596642)]
[Thread 0x7ffff5bfe640 (LWP 3596641) exited]
[Thread 0x7ffff63ff640 (LWP 3596642) exited]
[New Thread 0x7ffff63ff640 (LWP 3596643)]
[New Thread 0x7ffff5bfe640 (LWP 3596644)]
[Thread 0x7ffff63ff640 (LWP 3596643) exited]
[Thread 0x7ffff5bfe640 (LWP 3596644) exited]
[New Thread 0x7ffff5bfe640 (LWP 3596645)]
[New Thread 0x7ffff63ff640 (LWP 3596646)]
[Thread 0x7ffff5bfe640 (LWP 3596645) exited]
[Thread 0x7ffff63ff640 (LWP 3596646) exited]
[New Thread 0x7ffff63ff640 (LWP 3596647)]
[New Thread 0x7ffff5bfe640 (LWP 3596648)]
[New Thread 0x7ffff53fd640 (LWP 3596649)]
[Thread 0x7ffff5bfe640 (LWP 3596648) exited]
[Thread 0x7ffff53fd640 (LWP 3596649) exited]
[New Thread 0x7ffff53fd640 (LWP 3596650)]
[New Thread 0x7ffff5bfe640 (LWP 3596651)]
[Thread 0x7ffff53fd640 (LWP 3596650) exited]
[Thread 0x7ffff5bfe640 (LWP 3596651) exited]
[New Thread 0x7ffff5bfe640 (LWP 3596652)]
[New Thread 0x7ffff53fd640 (LWP 3596653)]
[Thread 0x7ffff5bfe640 (LWP 3596652) exited]
[Thread 0x7ffff53fd640 (LWP 3596653) exited]
[New Thread 0x7ffff53fd640 (LWP 3596654)]
[New Thread 0x7ffff5bfe640 (LWP 3596655)]
[Thread 0x7ffff53fd640 (LWP 3596654) exited]
[Thread 0x7ffff5bfe640 (LWP 3596655) exited]
[New Thread 0x7ffff5bfe640 (LWP 3596656)]
[New Thread 0x7ffff53fd640 (LWP 3596657)]
[Thread 0x7ffff5bfe640 (LWP 3596656) exited]
[Thread 0x7ffff53fd640 (LWP 3596657) exited]
[New Thread 0x7ffff53fd640 (LWP 3596658)]
[New Thread 0x7ffff5bfe640 (LWP 3596659)]
[Thread 0x7ffff53fd640 (LWP 3596658) exited]
[Thread 0x7ffff5bfe640 (LWP 3596659) exited]
[New Thread 0x7ffff5bfe640 (LWP 3596660)]
[New Thread 0x7ffff53fd640 (LWP 3596661)]
[Thread 0x7ffff5bfe640 (LWP 3596660) exited]
[Thread 0x7ffff53fd640 (LWP 3596661) exited]
[New Thread 0x7ffff53fd640 (LWP 3596662)]
[New Thread 0x7ffff5bfe640 (LWP 3596663)]
[Thread 0x7ffff53fd640 (LWP 3596662) exited]
[Thread 0x7ffff5bfe640 (LWP 3596663) exited]

Thread 1 "btop" received signal SIGUSR1, User defined signal 1.
pselect64_syscall (sigmask=<optimized out>, timeout=<optimized out>, exceptfds=0x0, writefds=0x0, readfds=0x7fffffffd9a0, nfds=1) at ../sysdeps/unix/sysv/linux/pselect.c:34
34  ../sysdeps/unix/sysv/linux/pselect.c: No such file or directory.

Thread 18 (Thread 0x7ffff63ff640 (LWP 3596647) "btop"):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x0000555555595fc9 in Runner::_runner () at /usr/include/c++/11/bits/atomic_wait.h:108
#2  0x00007ffff7aedac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#3  0x00007ffff7b7f660 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7ffff7a54740 (LWP 3596628) "btop"):
#0  pselect64_syscall (sigmask=<optimized out>, timeout=<optimized out>, exceptfds=0x0, writefds=0x0, readfds=0x7fffffffd9a0, nfds=1) at ../sysdeps/unix/sysv/linux/pselect.c:34
#1  __pselect (nfds=1, readfds=0x7fffffffd9a0, writefds=0x0, exceptfds=0x0, timeout=<optimized out>, sigmask=<optimized out>) at ../sysdeps/unix/sysv/linux/pselect.c:56
#2  0x00005555555f0139 in Input::poll (timeout=0) at src/btop_input.cpp:105
#3  0x00005555555742e8 in main (argc=-383707714, argv=0x7d0) at src/btop.cpp:1130
jnordberg commented 11 months ago

I missed that 1.3.0 was officially released, just tested the prebuilt binary and that works fine (GPUs don't show up though 😞)