Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Segfault in PndMvdStripClusterBuilder
Segfault in PndMvdStripClusterBuilder [message #10035] |
Mon, 25 January 2010 10:52 |
Ralf Kliemt
Messages: 507 Registered: May 2007 Location: GSI, Darmstadt
|
first-grade participant |
From: *cb.uni-bonn.de
|
|
Hi everybody,
I get a quite evil segfault in my code which did not appear last year.
Maybe someone more experienced with stl can help here.
I run the 3 "runMvd...C" macros from pandaroot/macros/mvd. on the third I get the following messages from gdb. Note that I checked all variables with a cout in the lines before.
Quote: | **Sarting PndMvdStripClusterTask::Exec()**
PndMvdStripClusterBuilder::AddDigi(): Adding a Digi with name 1_1/40_0/66_1/65_1/63_1/62_6/61_1/60_1/57_1/56_1/
time 0, number 355, side 0 forom point 0
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
0x00007fff80509a24 in std::string::compare ()
|
Toggle Spoiler
(gdb) bt
#0 0x00007fff80509a24 in std::string::compare ()
#1 0x00000001000ddd6f in std::operator< <char, std::char_traits<char>, std::allocator<char> > (__lhs=@0x100007d20, __rhs=@0x7fff5fbd88d0) at basic_string.h:2190
#2 0x00000001000ddd95 in std::less<std::string>::operator() (this=0x10c055ad8, __x=@0x100007d20, __y=@0x7fff5fbd88d0) at stl_function.h:227
#3 0x00000001073f6186 in std::_Rb_tree<std::string, std::pair<std::string const, std::map<SensorSide, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > >, std::less<SensorSide>, std::allocator<std::pair<SensorSide const, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > > > > > >, std::_Select1st<std::pair<std::string const, std::map<SensorSide, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > >, std::less<SensorSide>, std::allocator<std::pair<SensorSide const, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > > > > > > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::map<SensorSide, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > >, std::less<SensorSide>, std::allocator<std::pair<SensorSide const, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > > > > > > > >::lower_bound (this=0x10c055ad8, __k=@0x7fff5fbd88d0) at stl_tree.h:1150
#4 0x00000001073f61e9 in std::map<std::string, std::map<SensorSide, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > >, std::less<SensorSide>, std::allocator<std::pair<SensorSide const, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > > > > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::map<SensorSide, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > >, std::less<SensorSide>, std::allocator<std::pair<SensorSide const, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > > > > > > > >::lower_bound (this=<value temporarily unavailable, due to optimizations>, __x=<value temporarily unavailable, due to optimizations>) at stl_map.h:540
#5 0x00000001073f908e in std::map<std::string, std::map<SensorSide, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > >, std::less<SensorSide>, std::allocator<std::pair<SensorSide const, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > > > > >, std::less<std::string>, std::allocator<std::pair<std::string const, std::map<SensorSide, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > >, std::less<SensorSide>, std::allocator<std::pair<SensorSide const, std::map<int, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > >, std::less<int>, std::allocator<std::pair<int const, std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int> > > > > > > > > > > >::operator[] (this=0x10c055ad8, __k=@0x7fff5fbd88d0) at stl_map.h:336
#6 0x00000001073f4d77 in PndMvdStripClusterBuilder::AddDigi (this=<value temporarily unavailable, due to optimizations>, detName=@0x7fff5fbd88d0, side=kTOP, timestamp=0, strip=355, iPoint=0) at /Users/ralfk/Panda/pandaroot/mvd/MvdReco/PndMvdStripClusterBuilder.cxx:4 2
#7 0x00000001073fe811 in PndMvdStripClusterTask::Exec (this=0x10c055ae0, opt=<value temporarily unavailable, due to optimizations>) at /Users/ralfk/Panda/pandaroot/mvd/MvdReco/PndMvdStripClusterTask.cxx:206
#8 0x000000010008e67f in TTask::ExecuteTasks (this=0x109946c30, option=0x10598e028 "") at core/base/src/TTask.cxx:298
#9 0x000000010008e6a1 in TTask::ExecuteTasks (this=0x109548960, option=0x10598e028 "") at core/base/src/TTask.cxx:300
#10 0x000000010008e497 in TTask::ExecuteTask (this=0x109548960, option=0x10598e028 "") at core/base/src/TTask.cxx:261
#11 0x0000000105920454 in FairRunAna::Run (this=0x7fff5fbd88d0, Ev_start=1606255440, Ev_end=201677536) at /Users/ralfk/Panda/pandaroot/base/FairRunAna.cxx:268
#12 0x000000010594e2ad in G__FairDict_663_0_5 (result7=0x7fff5fbd8350, funcname=<value temporarily unavailable, due to optimizations>, libp=0x10c055ae0, hash=<value temporarily unavailable, due to optimizations>) at /Users/ralfk/Panda/build/base/FairDict.cxx:9082
#13 0x0000000100a1ef43 in Cint::G__ExceptionWrapper (funcp=0x10594e1b0 <G__FairDict_663_0_5>, result7=0x7fff5fbe4ef0, funcname=0x109545cc0 "\001", libp=0x7fff5fbda4e0, hash=0) at cint/cint/src/Api.cxx:385
#14 0x0000000100b02793 in G__execute_call (result7=0x7fff5fbe4ef0, libp=0x7fff5fbda4e0, ifunc=0x109545cc0, ifn=0) at cint/cint/src/newlink.cxx:2332
#15 0x0000000100b03098 in G__call_cppfunc (result7=0x7fff5fbe4ef0, libp=0x7fff5fbda4e0, ifunc=0x109545cc0, ifn=0) at cint/cint/src/newlink.cxx:2518
#16 0x0000000100adc09d in G__interpret_func (result7=0x7fff5fbe4ef0, funcname=0x101834a00 "Run", libp=0x7fff5fbda4e0, hash=309, p_ifunc=0x109545cc0, funcmatch=1, memfunc_flag=1) at cint/cint/src/ifunc.cxx:5238
#17 0x0000000100ac84bb in G__getfunction (item=0x101833606 "Run(0,nEvents)", known3=0x7fff5fbe89d8, memfunc_flag=1) at cint/cint/src/func.cxx:2421
#18 0x0000000100bdf9ab in G__getstructmem (store_var_type=112, varname=0x101834200 "mvdmccls", membername=0x101833606 "Run(0,nEvents)", tagname=0x101833e00 "fRun", known2=0x7fff5fbe89d8, varglobal=0x101152f60, objptr=2) at cint/cint/src/var.cxx:6588
#19 0x0000000100bcebec in G__getvariable (item=0x101833600 "fRun->Run(0,nEvents)", known=0x7fff5fbe89d8, varglobal=0x101152f60, varlocal=0x0) at cint/cint/src/var.cxx:5220
#20 0x0000000100a8db33 in G__getitem (item=0x101833600 "fRun->Run(0,nEvents)") at cint/cint/src/expr.cxx:1882
#21 0x0000000100aa40c0 in G__getexpr (expression=0x101802600 "fRun->Run(0,nEvents)") at cint/cint/src/expr.cxx:1464
#22 0x0000000100b382e6 in G__exec_function (statement=@0x7fff5fbeb780, pc=0x7fff5fbeb79c, piout=0x7fff5fbeb798, plargestep=0x7fff5fbeb790, presult=0x7fff5fbeb6d0) at cint/cint/src/parse.cxx:643
#23 0x0000000100b40f85 in G__exec_statement (mparen=0x7fff5fbf8314) at cint/cint/src/parse.cxx:7083
#24 0x0000000100a72cf3 in G__exec_tempfile_core (file=0x101801600 "/Users/ralfk/Panda/pandaroot/macro/mvd/./runMvdReco.C", fp=0x0) at cint/cint/src/debug.cxx:250
#25 0x0000000100a7474a in G__exec_tempfile (file=0x101801600 "/Users/ralfk/Panda/pandaroot/macro/mvd/./runMvdReco.C") at cint/cint/src/debug.cxx:798
#26 0x0000000100b56db0 in G__process_cmd (line=0x1017efda8 ".X /Users/ralfk/Panda/fairsoft/tools/root/etc/plugins/TFile/P110_THDFSFile. C ", prompt=0x10170f408 "", more=0x10170f400, err=0x7fff5fbf9b8c, rslt=0x7fff5fbf9b20) at cint/cint/src/pause.cxx:3125
#27 0x0000000100104422 in TCint::ProcessLine (this=0x10170f3d0, line=0x1017efda8 ".X /Users/ralfk/Panda/fairsoft/tools/root/etc/plugins/TFile/P110_THDFSFile. C ", error=0x7fff5fbfcae4) at core/meta/src/TCint.cxx:419
#28 0x00000001001048d4 in TCint::ProcessLineSynch (this=0x10170f3d0, line=0x1017efda8 ".X /Users/ralfk/Panda/fairsoft/tools/root/etc/plugins/TFile/P110_THDFSFile. C ", error=0x7fff5fbfcae4) at core/meta/src/TCint.cxx:486
#29 0x000000010000bba3 in TApplication::ExecuteFile (file=0x7fff5fbfaa93 "runMvdReco.C", error=0x7fff5fbfcae4, keep=false) at core/base/src/TApplication.cxx:976
#30 0x000000010000bd12 in TApplication::ProcessFile (this=0x1017ee4f0, file=0x7fff5fbfaa93 "runMvdReco.C", error=0x7fff5fbfcae4, keep=false) at core/base/src/TApplication.cxx:852
#31 0x000000010000b2b6 in TApplication::ProcessLine (this=0x1017ee4f0, line=0x7fff5fbfaa90 ".x runMvdReco.C", sync=false, err=0x7fff5fbfcae4) at core/base/src/TApplication.cxx:825
#32 0x0000000101586d73 in TRint::Run (this=0x1017ee4f0, retrn=false) at core/rint/src/TRint.cxx:404
#33 0x000000010000193a in main (argc=1, argv=0x7fff5fbfcbb8) at main/src/rmain.cxx:29
(gdb)
Thanks for any help here, Ralf.
|
|
|
Re: Segfault in PndMvdStripClusterBuilder [message #10043 is a reply to message #10035] |
Mon, 25 January 2010 20:07 |
Johan Messchendorp
Messages: 693 Registered: April 2007 Location: University of Groningen
|
first-grade participant |
From: *xs4all.nl
|
|
Hi Ralf,
I was just playing with your macros, and I already got stuck with the digitization macro. It crashes with a floating point exception, which can easily be traced back to line 14 in PndMvdCalcFePixel.cxx where there is a division by zero (fNrows=0). My educated guess would be that something goes wrong with reading/writing the digitisation parameters (mvd.digi.par?). Could this be related somehow with your segfault.... ?!?
Greetings,
Johan.
Quote: | Frontend type name is = APV25
Clusterfinder Mode = 0
Clusterfinder Search Radius: Channels = 2
Clusterfinder Search Radius: Time = 0
Top/Bottom Charge correlation cut = 2.50941e-319
-I- PndMvdNoiseProducer: Intialisation successfull
*** Break *** floating point exception
===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0 0x00007fd93192d5e5 in waitpid () from /lib64/libc.so.6
#1 0x00007fd9318c9861 in ?? () from /lib64/libc.so.6
#2 0x00007fd9339fd64a in TUnixSystem::StackTrace() ()
from /opt/exp_soft/panda/fairroot/fairsoft_jan10/tools/root/lib/libCore.so.5. 26
#3 0x00007fd9339fe045 in TUnixSystem::DispatchSignals(ESignals) ()
from /opt/exp_soft/panda/fairroot/fairsoft_jan10/tools/root/lib/libCore.so.5. 26
#4 <signal handler called>
#5 0x00007fd9277efec8 in PndMvdCalcFePixel::CalcFEHits (this=0x7fff32bc7910)
at /home/panda/pandaroot/trunk/mvd/MvdDigi/PndMvdCalcFePixel.cxx:13
#6 0x00007fd9277fbb2f in PndMvdCalcFePixel::CalcFEHits (this=0x7fff32bc7910, SensorHits=
{<std::_Vector_base<PndMvdPixel, std::allocator<PndMvdPixel> >> = {_M_impl = {<std::allocator<PndMvdPixel>> = {<__gnu_cxx::new_allocator<PndMvdPixel>> = {<No data fields>}, <No data fields>}, _M_start = 0x7fff32bc7b90, _M_finish = 0x7fff32bc7910, _M_end_of_storage = 0xdb0210}}, <No data fields>}) at /home/panda/pandaroot/trunk/mvd/MvdDigi/PndMvdCalcFePixel.h:48
|
[Updated on: Mon, 25 January 2010 21:17] Report message to a moderator
|
|
|
Re: Segfault in PndMvdStripClusterBuilder [message #10044 is a reply to message #10035] |
Mon, 25 January 2010 23:05 |
Elwin Dijck
Messages: 16 Registered: June 2009 Location: Groningen, The Netherland...
|
occasional visitor |
From: *mxp.dsl.internl.net
|
|
I don't know whether the errors are related, but I took a look at the segfault in runMvdReco.C. The crash occurs in PndMvdStripClusterBuilder::AddDigi(), where just some data is put into some nested std::maps. The stack trace showed that the memory of the map was somehow corrupted and the reason for this is that a PndMvdStripClusterBuilder object is used after it is deleted. Some extra debug output:
0xbfa10f0->AddDigi called for detName: "1_1/40_0/66_1/65_1/63_1/62_5/54_3/52_4/49_1/48_1/"
0xbfa10f0->AddDigi called for detName: "1_1/40_0/66_1/65_1/63_1/62_5/54_3/52_4/49_1/48_1/"
0xbfa10f0->AddDigi called for detName: "1_1/40_0/66_1/65_1/63_1/62_5/54_3/52_4/49_1/48_1/"
0xbfa10f0->AddDigi called for detName: "1_1/40_0/66_1/65_1/64_1/62_15/54_3/52_4/49_1/48_1/"
0xbfa10f0->AddDigi called for detName: "1_1/40_0/66_1/65_1/64_1/62_15/54_3/52_4/49_1/48_1/"
0xbfa10f0->AddDigi called for detName: "1_1/40_0/66_1/65_1/64_1/62_21/61_1/60_1/57_1/"
0xbfa10f0->DESTRUCTOR CALLED!
0xbfa10f0->AddDigi called for detName: "1_1/40_0/66_1/65_1/63_1/62_6/61_1/60_1/57_1/56_1/"
*** Break *** segmentation violation
Generating stack trace... etc.
I don't know why this happens exactly, but it looks like a bug in PndMvdStripClusterTask::Exec() from where AddDigi() is called.
Regards,
Elwin Dijck
[Updated on: Mon, 25 January 2010 23:06] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Sun Oct 13 03:51:31 CEST 2024
Total time taken to generate the page: 0.00647 seconds
|