hishamhm / htop

htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
GNU General Public License v2.0
5.83k stars 581 forks source link

htop crashes at start on system with more than 100 cores #997

Open dkasper26 opened 4 years ago

dkasper26 commented 4 years ago

htop-2.2.0-4.fc30.x86_64 just type 'htop' will result in 'Segmentation fault (core dumped)' always

$ lscpu Architecture: x86_64 (...) CPU(s): 104 On-line CPU(s) list: 0-103 Thread(s) per core: 2 Core(s) per socket: 26 Socket(s): 2 (...) Model name: Intel(R) Xeon(R) Platinum 8270 CPU @ 2.70GHz(gdb)

$ gdb ... Starting program: /usr/bin/htop

Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7f8c7a9 in termattrs_sp () from /lib/libncursesw.so.6 (gdb)

I can reproduce it quick and easy

natoscott commented 4 years ago

@dkasper26 I just tried reproducing this on a 144 CPU el7 machine, but htop runs without issues there. Tried both the 2.2.0 release and master branch, both ran fine.

I did have to build with --disable-unicode since addnwstr is not present in libncurses[w] there - perhaps the problem could be related? The gdb header from your report also points this way. Could you provide the rest of the stack trace? ('bt' at your gdb command prompt)

And also as another data point try a build with Unicode to see if the problem goes away?