btop icon indicating copy to clipboard operation
btop copied to clipboard

[BUG] btop crashes on startup (SIGSEGV / SIGABRT)

Open unfa opened this issue 3 years ago • 6 comments

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: image

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: image

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

gdb.txt

unfa avatar Sep 02 '22 23:09 unfa

@unfa Some questions:

  1. Since which version does it not work.
  2. Do you use ZFS?
  3. Can you run btop --debug and post the output from btop.log
  4. Does the binary from the arch community repository work? (Not from AUR)
  5. Does the static binary from the release page here on github work?

aristocratos avatar Sep 03 '22 07:09 aristocratos

  1. Hard to tell, I am not sure this started after an update honestly. Maybe 1.2.8? I can't say for sure.
  2. I am using Btrfs (not ZFS) and that haven't changed recently.
  3. I did that and I have posted an excerpt from it - there is nothing more than just this one error there over and over.
  4. I have tested both and they behave the same
  5. This I have not tried yet. Will do!

unfa avatar Sep 03 '22 09:09 unfa

@unfa

  1. 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?

aristocratos avatar Sep 03 '22 10:09 aristocratos

The btop.log you posted above is not from when run with btop --debug

Ah, right.Sorry.

btop.log

I have not changed my filesystem layout when the problem started.

unfa avatar Sep 03 '22 10:09 unfa

I have just tested the official binary package from Github and it crashes in the same manner.

unfa avatar Sep 03 '22 11:09 unfa

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 avatar Oct 10 '22 17:10 unfa

@unfa Hey, try with latest commit. Binaries at https://github.com/aristocratos/btop/actions/runs/3307951271

aristocratos avatar Oct 23 '22 17:10 aristocratos

Thanks! I will, though I am currently on vacation.

unfa avatar Oct 23 '22 19:10 unfa