Skip to content

Instantly share code, notes, and snippets.

@veox
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veox/606078bdc5a95b73f77a to your computer and use it in GitHub Desktop.
Save veox/606078bdc5a95b73f77a to your computer and use it in GitHub Desktop.
obelisk boost termination
preacher% gdb obelisk-server [.obelisk]
GNU gdb (GDB) 7.6.2 (Debian 7.6.2-1.1)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/veox/usr/bin/obelisk-server...done.
(gdb) catch throw
Catchpoint 1 (throw)
(gdb) run
Starting program: /home/veox/usr/bin/obelisk-server
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Using config file: "/home/veox/usr/etc/obelisk/worker.cfg"
Catchpoint 1 (exception thrown), 0x00007ffff586dfd0 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) backtrace
#0 0x00007ffff586dfd0 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x00007ffff5b299c3 in libconfig::Setting::operator[](char const*) const () from /usr/lib/x86_64-linux-gnu/libconfig++.so.9
#2 0x00007ffff5b29c7e in libconfig::Setting::lookupValue(char const*, std::string&) const ()
from /usr/lib/x86_64-linux-gnu/libconfig++.so.9
#3 0x0000000000413056 in obelisk::load_config (config=..., config_path=...) at worker/config.cpp:122
#4 0x000000000041024e in main (argc=<optimized out>, argv=0x7fffffffe508) at worker/main.cpp:45
...
uncommented certificate in config, re-run
...
(gdb) frame 3
#3 0x0000000000413067 in obelisk::load_config (config=..., config_path=...) at worker/config.cpp:123
123 root.lookupValue("client-allowed-certs", config.client_allowed_certs);
(gdb) list
118 root.lookupValue("heartbeat", config.heartbeat);
119 root.lookupValue("publisher_enabled", config.publisher_enabled);
120 root.lookupValue("block-publish", config.block_publish);
121 root.lookupValue("tx-publish", config.tx_publish);
122 root.lookupValue("certificate", config.certificate);
123 root.lookupValue("client-allowed-certs", config.client_allowed_certs);
124 load_whitelist(root, config);
125 root.lookupValue("name", config.name);
126 root.lookupValue("outgoing-connections", config.outgoing_connections);
127
Straight run:
preacher% obelisk-server [.obelisk]
Using config file: "/home/veox/usr/etc/obelisk/worker.cfg"
Press CTRL-C to shut down.
DEBUG [worker]: Listening: tcp://*:9091
INFO [worker]: worker ready
DEBUG [worker]: Heartbeat: tcp://*:9092
Node started.
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >'
what(): bad lexical cast: source type value could not be interpreted as target
zsh: abort obelisk-server
strace:
% strace obelisk-server
...
mmap(NULL, 10489856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7fe37cdfb000
mprotect(0x7fe37cdfb000, 4096, PROT_NONE) = 0
clone(child_stack=0x7fe37d7faf70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7fe37d7fb9d0, tls=0x7fe37d7fb700, child_tidptr=0x7fe37d7fb9d0) = 9648
eventfd2(0, 0) = 27
fcntl(27, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(27, F_SETFL, O_RDWR|O_NONBLOCK) = 0
fcntl(27, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(27, F_SETFL, O_RDWR|O_NONBLOCK) = 0
clock_gettime(CLOCK_MONOTONIC, {51470, 382604176}) = 0
eventfd2(0, 0) = 28
fcntl(28, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(28, F_SETFL, O_RDWR|O_NONBLOCK) = 0
fcntl(28, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(28, F_SETFL, O_RDWR|O_NONBLOCK) = 0
clock_gettime(CLOCK_MONOTONIC, {51470, 382752198}) = 0
open("debug.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 29
fstat(29, {st_mode=S_IFREG|0644, st_size=119521369, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe3919cd000
fstat(29, {st_mode=S_IFREG|0644, st_size=119521369, ...}) = 0
lseek(29, 119521369, SEEK_SET) = 119521369
open("error.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 30
fstat(30, {st_mode=S_IFREG|0644, st_size=3615037, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe3919cc000
fstat(30, {st_mode=S_IFREG|0644, st_size=3615037, ...}) = 0
lseek(30, 3615037, SEEK_SET) = 3615037
futex(0xa226d4, FUTEX_WAIT_PRIVATE, 1, NULL) = 0
futex(0xa226a8, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7fe385e4de04, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7fe385e4de00, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x7fe385e4de04, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7fe385e4de00, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
epoll_ctl(17, EPOLL_CTL_MOD, 16, {EPOLLIN|EPOLLERR|EPOLLET, {u32=10576568, u64=10576568}}) = 0
futex(0x7fe385e4de04, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7fe385e4de00, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x7fe38684ee04, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7fe38684ee00, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
write(1, "Node started.\n", 14Node started.
) = 14
rt_sigaction(SIGINT, {0x414110, [INT], SA_RESTORER|SA_RESTART, 0x7fe38e956420}, {0x7fe38f96bac0, [], SA_RESTORER, 0x7fe3906e7890}, 8) = 0
clock_gettime(CLOCK_MONOTONIC, {51470, 413466737}) = 0
poll([{fd=8, events=POLLIN}, {fd=12, events=POLLIN}], 2, 0) = 1 ([{fd=8, revents=POLLIN}])
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >poll([{fd=8, events=POLLIN}], 1, 0'
) = 1 ([{fd=8, revents=POLLIN}])
what(): bad lexical cast: source type value could not be interpreted as target
read(8, <unfinished ...>
+++ killed by SIGABRT +++
zsh: abort strace obelisk-server
GDB:
preacher% gdb obelisk-server [.obelisk]
GNU gdb (GDB) 7.6.2 (Debian 7.6.2-1.1)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/veox/usr/bin/obelisk-server...done.
(gdb) r
Starting program: /home/veox/usr/bin/obelisk-server
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Using config file: "/home/veox/usr/etc/obelisk/worker.cfg"
Press CTRL-C to shut down.
[New Thread 0x7fffef67e700 (LWP 9659)]
[New Thread 0x7fffeec7d700 (LWP 9660)]
[New Thread 0x7fffee27c700 (LWP 9661)]
DEBUG [worker]: Listening: tcp://*:9091
INFO [worker]: worker ready
DEBUG [worker]: Heartbeat: tcp://*:9092
[New Thread 0x7fffed87b700 (LWP 9662)]
[New Thread 0x7fffe7fff700 (LWP 9663)]
[New Thread 0x7fffe75fe700 (LWP 9664)]
[New Thread 0x7fffe6bfd700 (LWP 9665)]
[New Thread 0x7fffe61fc700 (LWP 9666)]
[New Thread 0x7fffe57fb700 (LWP 9667)]
[New Thread 0x7fffe4dfa700 (LWP 9668)]
[New Thread 0x7fffece7a700 (LWP 9669)]
[New Thread 0x7fffdffff700 (LWP 9670)]
[New Thread 0x7fffdf5fe700 (LWP 9671)]
Node started.
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_lexical_cast> >'
what(): bad lexical cast: source type value could not be interpreted as target
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffed87b700 (LWP 9662)]
0x00007ffff4f813a9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) backtrace
#0 0x00007ffff4f813a9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff4f844c8 in __GI_abort () at abort.c:89
#2 0x00007ffff586fd55 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff586ddd6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff586de21 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff58c5a40 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff6d0b062 in start_thread (arg=0x7fffed87b700) at pthread_create.c:312
#7 0x00007ffff5031bfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment