btop: [BUG] macOS: Crash (SIGABRT) on macOS 14 arm64 after running for a period of time

Describe the bug After running for a period of time btop will crash with SIGABRT.

To Reproduce

  1. Install btop from MacPorts
  2. Run it
  3. Wait
  4. See
*** Incorrect guard value: 8315172638107325999
btop(35909,0x16f717000) malloc: *** set a breakpoint in malloc_error_break to debug
Abort trap: 6   

Expected behavior It runs indefinitely

Screenshots

Info (please complete the following information):

  • btop++ version: 1.3.2
  • Binary: MacPorts built
  • (If compiled) Compiler and version: MacPorts clang 17
  • Architecture: arm64
  • Platform: macOS
  • (OSX/FreeBSD) Os release version: 14.3.1
  • Terminal used: Apple Terminal, Terminus
  • Font used: SF Mono

Additional context

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

2024/02/12 (16:04:26) | ===> btop++ v.1.3.2
2024/02/12 (16:04:26) | INFO: Logger set to DEBUG
2024/02/12 (16:04:26) | DEBUG: Using locale en_US.UTF-8
2024/02/12 (16:04:26) | INFO: Running on /dev/ttys000
2024/02/12 (16:04:26) | DEBUG: get_sensors(): show_coretemp=1 check_temp=1
2024/02/12 (16:04:26) | DEBUG: checking intel
2024/02/12 (16:04:26) | DEBUG: no intel sensors found
2024/02/12 (16:29:10) | ERROR: Stall in Runner thread, restarting!
2024/02/12 (16:29:16) | ERROR: Stall in Runner thread, restarting!
2024/02/12 (16:29:21) | ERROR: Stall in Runner thread, restarting!

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:

About this issue

Most upvoted comments

I did increase a buffer size in this build. Please run it for a while to see if that fixed it.

Oh that’s interesting, it’s probably the empty name for the disk4 that is causing trouble. I’ll have a look