ssh and telnet crash with sys-libs/uclibc-ng on PowerPC - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: May 16, 2017, 02:57:47 pm
content: I can't understand WTF happens. They both crashCode:uclibc-2017 ~ # strace sshSegmentation faultCode:uclibc-2017 ~ # strace sshexecve("/usr/bin/ssh", ["ssh"], [/* 42 vars */]) = 0readlinkat(AT_FDCWD, "/proc/self/exe", "/usr/bin/ssh", 4096) = 12mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0x48008000stat("/etc/ld.so.cache", {st_mode=S_IFREG|0644, st_size=19092, ...}) = 0open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3mmap(NULL, 19092, PROT_READ, MAP_SHARED, 3, 0) = 0x48009000close(3) = 0stat("/etc/ld.so.preload", 0xbfed5388) = -1 ENOENT (No such file or directory)open("/lib/libz.so.1", O_RDONLY) = 3fstat(3, {st_mode=S_IFREG|0755, st_size=132536, ...}) = 0mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0x4800e000read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\35\320\0\0\0004"..., 4096) = 4096mmap(NULL, 200704, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x48021000mmap(0x48021000, 89144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x48021000mmap(0x48050000, 4288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1f000) = 0x48050000close(3) = 0munmap(0x4800e000, 4096) = 0open("/lib/libc.so.0", O_RDONLY) = 3fstat(3, {st_mode=S_IFREG|0755, st_size=592864, ...}) = 0mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0x4800e000read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1N\260\0\0\0004"..., 4096) = 4096mmap(NULL, 749568, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x48052000mmap(0x48052000, 533468, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x48052000mmap(0x480f0000, 9628, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x8e000) = 0x480f0000mmap(0x480f3000, 90016, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x480f3000close(3) = 0munmap(0x4800e000, 4096) = 0open("/lib/libc.so.0", O_RDONLY) = 3fstat(3, {st_mode=S_IFREG|0755, st_size=592864, ...}) = 0close(3) = 0stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=66316, ...}) = 0munmap(0x48009000, 19092) = 0mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0x48009000open("/dev/urandom", O_RDONLY) = 3read(3, "\336\252\247\360", 4) = 4close(3) = 0mprotect(0x202e4000, 16384, PROT_READ) = 0mprotect(0x48050000, 4096, PROT_READ) = 0mprotect(0x480f0000, 8192, PROT_READ) = 0mprotect(0x4801f000, 4096, PROT_READ) = 0set_tid_address(0x48009068) = 2491set_robust_list(0x48009070, 12) = 0rt_sigaction(SIGRTMIN, {0x480c42e4, [], SA_SIGINFO}, NULL, 8) = 0rt_sigaction(SIGRT_1, {0x480c41c0, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0ugetrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x1ac} ---+++ killed by SIGSEGV +++Segmentation fault

author: agehall
author_rank: Frequent Contributor
timestamp: May 16, 2017, 05:00:59 pm
content: My guess is bad RAM, but it could really be anything.Start by running in GDB and check what actually causes the SIGSEGV.

author: legacy
author_rank: Super Contributor
timestamp: May 16, 2017, 07:05:41 pm
content: Quote from: agehall on May 16, 2017, 05:00:59 pmthe ram is OK, I compiled gcc.

author: legacy
author_rank: Super Contributor
timestamp: May 16, 2017, 07:19:09 pm
content: testmem: passed.Going to compile gdb.

author: legacy
author_rank: Super Contributor
timestamp: May 16, 2017, 08:36:21 pm
content: ssh compiled with +pic: crashedssh compiled with -pic: worked