Skip to content

Instantly share code, notes, and snippets.

@jimmycuadra
Last active April 14, 2016 19:18
Show Gist options
  • Select an option

  • Save jimmycuadra/0f70a5675b1044cffee4296f2be731be to your computer and use it in GitHub Desktop.

Select an option

Save jimmycuadra/0f70a5675b1044cffee4296f2be731be to your computer and use it in GitHub Desktop.
kaws-agent stack overflow valgrind output
cat kaws-strace
execve("./kaws-agent", ["./kaws-agent", "run", "--role", "master"], [/* 6 vars */]) = 0
mmap(NULL, 624, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1ecac1d000
arch_prctl(ARCH_SET_FS, 0x7f1ecac1d120) = 0
set_tid_address(0x7f1ecac1d158) = 13
readlink("/etc/malloc.conf", 0x7ffe3db2d560, 4096) = -1 ENOENT (No such file or directory)
brk(0) = 0x1cf8000
mmap(NULL, 2097152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1ecaa1d000
munmap(0x7f1ecaa1d000, 2097152) = 0
mmap(NULL, 4190208, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1eca81e000
munmap(0x7f1eca81e000, 1974272) = 0
munmap(0x7f1ecac00000, 118784) = 0
sched_getaffinity(0, 128, {f}) = 8
mmap(NULL, 2097152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1eca800000
rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER|SA_RESTART, 0x996b5f}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1 RT_2], NULL, 8) = 0
rt_sigaction(SIGSEGV, {0x952b90, [], SA_RESTORER|SA_SIGINFO|SA_ONSTACK, 0x996b5f}, NULL, 8) = 0
rt_sigaction(SIGBUS, {0x952b90, [], SA_RESTORER|SA_SIGINFO|SA_ONSTACK, 0x996b5f}, NULL, 8) = 0
sigaltstack(NULL, {ss_sp=0, ss_flags=SS_DISABLE, ss_size=0}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f1ecac1b000
sigaltstack({ss_sp=0x7f1ecac1b000, ss_flags=0, ss_size=8192}, NULL) = 0
getrandom("", 0, 0) = 0
getrandom("+2\205@\5\345\5+\322tw;Q\3241\255\227\365ed1yE\365\210\37$y\206(0\t"..., 2048, 0) = 2048
getpid() = 13
getpid() = 13
open("/dev/urandom", O_RDONLY|O_NOCTTY|O_NONBLOCK) = 3
fstat(3, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0
poll([{fd=3, events=POLLIN}], 1, 10) = 1 ([{fd=3, revents=POLLIN}])
read(3, "zX9[\370+\303\312\313\\)\2440\273\247\266\377\271=\210\236V\346@\316m\263\21'\371w\26", 32) = 32
close(3) = 0
getuid() = 0
getpid() = 13
getpid() = 13
write(1, "kaws-agent is starting...\n", 26) = 26
write(1, "Checking current modifiedIndex o"..., 47) = 47
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
ioctl(3, FIOCLEX) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(2379), sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection refused)
close(3) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7ffe3d32fff0} ---
rt_sigaction(SIGSEGV, {SIG_DFL, [], SA_RESTORER, 0x996b5f}, NULL, 8) = 0
rt_sigreturn({mask=[]}) = 1
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7ffe3d32fff0} ---
+++ killed by SIGSEGV +++
==11== Stack overflow in thread #1: can't grow stack to 0xffe801000
==11== Stack overflow in thread #1: can't grow stack to 0xffe801000
==11==
==11== Process terminating with default action of signal 11 (SIGSEGV)
==11== Access not within mapped region at address 0xFFE801FF8
==11== Stack overflow in thread #1: can't grow stack to 0xffe801000
==11== at 0x410593: _$LT$std..vec..Vec$LT$T$GT$$GT$::extend_from_slice::h59adc0fe8b4cc959 (vec.rs:987)
==11== If you believe this happened as a result of a stack
==11== overflow in your program's main thread (unlikely but
==11== possible), you can try to increase the size of the
==11== main thread stack using the --main-stacksize= flag.
==11== The main thread stack size used in this run was 8388608.
==11==
==11== HEAP SUMMARY:
==11== in use at exit: 0 bytes in 0 blocks
==11== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==11==
==11== All heap blocks were freed -- no leaks are possible
==11==
==11== For counts of detected and suppressed errors, rerun with: -v
==11== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment