Issue 679 in protobuf: protobuf causes crash beacuse of mutex lock

711 views
Skip to first unread message

prot...@googlecode.com

unread,
Nov 12, 2014, 5:48:29 AM11/12/14
to prot...@googlegroups.com
Status: New
Owner: liu...@google.com
Labels: Type-Defect Priority-Medium

New issue 679 by islm.ya...@gmail.com: protobuf causes crash beacuse of
mutex lock
https://code.google.com/p/protobuf/issues/detail?id=679

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.s...@vizyonarge.com> e:
sibel....@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.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

prot...@googlecode.com

unread,
Nov 12, 2014, 1:33:54 PM11/12/14
to prot...@googlegroups.com

Comment #1 on issue 679 by islm.ya...@gmail.com: protobuf causes crash
if i comment the line in common.cc on line 185

MutexLock lock(log_silencer_count_mutex);

everything looks well.

prot...@googlecode.com

unread,
Nov 28, 2014, 4:50:29 AM11/28/14
to prot...@googlegroups.com

Comment #2 on issue 679 by islm.ya...@gmail.com: protobuf causes crash
take care wher you call

google::protobuf::ShutdownProtobufLibrary()

also dont call it in worker process or worker thread!

prot...@googlecode.com

unread,
Nov 28, 2014, 4:51:29 AM11/28/14
to prot...@googlegroups.com

Comment #3 on issue 679 by islm.ya...@gmail.com: protobuf causes crash
take care where you call

prot...@googlecode.com

unread,
Dec 18, 2014, 6:01:16 PM12/18/14
to prot...@googlegroups.com

Comment #4 on issue 679 by jw...@dilect.us: protobuf causes crash beacuse
I am also seeing this, also from VerifyUTF8StringFallback(). My code does
not call google::protobuf::ShutdownProtobufLibrary().
Reply all
Reply to author
Forward
0 new messages