the er_print crashes while analyzing datarace
Dear all,
I have installed the latest Sun Studio12 and use its DRDT tools to detect the race condition.
After the execution of "collect -r on a.out", I can see that the experiement data has been successfully collected. But when I execute "er_print <tha.name>", er_print crashes.
The following is the related crash info:
# ls -lrht
total 12773670
drwxr-xr-x2 rtp99dba 512 Apr 10 13:56 MgmtFctAPI
drwxr-x4 rtp99dba 512 May 9 14:24 RtpEvtHdl01
-rw-1 rtp99dba 900M Jun 8 14:09 core.pcs.19549.1181282948
-rw-1 zhfmobile37M Jun 8 15:09 core.pcs.27127.1181286589
-rw-1 zhfmobile547M Jun 8 15:18 core.pcs.27825.1181287097
-rw-1 rtp99dba 911M Jun 8 16:34 core.pcs.4208.1181291656
drwxr-xr-x 33 rtp99dba 1.0K Jun 8 16:45 pcs
-rw-1 rtp99dba 371M Jun 8 16:49 core.pcs.6244.1181292550
-rw-1 rtp99dba 239M Jun 8 16:57 core.pcs.7122.1181293055
-rw-1 rtp99dba 235M Jun 8 17:11 core.pcs.8759.1181293881
-rw-1 zhfmobile307M Jun 8 18:49 core.er_print.14083.1181299747
-rw-1 zhfmobile307M Jun 8 18:52 core.er_print.14339.1181299906
-rw-1 zhfmobile306M Jun 8 18:58 core.er_print.14882.1181300314
-rw-1 zhfmobile237M Jun 8 19:00 core.er_print.14927.1181300421
-rw-1 zhfmobile530M Jun 8 19:10 core.er_print.15816.1181300989
-rw-1 yyjmobile237M Jun 11 09:40 core.er_print.24839.1181526011
-rw-1 yyjmobile237M Jun 11 09:45 core.er_print.24927.1181526327
-rw-1 yyjmobile306M Jun 11 10:33 core.er_print.26727.1181529189
-rw-1 yyjmobile290M Jun 11 10:41 core.er_print.27057.1181529676
-rw-1 yyjmobile237M Jun 11 11:41 core.er_print.2877.1181533293
# dbx /usr/bin/er_print core.er_print.27057.1181529676
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.6' in your .dbxrc
Reading er_print
core file header read successfully
Reading ld.so.1
Reading liber_dbe.so
Reading libCstd.so.1
Reading libCrun.so.1
Reading libc.so.1
Reading libdl.so.1
Reading libnsl.so.1
Reading libCstd_isa.so.1
Reading libc_psr.so.1
program terminated by signal SEGV (no mapping at the fault address)
0xfeed512c: _free_unlocked+0x004c:ld[%i5 - 8], %o3
(dbx) threads
dbx: thread related commands not available
(dbx) where
=>[1] _free_unlocked(0x61697473, 0x0, 0x931a8, 0xfef6fad4, 0xfef68298, 0x61697473), at 0xfeed512c
[2] free(0x61697473, 0xfeed50a8, 0x931e8, 0x1ff18, 0xfef68298, 0xfeed50a8), at 0xfeed50cc
[3] dbeGetRaceData(0x1, 0x6a42ea8, 0x6a30340, 0xff30e0ce, 0x1, 0x1), at 0xff276218
(dbx)
And I find that It alwasy crash in this race:
Race #2, Vaddr: 0xfcb24
Access 1: Read, __rwstd::__rb_tree<std::basic_string><char,std::char_traits><cha r>,std::allocator<char> >,std::pair<const std::basic_string><char,std::char_traits><char>,std::allocator&l t;char> >,pcsia::CIaBGFData*>,__rwstd::__select1st<std::pair><const std::basic_string><char,std::char_traits><char>,std::allocator&l t;char> >,pcsia::CIaBGFData*>,std::basic_string<char,std::char_traits><c har>,std::allocator<char> > >,std::less<std::basic_string><char,std::char_traits><char> ;,std::allocator<char> > >,std::allocator<std::pair><const std::basic_string><char,std::char_traits><char>,std::allocator&l t;char> >,pcsia::CIaBGFData*> > >::iterator::operator*()const + 0x00000098,
line 321 in "tree"
Access 2: Write, __rwstd::__rb_tree<std::basic_string><char,std::char_traits><cha r>,std::allocator<char> >,std::pair<const std::basic_string><char,std::char_traits><char>,std::allocator&l t;char> >,pcsia::CIaBGFData*>,__rwstd::__select1st<std::pair><const std::basic_string><char,std::char_traits><char>,std::allocator&l t;char> >,pcsia::CIaBGFData*>,std::basic_string<char,std::char_traits><c har>,std::allocator<char> > >,std::less<std::basic_string><char,std::char_traits><char> ;,std::allocator<char> > >,std::allocator<std::pair><const std::basic_string><char,std::char_traits><char>,std::allocator&l t;char> >,pcsia::CIaBGFData*> > >::iterator::operator=(const __rwstd::__rb_tree<std::basic_string><char,std::char_traits><cha r>,std::allocator<char> >,std::pair<const std::basic_string><char,std::char_traits><char>,std::allocator&l t;char> >,pcsia::CIaBGFData*>,__rwstd::__select1st<std::pair><const std::basic_string><char,std::char_traits><char>,std::allocator&l t;char> >,pcsia::CIaBGFData*>,std::basic_string<char,std::char_traits><c har>,std::allocator<char> > >,std::less<std::basic_string><char,std::char_traits><char> ;,std::allocator<char> > >,std::allocator<std::pair><const std::basic_string><char,std::char_traits><char>,std::allocator&l t;char> >,pcsia::CIaBGFData*> > >::iterator&) + 0x000000D4
Total Traces: 7
Segmentation fault (core dumped)
I asked a developer in SUN and he told me that "This could be a problem cause by long function name of C++ class member function"
Could developer of er_print have a look at this and give me some hints?
many thanks!
Cheers
Shen

