Hello,

I'm trying to compile an updated "boblightd" with ola support for my openwrt tp-link 1043nd router and was successful some weeks ago.

Today, I updated my openwrt trunk (to revision 33133) and reinstalled everything, but now boblightd gets a sigsegv on start.

For reference: The repo for my custom packages is located here: https://github.com/doits/ola-openwrt-feed

I compiled protobuf and boblightd with debug info, here's the backtrace of the sigsegv:

root@OpenWrt:~# gdb boblightd


dlopen failed on 'libthread_db.so.1' - File not found
GDB will not be able to debug pthreads.

GNU gdb 6.8
Copyright (C) 2008 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 "mips-openwrt-linux"...
(gdb) run
Starting program: /usr/bin/boblightd

Program received signal SIGSEGV, Segmentation fault.
0x778b5c98 in memcmp () from /lib/libc.so.0
(gdb) bt
#0  0x778b5c98 in memcmp () from /lib/libc.so.0
#1  0x77bfd810 in std::tr1::_Hashtable<std::string, std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type>, std::allocator<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::_Select1st<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::equal_to<std::string>, google::protobuf::hash<std::string>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::_M_find_node (__p=0x481730, __k=Unhandled dwarf expression opcode 0xf3
)   
    at /data/openwrt/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.1/../../../../mips-openwrt-linux-uclibc/include/c++/4.7.1/bits/char_traits.h:257
#2  0x77c06e88 in std::tr1::__detail::_Map_base<std::string, std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type>, std::_Select1st<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, true, std::tr1::_Hashtable<std::string, std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type>, std::allocator<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::_Select1st<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::equal_to<std::string>, google::protobuf::hash<std::string>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true> >::operator[] (this=0x77c41940, __k=@0x7fad4d8c)
    at google/protobuf/compiler/parser.cc:838
#3  0x77c004c0 in MakeTypeNameTable () at google/protobuf/compiler/parser.cc:838
#4  0x77b60194 in _GLOBAL__sub_I_parser.cc () from /usr/lib/libprotobuf.so.7
#5  0x77c07694 in __do_global_ctors_aux () from /usr/lib/libprotobuf.so.7
#6  0x77b5fd00 in ?? () from /usr/lib/libprotobuf.so.7
warning: GDB can't find the start of the function at 0x77b5fcff.

    GDB is unable to find the start of the function at 0x77b5fcff
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
    This problem is most likely caused by an invalid program counter or
stack pointer.
    However, if you think GDB should simply search farther back
from 0x77b5fcff for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) set heuristic-fence-post 1
(gdb) bt
#0  0x778b5c98 in memcmp () from /lib/libc.so.0
#1  0x77bfd810 in std::tr1::_Hashtable<std::string, std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type>, std::allocator<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::_Select1st<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::equal_to<std::string>, google::protobuf::hash<std::string>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::_M_find_node (__p=0x481730, __k=Unhandled dwarf expression opcode 0xf3
)
    at /data/openwrt/staging_dir/toolchain-mips_r2_gcc-4.7-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.7.1/../../../../mips-openwrt-linux-uclibc/include/c++/4.7.1/bits/char_traits.h:257
#2  0x77c06e88 in std::tr1::__detail::_Map_base<std::string, std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type>, std::_Select1st<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, true, std::tr1::_Hashtable<std::string, std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type>, std::allocator<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::_Select1st<std::pair<std::string const, google::protobuf::FieldDescriptorProto_Type> >, std::equal_to<std::string>, google::protobuf::hash<std::string>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true> >::operator[] (this=0x77c41940, __k=@0x7fad4d8c)
    at google/protobuf/compiler/parser.cc:838
#3  0x77c004c0 in MakeTypeNameTable () at google/protobuf/compiler/parser.cc:838
#4  0x77b60194 in _GLOBAL__sub_I_parser.cc () from /usr/lib/libprotobuf.so.7
#5  0x77c07694 in __do_global_ctors_aux () from /usr/lib/libprotobuf.so.7
#6  0x77b5fd00 in ?? () from /usr/lib/libprotobuf.so.7
warning: GDB can't find the start of the function at 0x77b5fcff.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Is there anyone who can help me with this? How can I debug this further?

(Last edited by coolphoenix on 11 Aug 2012, 22:26)