[BUG] btop crashes on startup (SIGSEGV / SIGABRT)
Describe the bug
After many happy months of using btop on all my systems, one day on the main system (Arch Linux) btop stopped working all together.
When I run btop, it clears the terminal, then stalls for a minute or more, maybe prints the empty frames of all the UI panels, and then crashes, leaving the terminal in a strange state (invisible cursor - I run reset to fix that).
It doesn't show any error messages.
To Reproduce
Run btop on my Arch Linux system :/
Expected behavior
I would expect btop to run as usual without freezing for a long period of time and then finally crashing.
Screenshots
Here's a screenshot where I run the latest version compiled from git through gdb:

Unfortunately I am not even able to copy the text to paste it here, the terminal prints strange sequences when I try to select the text (that's probably because btop reads mouse input and that's still on).
Another occurance - different output:

Info (please complete the following information):
- btop++ version: 1.2.9
- Binary: self compiled via AUR (yay, Arch Linux)
- (If compiled) Compiler and version: ? (how do I check this?)
- Architecture: x86_64
- Platform: Linux
- (Linux) Kernel: 5.15.63-1-lts
- Terminal used: Yakuake
- Font used: Inconsolata 12p
Additional context
contents of ~/.config/btop/btop.log:
2022/09/03 (00:46:38) | ===> btop++ v.1.2.9
2022/09/03 (00:46:38) | WARNING: Failed to get disk/partition stats with statvfs() for: /mnt/backup
2022/09/03 (00:46:44) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:46:50) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:46:56) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:47:02) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:47:08) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:47:14) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:47:20) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:47:26) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:47:32) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:47:38) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:47:44) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:47:50) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:47:56) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:48:02) | ERROR: Stall in Runner thread, restarting!
2022/09/03 (00:48:08) | ERROR: Stall in Runner thread, restarting!
(try running btop with --debug flag if btop.log is empty)
GDB Backtrace
@unfa Some questions:
- Since which version does it not work.
- Do you use ZFS?
- Can you run
btop --debugand post the output frombtop.log - Does the binary from the arch community repository work? (Not from AUR)
- Does the static binary from the release page here on github work?
- Hard to tell, I am not sure this started after an update honestly. Maybe 1.2.8? I can't say for sure.
- I am using Btrfs (not ZFS) and that haven't changed recently.
- I did that and I have posted an excerpt from it - there is nothing more than just this one error there over and over.
- I have tested both and they behave the same
- This I have not tried yet. Will do!
@unfa
- I did that and I have posted an excerpt from it - there is nothing more than just this one error there over and over.
The btop.log you posted above is not from when run with btop --debug, it will say:
DEBUG: Starting in DEBUG mode!
INFO: Logger set to DEBUG
After the version info when run with that command line option.
There was some code for ZFS detection added in v1.2.7 and more in v1.2.8, was thinking that could be the cause. Have you changed anything regarding to the disks in your system since it last worked?
The btop.log you posted above is not from when run with
btop --debug
Ah, right.Sorry.
I have not changed my filesystem layout when the problem started.
I have just tested the official binary package from Github and it crashes in the same manner.
I still have the same problem with btop 1.2.9. I've resorted to using bpytop instead as btop does not run on my Arch Linux system any more.
@unfa Hey, try with latest commit. Binaries at https://github.com/aristocratos/btop/actions/runs/3307951271
Thanks! I will, though I am currently on vacation.