You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of protobuf and what language are you using?
Version: main/v3.6.0/v3.5.0 etc. (NOTE: please try updating to the latest version of protoc/runtime possible beforehand to attempt to resolve your problem)
3.19.6
Language: C++/Java/Python/C#/Ruby/PHP/Objective-C/Javascript
c++
What operating system (Linux, Windows, ...) and version?
Linux 32bit
What runtime / compiler are you using (e.g., python version or gcc version)
gcc 5.2.0
What did you do?
Steps to reproduce the behavior:
Upgraded libprotobuf from 3.6.1 to 3.19.6 and we see below core during encoding. Its with the route_guide_server.cc example. The core is seen only for following cases.
When string is being encoded. When number is encoded, there are no cores.
With 64bit compilation we don't see any cores. it works fine.
Program received signal SIGSEGV, Segmentation fault.
0xf7b674d7 in google::protobuf::internal::ThreadSafeArena::GetSerialArenaFallback(void*) () from /usr/lib/libprotobuf.so.30
(gdb) bt
#0 0xf7b674d7 in google::protobuf::internal::ThreadSafeArena::GetSerialArenaFallback(void*) () from /usr/lib/libprotobuf.so.30 #1 0xf7b672ea in google::protobuf::internal::ThreadSafeArena::AllocateAlignedWithCleanupFallback(unsigned int, std::type_info const*) () from /usr/lib/libprotobuf.so.30 #2 0xf7b678dc in google::protobuf::Arena::AllocateAlignedWithCleanup(unsigned int, std::type_info const*) () from /usr/lib/libprotobuf.so.30 #3 0xf7b680d0 in google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::internal::ArenaStringPtr::EmptyDefault, std::string&&, google::protobuf::Arena*) () from /usr/lib/libprotobuf.so.30 #4 0x10046e5d in routeguide::Feature::set_namestd::string (arg0=..., this=0x1005e540) at ../gpb/lib/src/route_guide.pb.h:1186 #5 routeguide::Parser::TryParseOne (feature=0x1005e540, this=0xffffd6d8) at ../gpb/lib/src/helper.cc:111 #6 routeguide::ParseDb (db=..., feature_list=0xffffd8bc) at ../gpb/lib/src/helper.cc:163 #7 0x10044120 in RouteGuideImpl::RouteGuideImpl (db=..., this=0xffffd8a8) at ../gpb/lib/src/route_guide_server.cc:104 #8 RunServer (db_path=...) at ../gpb/lib/src/route_guide_server.cc:189 #9 0x100443a4 in main (argc=2, argv=0xffffda04) at ../gpb/lib/src/route_guide_server.cc:222
(gdb)
What did you expect to see
No cores
What did you see instead?
process core with SIGSEGV fault.
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
The text was updated successfully, but these errors were encountered:
I think the problem is likely a mismatch between the generated code version and the libprotobuf version, or possibly a mismatch between the protobuf headers that were built against and the libprotobuf used at runtime. It's important to make sure that the protoc version used to generate code exactly matches the libprotobuf version and also that the libprotobuf headers used at compile time are the same version of the libprotobuf used at runtime.
Thanks for the quick response. I verified again and I could see there are no issues with the protoc/protobuf versions used. Its the same headers/library being used both during compile time and runtime.
Is there a way to figure out what is wrong from the backtrace? As I mentioned before setting numbers doesn't have any issue, problem is only with setting string.
What version of protobuf and what language are you using?
Version: main/v3.6.0/v3.5.0 etc. (NOTE: please try updating to the latest version of protoc/runtime possible beforehand to attempt to resolve your problem)
3.19.6
Language: C++/Java/Python/C#/Ruby/PHP/Objective-C/Javascript
c++
What operating system (Linux, Windows, ...) and version?
Linux 32bit
What runtime / compiler are you using (e.g., python version or gcc version)
gcc 5.2.0
What did you do?
Steps to reproduce the behavior:
Upgraded libprotobuf from 3.6.1 to 3.19.6 and we see below core during encoding. Its with the route_guide_server.cc example. The core is seen only for following cases.
Program received signal SIGSEGV, Segmentation fault.
0xf7b674d7 in google::protobuf::internal::ThreadSafeArena::GetSerialArenaFallback(void*) () from /usr/lib/libprotobuf.so.30
(gdb) bt
#0 0xf7b674d7 in google::protobuf::internal::ThreadSafeArena::GetSerialArenaFallback(void*) () from /usr/lib/libprotobuf.so.30
#1 0xf7b672ea in google::protobuf::internal::ThreadSafeArena::AllocateAlignedWithCleanupFallback(unsigned int, std::type_info const*) () from /usr/lib/libprotobuf.so.30
#2 0xf7b678dc in google::protobuf::Arena::AllocateAlignedWithCleanup(unsigned int, std::type_info const*) () from /usr/lib/libprotobuf.so.30
#3 0xf7b680d0 in google::protobuf::internal::ArenaStringPtr::Set(google::protobuf::internal::ArenaStringPtr::EmptyDefault, std::string&&, google::protobuf::Arena*) () from /usr/lib/libprotobuf.so.30
#4 0x10046e5d in routeguide::Feature::set_namestd::string (arg0=..., this=0x1005e540) at ../gpb/lib/src/route_guide.pb.h:1186
#5 routeguide::Parser::TryParseOne (feature=0x1005e540, this=0xffffd6d8) at ../gpb/lib/src/helper.cc:111
#6 routeguide::ParseDb (db=..., feature_list=0xffffd8bc) at ../gpb/lib/src/helper.cc:163
#7 0x10044120 in RouteGuideImpl::RouteGuideImpl (db=..., this=0xffffd8a8) at ../gpb/lib/src/route_guide_server.cc:104
#8 RunServer (db_path=...) at ../gpb/lib/src/route_guide_server.cc:189
#9 0x100443a4 in main (argc=2, argv=0xffffda04) at ../gpb/lib/src/route_guide_server.cc:222
(gdb)
What did you expect to see
No cores
What did you see instead?
process core with SIGSEGV fault.
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
The text was updated successfully, but these errors were encountered: