joshivineet / protobuf

Automatically exported from code.google.com/p/protobuf
Other
0 stars 0 forks source link

protobuf causes crash beacuse of mutex lock #679

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
FreeBSD 10, it sometimes crashes on SerializeToOstream

    ostringstream os(ios::out | ios::binary);  
    email.SerializeToOstream(&os);

and creates a core of binary here is gdb output:

#0  0x00000000004aa1a1 in google::protobuf::internal::Mutex::Lock ()
#1  0x00000000004ab767 in google::protobuf::internal::MutexLock::MutexLock ()
#2  0x00000000004aa011 in google::protobuf::internal::LogMessage::Finish ()
#3  0x00000000004aa0e9 in google::protobuf::internal::LogFinisher::operator= ()
#4  0x000000000054e623 in 
google::protobuf::internal::WireFormat::VerifyUTF8StringFallback ()
#5  0x000000000044b7a2 in 
google::protobuf::internal::WireFormat::VerifyUTF8String (
    data=0x8071b5798 "testtir asdas asda sda sdasdasd dadsad n asdasd\nBilgilerinize.\nSayg�lar�mla,\nSibel Kocaku� �ENG�N\nKalite ve �dari ��ler\n<mailto:isim.soyisim@vizyonarge.com> e:  sibel.kocakus@vizyonarge.com  |\n<http:/"..., size=836, op=google::protobuf::internal::WireFormat::SERIALIZE) at gthr-default.h:199
#6  0x0000000000449007 in emails::Email::SerializeWithCachedSizesToArray 
(this=0x7ffffffed170, target=0x80702b0a2 "word\" xmlns:x=\"urn:schemas-mic 
�$\a\b") at emailInput.pb.cc:43
#7  0x00000000004ac1e7 in 
google::protobuf::MessageLite::SerializePartialToCodedStream ()
#8  0x00000000004ac35d in google::protobuf::MessageLite::SerializeToCodedStream 
()
#9  0x00000000004ac39b in 
google::protobuf::MessageLite::SerializeToZeroCopyStream ()
#10 0x000000000053b2b0 in google::protobuf::Message::SerializeToOstream ()

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

Please provide any additional information below.

Original issue reported on code.google.com by islm.ya...@gmail.com on 12 Nov 2014 at 10:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
take care where you call

google::protobuf::ShutdownProtobufLibrary()

also dont call it in worker process or worker thread!

Original comment by islm.ya...@gmail.com on 28 Nov 2014 at 9:50

GoogleCodeExporter commented 9 years ago
I am also seeing this, also from VerifyUTF8StringFallback(). My code does not 
call google::protobuf::ShutdownProtobufLibrary().

Original comment by jw...@dilect.us on 18 Dec 2014 at 11:01