Issue 408 in protobuf: sigsegv when running on arm - help in debug

205 views
Skip to first unread message

prot...@googlecode.com

unread,
Aug 13, 2012, 4:06:43 AM8/13/12
to prot...@googlegroups.com
Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 408 by markus.d...@gmail.com: sigsegv when running on arm - help
in debug
http://code.google.com/p/protobuf/issues/detail?id=408

What steps will reproduce the problem?
1. compile and link protobuf 4.2.1 on arm (in my case for openwrt)
2. try to run program

What is the expected output? What do you see instead?

get a sigsegv on run


What version of the product are you using? On what operating system?

2.4.1

Please provide any additional information below.

backtrace with gdb:

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?)


can anyone help me to debug this further? thanks

prot...@googlecode.com

unread,
Aug 18, 2012, 6:35:16 PM8/18/12
to prot...@googlegroups.com

Comment #1 on issue 408 by markus.d...@gmail.com: sigsegv when running on
Just tried again with older linaro gcc (and normal gccs) with similar
outbut (but some differences) - maybe this helps more in debug?

Program received signal SIGSEGV, Segmentation fault.
0x77985a4c in memcmp () from /lib/libc.so.0
(gdb) bt full
#0 0x77985a4c in memcmp () from /lib/libc.so.0
No symbol table info available.
#1 0x77cd0310 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=<value optimized out>, __k=<value optimized out>)
at
/data/openwrt/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.6.3/../../../../mips-openwrt-linux-uclibc/include/c++/4.6.3/bits/char_traits.h:257
No locals.
#2 0x77cda3f0 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=0x77d0f970, __k=@0x7fca7620)
at
/data/openwrt/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.6.3/../../../../mips-openwrt-linux-uclibc/include/c++/4.6.3/bits/basic_string.h:235
__h = (
std::tr1::_Hashtable<std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::pair<const std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
google::protobuf::FieldDescriptorProto_Type>,
std::allocator<std::pair<const std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
google::protobuf::FieldDescriptorProto_Type> >,
std::_Select1st<std::pair<const std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
google::protobuf::FieldDescriptorProto_Type> >,
std::equal_to<std::basic_string<char, std::char_traits<char>,
std::allocator<char> > >, google::protobuf::hash<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
std::tr1::__detail::_Mod_range_hashing,
std::tr1::__detail::_Default_ranged_hash,
std::tr1::__detail::_Prime_rehash_policy, false, false, true> *) 0x77d0f970
__code = 448222
__n = 5
__p = <value optimized out>
#3 0x77cd34b8 in __static_initialization_and_destruction_0
(__initialize_p=<value optimized out>)
at
/data/openwrt/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/lib/gcc/mips-openwrt-linux-uclibc/4.6.3/../../../../mips-openwrt-linux-uclibc/include/c++/4.6.3/bits/basic_string.h:235
No locals.
#4 0x77cdabd4 in __do_global_ctors_aux () from /usr/lib/libprotobuf.so.7
No symbol table info available.
#5 0x77c30ad8 in ?? () from /usr/lib/libprotobuf.so.7
No symbol table info available.
Backtrace stopped: frame did not save the PC

prot...@googlecode.com

unread,
Aug 20, 2012, 6:04:14 PM8/20/12
to prot...@googlegroups.com

Comment #2 on issue 408 by markus.d...@gmail.com: sigsegv when running on
fixed it ... protobuf was not the problem, it was a linking error (afaik)
of my binary. sorry for the confusion. this can be closed.

prot...@googlecode.com

unread,
Dec 5, 2012, 5:57:46 PM12/5/12
to prot...@googlegroups.com
Updates:
Status: Invalid

Comment #3 on issue 408 by liu...@google.com: sigsegv when running on arm
(No comment was entered for this change.)

Reply all
Reply to author
Forward
0 new messages