Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

-s option results in segmentation fault #989

Open
mauricev opened this issue Feb 24, 2020 · 1 comment
Open

-s option results in segmentation fault #989

mauricev opened this issue Feb 24, 2020 · 1 comment

Comments

@mauricev
Copy link

It appears that running htop -s and any option results in a segmentation fault in Funtoo Linux 1.4.

Here is some sample strace output
execve("/usr/bin/htop", ["htop", "-s", "PERCENT_MEM"], 0x7ffec2605d10 /* 26 vars */) = 0
brk(NULL) = 0x55b0c6c69000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=66048, ...}) = 0
mmap(NULL, 66048, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f8e2f9d9000
close(3) = 0
openat(AT_FDCWD, "/lib/libncursesw.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340|\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=453296, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8e2f9d7000
mmap(NULL, 457560, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8e2f967000
mmap(0x7f8e2f97d000, 249856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f8e2f97d000
mmap(0x7f8e2f9ba000, 94208, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x53000) = 0x7f8e2f9ba000
mmap(0x7f8e2f9d1000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x69000) = 0x7f8e2f9d1000
close(3) = 0
openat(AT_FDCWD, "/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\321\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1321048, ...}) = 0
mmap(NULL, 1323264, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8e2f823000
mmap(0x7f8e2f830000, 638976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd000) = 0x7f8e2f830000
mmap(0x7f8e2f8cc000, 626688, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa9000) = 0x7f8e2f8cc000
mmap(0x7f8e2f965000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x141000) = 0x7f8e2f965000
close(3) = 0
openat(AT_FDCWD, "/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@@\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1877464, ...}) = 0
mmap(NULL, 1890120, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8e2f655000
mmap(0x7f8e2f677000, 1409024, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x22000) = 0x7f8e2f677000
mmap(0x7f8e2f7cf000, 303104, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17a000) = 0x7f8e2f7cf000
mmap(0x7f8e2f819000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c3000) = 0x7f8e2f819000
mmap(0x7f8e2f81f000, 14152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8e2f81f000
close(3) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8e2f652000
arch_prctl(ARCH_SET_FS, 0x7f8e2f652740) = 0
mprotect(0x7f8e2f819000, 16384, PROT_READ) = 0
mprotect(0x7f8e2f965000, 4096, PROT_READ) = 0
mprotect(0x7f8e2f9d1000, 16384, PROT_READ) = 0
mprotect(0x55b0c4fec000, 4096, PROT_READ) = 0
mprotect(0x7f8e2fa11000, 4096, PROT_READ) = 0
munmap(0x7f8e2f9d9000, 66048) = 0
brk(NULL) = 0x55b0c6c69000
brk(0x55b0c6c8a000) = 0x55b0c6c8a000
openat(AT_FDCWD, "/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=4554576, ...}) = 0
mmap(NULL, 4554576, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f8e2f1fa000
close(3) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
+++ killed by SIGSEGV +++
Segmentation fault

@palica
Copy link

palica commented Mar 1, 2020

running with long option name works fine: htop --sort-key 'PERCENT_MEM'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants