[LIP] Is basic_string thread safe

"Praveen Kumar Kalapatapu" <[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
Hi,

Our application is crashing at a strange place inside basic_string
destructor from /usr/lib/libstdc++.so.5.

We have observed that the string which it is trying to destructor is
already null. Code is pretty straight forward we are not setting this
object to null or destroying before it is being deleted.

On the net I found lot of such crashes associated to the thread safety.
Any pointers on this respect ..Our application is a multi threaded
application running on 4 processor machine.

Operating System : Linux 2.4.21-32.0.1.ELhugemem #1 SMP Tue May 17
17:43:22 EDT 2005 i686 i686 i386 GNU/Linux

-bash-2.05b$ rpm -qa|grep glibc
glibc-kernheaders-2.4-8.34.1
glibc-common-2.3.2-95.30
compat-glibc-7.x-2.2.4.32.6
glibc-headers-2.3.2-95.30
glibc-devel-2.3.2-95.30
glibc-2.3.2-95.30

-bash-2.05b$ rpm -qa |grep libstd
compat-libstdc++-7.3-2.96.128
compat-libstdc++-devel-7.3-2.96.128
libstdc++-devel-3.2.3-47
libstdc++-3.2.3-47

gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-47)

Following is the core dump
#0  0x07338dbc in std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::~basic_string () from /usr/lib/libstdc++.so.5
#1  0x0805b5e0 in ~RWCString (this=0xf4936714) at cstring.h:261
#2  0x00126612 in ~DataElement (this=0xf4936708) at DataElement.h:91
#3  0x00125f54 in ~StringDataElement (this=0xf4936708) at
StringElements.h:39
#4  0x00128c4a in ~CommandResult (this=0xf4936708)
    at MsgIssueCommandResponse.cpp:38
#5  0x0012dc4e in ~SessionDataResponseGroup (this=0xf49366f0) at
iostream:63
#6  0x00141991 in Xlist::clearAndDelete (this=0xf6588258) at
Xlist.cpp:73
#7  0x00141a44 in ~XvarList (this=0xf6588258) at Xlist.cpp:90
#8  0x0012e050 in ~SessionDataResponseVector (this=0xf6588258)
    at MsgSessionDataResponse.cpp:61
#9  0x0012dd70 in ~MsgSessionDataResponse (this=0xf65881b0) at
iostream:63
#10 0x080687a9 in NECHManagerServant::retrieveSessionData
(this=0xf64fb7e8,
    msg=@0xf4a914f8) at NECHManagerServant.cpp:712
#11 0x0809b765 in
POA_ExADT_IMS_NECH_manager::NECHManager::_retrieveSessionData
    (_obj=0xf64fb7e8, _istrm=@0xf6519268,
    _oper=0xf6589504 "retrieveSessionData", _handler=@0x10917764)
    at ../cc/NECHManager_s.cc:141
#12 0x00dc59a2 in VISSkelInfo::execute () from /opt/BDP/lib/liborb_r.so
#13 0x00db9280 in VISGIOPProtocolAdapter::_do_request ()
   from /opt/BDP/lib/liborb_r.so
#14 0x00db87d7 in VISGIOPProtocolAdapter::_dispatch_message ()
   from /opt/BDP/lib/liborb_r.so
#15 0x00dbb089 in VISGIOPProtocolAdapter::dispatchMessage ()
   from /opt/BDP/lib/liborb_r.so
#16 0x00ce38e3 in VISThreadPoolDispatcher::do_work ()
   from /opt/BDP/lib/liborb_r.so
#17 0x00ce2239 in VISDispatchWorker::do_work () from
/opt/BDP/lib/liborb_r.so
#18 0x00ced16a in VISThreadPool::_perform_task () from
/opt/BDP/lib/liborb_r.so
#19 0x00cee085 in VISTPoolWorker::begin () from /opt/BDP/lib/liborb_r.so
#20 0x004877fd in VISThread::_start () from /opt/BDP/lib/libvport_r.so
#21 0x00462dec in start_thread () from /lib/tls/libpthread.so.0
#22 0x010a9a2a in clone () from /lib/tls/libc.so.6


**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.