Re: Severe problem with PyRoot - file segmentation fault

From: James Jackson <james.jackson_at_cern.ch>
Date: Fri, 13 Jun 2008 17:52:58 +0100


So, I have just done a bit more digging (attempted to work around this by calling the Python stuff I need from ROOT, rather than the ROOT stuff from Python). It is clear that loading the Python binding kills things:



[james_at_slc4vm ~]$ root
...
ROOT 5.18/00 (trunk_at_21744, Jun 13 2008, 00:32:00 on linux)

CINT/ROOT C/C++ Interpreter version 5.16.29, Jan 08, 2008 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }.

root [0] TFile *f = new TFile("test.root", "recreate")
root [1] TH1F *h1 = new TH1F("hist", "hist", 10, 0, 10)
root [2] f->Close()
root [3] .q
---------------------------------------

Everything's fine. Let's try and load the bindings:



[james_at_slc4vm ~]$ root
...
ROOT 5.18/00 (trunk_at_21744, Jun 13 2008, 00:32:00 on linux)

CINT/ROOT C/C++ Interpreter version 5.16.29, Jan 08, 2008 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] gSystem->Load("libPyROOT")
Warning in <TClassTable::Add>: class TFile already in TClassTable ... Lots of these ...
Warning in <TClassTable::Add>: class TViewer3DPad already in TClassTable (int)0

root [1] TFile *f = new TFile("test.root", "recreate")
root [2] TH1F *h1 = new TH1F("hist", "hist", 10, 0, 10)
root [3] f->Close()
root [4] .q

At least this gives slightly more information. Can anyone suggest what's happening; I built from source without any fiddling (just configure --enable-python --path=/usr/local, make, make install)

James.

On 13 Jun 2008, at 16:54, James Jackson wrote:

> Hi,

>

> I am having serious problems with PyRoot on a new SLC4 machine (it's
> a VM but that shouldn't make any difference), with ROOT built from
> the latest production source:
>

> ----------------------------------
> [james_at_slc4vm PdfErrors]$ python
> Python 2.3.4 (#1, Dec 11 2007, 21:18:01)
> [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from ROOT import TFile, TH1F
> Warning in <TClassTable::Add>: class TFile already in TClassTable
> ...many more of these...
> Warning in <TClassTable::Add>: class TViewer3DPad already in
> TClassTable
> >>> f = TFile("test.root", "recreate")
> >>> g = TH1F("testhist", "testhist", 10, 0, 10)
> >>> g.Fill(5)
> 6
> >>> f.ls()
> TFile** test.root
> TFile* test.root
> OBJ: TH1F testhist testhist : 0 at: 0x9a9e280
> >>> f.Close()
> >>> <here do Ctrl+D>
> Segmentation fault
> ----------------------------------
>

> Subsequently inspecting the root file shows it to be empty:
>

> ----------------------------------
> [james_at_slc4vm PdfErrors]$ python
> Python 2.3.4 (#1, Dec 11 2007, 21:18:01)
> [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from ROOT import TFile
> Warning in <TClassTable::Add>: class TFile already in TClassTable
> ...many more of these
> Warning in <TClassTable::Add>: class TViewer3DPad already in
> TClassTable
> >>> f = TFile("test.root")
> >>> f.ls()
> TFile** test.root
> TFile* test.root
> ----------------------------------
>

> Could anybody suggest what is going wrong?
>

> [james_at_slc4vm PdfErrors]$ uname -a
> Linux slc4vm.local 2.6.9-67.0.15.EL.cern #1 Thu May 8 11:11:47 CEST
> 2008 i686 i686 i386 GNU/Linux
>

> Regards,
> James.

> Received on Fri Jun 13 2008 - 18:53:03 CEST

This archive was generated by hypermail 2.2.0 : Fri Jun 13 2008 - 23:50:01 CEST