Re: dlopen error

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Thu, 15 Sep 2011 10:31:07 -0500


Hi Harinder,

According to valgrind (see below) the problem is that you close the input file before using the histogram from it ... (i.e. the histogram object is deleted when you attempt to use it (for example in KeepBinsBetween).

Cheers,
Philippe.

==28468== Invalid read of size 8
==28468==    at 0xB69B748: G__G__Hist_100_0_53(G__value*, char const*, G__param*, int) (G__Hist.cxx:10080)
==28468==    by 0x5BDD0FC: Cint::G__ExceptionWrapper(int (*)(G__value*, char const*, G__param*, int), G__value*, char*, G__param*, 
int) (Api.cxx:393)
==28468==    by 0x5CD3260: G__execute_call (newlink.cxx:2406)
==28468==    by 0x5CD3D25: G__call_cppfunc (newlink.cxx:2610)
==28468==    by 0x5C8E402: G__interpret_func (ifunc.cxx:5204)
==28468==    by 0x5C7ABF7: G__getfunction (func.cxx:2339)
==28468==    by 0x5D94539: G__getstructmem(int, G__FastAllocString&, char*, int, char*, int*, G__var_array*, int) (var.cxx:6763)
==28468==    by 0x5D835C1: G__getvariable (var.cxx:5348)
==28468==    by 0x5C4317C: G__getitem (expr.cxx:1913)
==28468==    by 0x5C591CF: G__getexpr (expr.cxx:1495)
==28468==    by 0x5C34B90: G__define_var (decl.cxx:2588)
==28468==    by 0x5CECD7A: G__exec_statement (parse.cxx:5614)
==28468==  Address 0x9088280 is 0 bytes inside a block of size 872 free'd
==28468==    at 0x4C21A33: operator delete(void*) (vg_replace_malloc.c:346)
==28468==    by 0x5278655: TStorage::ObjectDealloc(void*) (TStorage.cxx:358)
==28468==    by 0x524A6E4: TObject::operator delete(void*) (TObject.cxx:985)
==28468==    by 0xB51774A: TH1F::~TH1F() (TH1.cxx:8979)
==28468==    by 0x52CAFBD: TCollection::GarbageCollect(TObject*) (TCollection.cxx:591)
==28468==    by 0x52D3E7C: TList::Delete(char const*) (TList.cxx:413)
==28468==    by 0x52CE8D6: THashList::Delete(char const*) (THashList.cxx:197)
==28468==    by 0xA69B9B8: TDirectoryFile::Close(char const*) (TDirectoryFile.cxx:523)
==28468==    by 0xA6B8EC2: TFile::Close(char const*) (TFile.cxx:805)
==28468==    by 0x541EDE6: G__G__Base1_8_0_20(G__value*, char const*, G__param*, int) (in 
/afs/cern.ch/sw/lcg/app/releases/ROOT/5.28.00f/x86_64-slc5-gcc43-dbg/root/lib/libCore.so) ==28468== by 0x5BDD0FC: Cint::G__ExceptionWrapper(int (*)(G__value*, char const*, G__param*, int), G__value*, char*, G__param*, int) (Api.cxx:393)
==28468== by 0x5CD3260: G__execute_call (newlink.cxx:2406)

On 9/15/11 4:51 AM, Harinder Singh Bawa wrote:
> Hi Philipe,
>
> This is my second problem. If I run in Lxplus, I am getting dlopen error but when I run in my fresno t3, I am not getting this
> error. So I understand that there must be some problem in ROOT building (which it shouldnot). I made all teh libraries from
> scratch by removing .so files. May be here too, you can suggest me better idea as How to compile if I change version of root.
>
>
> Harinder
>
>
>
> On Wed, Sep 14, 2011 at 6:21 PM, Philippe Canal <pcanal_at_cern.ch <mailto:pcanal_at_cern.ch>> wrote:
>
> Hi Harinder,
>
> If you see error messages like:
>
> lopen error: /tmp/bawa/macros/./PileupReweighting/StandAlone/libPileupReweighting.so: wrong ELF class: ELFCLASS32
> Load Error: Failed to load Dynamic link library /tmp/bawa/macros/./PileupReweighting/StandAlone/libPileupReweighting.so
>
> Then the problem is that some of your library have not been rebuild against the new version
> of ROOT (and that the old version was 32bits and the new one 64bits).
>
> Cheers,
> Philippe.
>
>
>
> On 9/14/11 9:43 AM, Philippe Canal wrote:
>
> > When I activate bare ROOT in my computer( Version 5.28/00f 4 August 2011 ) :
> > Its compiling well but crashing when I run executable saying segmentation fault
>
> It should not happen. Do you have more detail on the segmentation fault?
> Did you check that there was only one ROOT version/directory listed in the PATH
> and LD_LIBRARY_PATH.
>
> Cheers,
> Philippe.
>
>
>
>
> On 9/14/11 9:32 AM, Harinder Singh Bawa wrote:
>
> Hello,
>
> I am confused with ROOT behaviour.
>
> 1) I am trying to some package in ROOT. I checked out the package from SVN area.
>
> When I activate bare ROOT in my computer( Version 5.28/00f 4 August 2011 ) : Its compiling well but crashing
> when I run executable saying segmentation fault
>
>
>
> 2)
> And Since the package is standard package which should run with default setting, I tried with running ROOT that comes
> with athena software.(Version 5.28/00b 14 March 2011 )
>
> Now the package gets compiled but When I run, it is giving me dlopen error which it doesnot give before.
>
> I am confused why change in root . there is change in behaviour of running.
>
> thanks
> harinder
>
>
>
> PS: If you need to look into package, then I can provide you the link privately.
>
>
>
>
Received on Thu Sep 15 2011 - 17:31:15 CEST

This archive was generated by hypermail 2.2.0 : Thu Sep 15 2011 - 17:50:02 CEST