Linear Collider Forum



Home » Software Tools » LCIO » segfaulting PIDHandler in python
segfaulting PIDHandler in python [message #2346] Sat, 22 November 2014 01:47 Go to next message
jfstrube
Messages: 64
Registered: September 2004
Location: Tohoku University
I have a DST + LCFIPlus Jet collections.
The xml file that was used to create the file from the DST is attached.
I am reading this file via the python bindings.
from pyLCIO.io.LcioReader import LcioReader
from ROOT import UTIL
import sys
for dst in sys.argv[1:]:
    reader = LcioReader(dst)
    for event in reader:
        refinedJetCollection = event.getCollection("RefinedJets")
        pidh = UTIL.PIDHandler(refinedJetCollection)


Instantiating the PIDHandler leads to a seg fault.
However, not in every event.
Please let me know if you can reproduce this bug.
There might be processors in the xml which are not distributed with ILCSoft. Please comment them out.

  • Attachment: ww6j.xml
    (Size: 37.24KB, Downloaded 294 times)
Re: segfaulting PIDHandler in python [message #2347 is a reply to message #2346] Sat, 22 November 2014 02:29 Go to previous messageGo to next message
jfstrube
Messages: 64
Registered: September 2004
Location: Tohoku University
I was able to get a stack trace:
#5 0x00000001108c2820 in UTIL::PIDHandler::~PIDHandler (this=0x7fe0d57d4880) at /Users/jstrube/WorkDir/lcio/v02-04-03/src/cpp/src/UTIL/PIDHa ndler.cc:120
#6 0x0000000110a5ba47 in ROOT::delete_UTILcLcLPIDHandler (p=0x7fe0d57d4880) at /Users/jstrube/WorkDir/lcio/v02-04-03/build/rootdict/UTIL.cx x:7063
#7 0x000000010eedbe70 in TClass::Destructor ()
#8 0x000000010e7a0094 in PyROOT::(anonymous namespace)::op_dealloc ()
#9 0x000000010e347083 in subtype_dealloc ()
#10 0x000000010e322a66 in insertdict_by_entry ()
#11 0x000000010e31f1be in PyDict_SetItem ()
#12 0x000000010e381d05 in PyEval_EvalFrameEx ()
#13 0x000000010e38009d in PyEval_EvalCodeEx ()
#14 0x000000010e37f9d6 in PyEval_EvalCode ()
#15 0x000000010e3a9544 in PyRun_FileExFlags ()
#16 0x000000010e3a90c1 in PyRun_SimpleFileExFlags ()
#17 0x000000010e3bed1e in Py_Main ()
#18 0x00007fff8b7f55fd in start ()


Note that this is a bit suspicious, since I'm seemingly getting the segfault when calling the PIDHandler constructor, not the destructor, but it might be related to ROOT's interaction with the python garbage collector.

Re: segfaulting PIDHandler in python [message #2348 is a reply to message #2347] Sat, 22 November 2014 05:00 Go to previous message
jfstrube
Messages: 64
Registered: September 2004
Location: Tohoku University
It's indeed the destructor.
adding a "del pidh" in each iteration gets rid of the segfault.
Previous Topic:SIOWriter couldn't write event header
Next Topic:Meeting Minutes
Goto Forum:
  

[ PDF ]

Current Time: Tue Nov 20 06:07:26 Pacific Standard Time 2018
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software