[Halld-offline] hdgeant crash
Matthew Shepherd
mashephe at indiana.edu
Thu Feb 24 12:44:17 EST 2011
Hi Will,
Can you be more descriptive what you mean by "crash"?
As an aside, potentially unrelated to your problem, we ran into an issue with large jobs that manifested itself as a segfault or an seemingly infinite loop. It seems to be a pretty nasty issue regarding compiler optimization screwing up the STL sort algorithm so that it plow ahead outside the bounds it is given until eventually it manipulates some memory it isn't supposed to (segfault). The workaround I came up with is pasted below. This was gcc 4.1.2 -- don't know if it is compiler dependent.
-Matt
Begin forwarded message:
> From: Matthew Shepherd <mashephe at indiana.edu>
> Date: January 13, 2011 2:31:09 PM EST
> To: David Lawrence <davidl at jlab.org>
> Cc: Simon Taylor <staylor at jlab.org>, Kei Moriya <kmoriya at indiana.edu>, Jake Bennett <jvbennet at indiana.edu>
> Subject: Re: Infinite loop segfault problem
>
>
> So I think here is a potential workaround.....
>
> build the entire tree in the default fashion
> edit BMS/Makefile.common
>
> change:
>
> CFLAGS += -O2
> CXXFLAGS += -O2
>
> to
>
> CFLAGS += -O0
> CXXFLAGS += -O0
>
> cd libraries/TRACKING
> touch DTrackCandidate_factory_CDC.cc
> make
>
> Now you have a tracking library with an unoptomized DTrackCandidate_factory_CDC class.
>
> Now change Makefile.common back to the way it was..
>
> Compile any binaries that are needed.
>
> When I did this, I could run hd_dump on any of Jake or Kei's "bad events" without a segfault.
>
> -Matt
>
More information about the Halld-offline
mailing list