Project

General

Profile

Bug #22247

Task #22198: Address various issues in protodune-sp reconstruction

Issues with ProtoDUNEBeamEvent

Added by Tingjun Yang 9 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
03/29/2019
Due date:
% Done:

0%

Estimated time:
Duration:

Description

There are several warnings related to ProtoDUNEBeamEvent:
This is repeated many times:

==22281== Conditional jump or move depends on uninitialised value(s)
==22281==    at 0xFAC0DD7: ??? (in /cvmfs/dune.opensciencegrid.org/products/dune/dune_oslibs/v1_0_0/Linux64bit+3.10-2.17-sl7-6/lib/libz.so.1)
==22281==    by 0xFAC1BD7: ??? (in /cvmfs/dune.opensciencegrid.org/products/dune/dune_oslibs/v1_0_0/Linux64bit+3.10-2.17-sl7-6/lib/libz.so.1)
==22281==    by 0xFAC2683: deflate (in /cvmfs/dune.opensciencegrid.org/products/dune/dune_oslibs/v1_0_0/Linux64bit+3.10-2.17-sl7-6/lib/libz.so.1)
==22281==    by 0xC97A0F0: R__zipZLIB(int, int*, char*, int*, char*, int*) (RZip.cxx:208)
==22281==    by 0xC979D21: R__zipMultipleAlgorithm (RZip.cxx:103)
==22281==    by 0xCF8769C: TKey::TKey(TObject const*, char const*, int, TDirectory*) (TKey.cxx:268)
==22281==    by 0xCF41FA6: TFile::CreateKey(TDirectory*, TObject const*, char const*, int) (TFile.cxx:1014)
==22281==    by 0xCF35939: TDirectoryFile::WriteTObject(TObject const*, char const*, char const*, int) (TDirectoryFile.cxx:1896)
==22281==    by 0xDC63B75: TTree::AutoSave(char const*) (TTree.cxx:1406)
==22281==    by 0x6161DF7: art::RootOutputTree::writeTTree(TTree*) (RootOutputTree.cc:87)
==22281==    by 0x6161E24: art::RootOutputTree::writeTree() const (RootOutputTree.cc:93)
==22281==    by 0x6145F38: art::RootOutputFile::writeTTrees()::{lambda(art::BranchType)#1}::operator()(art::BranchType) const (RootOutputFile.cc:926)
==22281==  Uninitialised value was created by a stack allocation
==22281==    at 0x275791C5: beam::ProtoDUNEBeamEvent::ProtoDUNEBeamEvent() (ProtoDUNEBeamEvent.h:171)
==22281== 

This showed up once:

==22281== Syscall param write(buf) points to uninitialised byte(s)
==22281==    at 0xBA6969D: ??? (in /usr/lib64/libpthread-2.17.so)
==22281==    by 0xCF50876: TFile::SysWrite(int, void const*, int) (TFile.cxx:4359)
==22281==    by 0xCF463A0: TFile::WriteBuffer(char const*, int) (TFile.cxx:2365)
==22281==    by 0xCF8BAFA: TKey::WriteFileKeepBuffer(TFile*) (TKey.cxx:1494)
==22281==    by 0xDBF62B9: TBasket::WriteBuffer() (TBasket.cxx:1143)
==22281==    by 0xDC0137B: TBranch::WriteBasketImpl(TBasket*, int, ROOT::Internal::TBranchIMTHelper*)::{lambda()#1}::operator()() const (TBranch.cxx:2702)
==22281==    by 0xDC0182F: TBranch::WriteBasketImpl(TBasket*, int, ROOT::Internal::TBranchIMTHelper*) (TBranch.cxx:2752)
==22281==    by 0xDC026E8: TBranch::WriteBasket(TBasket*, int) (TBranch.h:132)
==22281==    by 0xDBFB664: TBranch::FlushOneBasket(unsigned int) (TBranch.cxx:1091)
==22281==    by 0xDBFB4CA: TBranch::FlushBaskets() (TBranch.cxx:1043)
==22281==    by 0xDBFB538: TBranch::FlushBaskets() (TBranch.cxx:1057)
==22281==    by 0xDBFB538: TBranch::FlushBaskets() (TBranch.cxx:1057)
==22281==  Address 0xa79719e8 is 616 bytes inside a block of size 16,392 alloc'd
==22281==    at 0x4C2A8E8: operator new[](unsigned long) (vg_replace_malloc.c:423)
==22281==    by 0xC88DAED: TBuffer::TBuffer(TBuffer::EMode, int) (TBuffer.cxx:81)
==22281==    by 0xCEF7BB9: TBufferFile::TBufferFile(TBuffer::EMode, int) (TBufferFile.cxx:112)
==22281==    by 0xDBF94D3: TBranch::GetTransientBuffer(int) (TBranch.cxx:501)
==22281==    by 0xDBF1AB5: TBasket::TBasket(char const*, char const*, TBranch*) (TBasket.cxx:76)
==22281==    by 0xDC6BE48: TTree::CreateBasket(TBranch*) (TTree.cxx:3605)
==22281==    by 0xDBFA48B: TBranch::FillImpl(ROOT::Internal::TBranchIMTHelper*) (TBranch.cxx:766)
==22281==    by 0xDC103EB: TBranchElement::FillImpl(ROOT::Internal::TBranchIMTHelper*) (TBranchElement.cxx:1222)
==22281==    by 0xDC1058E: TBranchElement::FillImpl(ROOT::Internal::TBranchIMTHelper*) (TBranchElement.cxx:1247)
==22281==    by 0xDC1058E: TBranchElement::FillImpl(ROOT::Internal::TBranchIMTHelper*) (TBranchElement.cxx:1247)
==22281==    by 0x61481ED: TBranch::Fill() (TBranch.h:154)
==22281==    by 0x61623CC: art::fillTreeBranches(TTree*, std::vector<TBranch*, std::allocator<TBranch*> > const&, bool, long) (RootOutputTree.cc:144)
==22281==  Uninitialised value was created by a heap allocation
==22281==    at 0x4C2A243: operator new(unsigned long) (vg_replace_malloc.c:334)
==22281==    by 0x4FDCEB3: __gnu_cxx::new_allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::allocate(unsigned long, void const*) (new_allocator.h:111)
==22281==    by 0x4FDC53C: std::allocator_traits<std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::allocate(std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >&, unsigned long) (alloc_traits.h:436)
==22281==    by 0x4FDC119: std::_Vector_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_allocate(unsigned long) (stl_vector.h:172)
==22281==    by 0x4FDFC04: void std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_realloc_insert<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (vector.tcc:406)
==22281==    by 0x4FDF68F: std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::push_back(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (stl_vector.h:948)
==22281==    by 0x66D57BE: void fhicl::detail::decode<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(boost::any const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&) (coding.h:300)
==22281==    by 0x66D3870: bool fhicl::ParameterSet::get_one_<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&) const (ParameterSet.h:298)
==22281==    by 0x66D1E7F: bool fhicl::ParameterSet::get_if_present<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&) const (ParameterSet.h:212)
==22281==    by 0x674F3F3: std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > fhicl::ParameterSet::get<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const (ParameterSet.h:234)
==22281==    by 0x2756941B: proto::BeamEvent::reconfigure(fhicl::ParameterSet const&) (BeamEvent_module.cc:1919)
==22281==    by 0x27551116: proto::BeamEvent::BeamEvent(fhicl::ParameterSet const&) (BeamEvent_module.cc:336)
==22281== 

The following are indication of memory leaks:

==22281== 524 (344 direct, 180 indirect) bytes in 1 blocks are definitely lost in loss record 58,873 of 63,444
==22281==    at 0x4C2A243: operator new(unsigned long) (vg_replace_malloc.c:334)
==22281==    by 0x2756F68A: proto::BeamEvent::MakeTrack(unsigned long) (BeamEvent_module.cc:2243)
==22281==    by 0x2755B8F4: proto::BeamEvent::produce(art::Event&) (BeamEvent_module.cc:1001)
==22281==    by 0x66C0BE0: art::EDProducer::produceWithFrame(art::Event&, art::ProcessingFrame const&) (EDProducer.cc:91)
==22281==    by 0x6797845: art::detail::Producer::doEvent(art::EventPrincipal&, art::ModuleContext const&, std::atomic<unsigned long>&, std::atomic<unsigned long>&, std::atomic<unsigned long>&) (Producer.cc:125)
==22281==    by 0x275B7D37: art::WorkerT<art::EDProducer>::implDoProcess(art::EventPrincipal&, art::ModuleContext const&) (WorkerT.h:198)
==22281==    by 0x8F9FC26: art::Worker::runWorker(art::EventPrincipal&, art::ModuleContext const&) (Worker.cc:586)
==22281==    by 0x8F9F96B: art::(anonymous namespace)::RunWorkerFunctor::operator()() const (Worker.cc:564)
==22281==    by 0x8FA30CC: void hep::concurrency::SerialTaskQueueChain::runFunc<art::(anonymous namespace)::RunWorkerFunctor>(art::(anonymous namespace)::RunWorkerFunctor const&) (SerialTaskQueueChain.h:83)
==22281==    by 0x8FA2E8F: void hep::concurrency::SerialTaskQueueChain::push<art::(anonymous namespace)::RunWorkerFunctor>(art::(anonymous namespace)::RunWorkerFunctor const&)::{lambda()#1}::operator()() (SerialTaskQueueChain.h:54)
==22281==    by 0x8FA4362: hep::concurrency::QueuedTask<void hep::concurrency::SerialTaskQueueChain::push<art::(anonymous namespace)::RunWorkerFunctor>(art::(anonymous namespace)::RunWorkerFunctor const&)::{lambda()#1}>::execute() (SerialTaskQueue.h:87)
==22281==    by 0x9950892: tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all(tbb::task&, tbb::task*) (custom_scheduler.h:509)
==22281== 

==22281== 1,048 (24 direct, 1,024 indirect) bytes in 1 blocks are definitely lost in loss record 60,215 of 63,444
==22281==    at 0x4C2A243: operator new(unsigned long) (vg_replace_malloc.c:334)
==22281==    by 0x27567E97: proto::BeamEvent::beginJob() (BeamEvent_module.cc:1830)
==22281==    by 0x66C0A76: art::EDProducer::beginJobWithFrame(art::ProcessingFrame const&) (EDProducer.cc:54)
==22281==    by 0x6797142: art::detail::Producer::doBeginJob() (Producer.cc:37)
==22281==    by 0x275B7BC3: art::WorkerT<art::EDProducer>::implBeginJob() (WorkerT.h:125)
==22281==    by 0x8F9B449: art::Worker::beginJob() (Worker.cc:191)
==22281==    by 0x677E729: art::Schedule::beginJob() (Schedule.cc:112)
==22281==    by 0x5A1C7C4: art::EventProcessor::beginJob()::{lambda(art::ScheduleID)#1}::operator()(art::ScheduleID) const (EventProcessor.cc:1344)
==22281==    by 0x5A21649: void art::ScheduleIteration::for_each_schedule<art::EventProcessor::beginJob()::{lambda(art::ScheduleID)#1}>(art::EventProcessor::beginJob()::{lambda(art::ScheduleID)#1}) const (ScheduleIteration.h:36)
==22281==    by 0x5A1C8DC: art::EventProcessor::beginJob() (EventProcessor.cc:1343)
==22281==    by 0x5A27CED: std::enable_if<art::is_above_most_deeply_nested_level((art::Level)0), void>::type art::EventProcessor::begin<(art::Level)0>() (EventProcessor.cc:333)
==22281==    by 0x5A312C8: void art::EventProcessor::process<(art::Level)0>()::{lambda()#1}::operator()() const (EventProcessor.cc:1255)
==22281== 
==22281== 1,048 (24 direct, 1,024 indirect) bytes in 1 blocks are definitely lost in loss record 60,216 of 63,444
==22281==    at 0x4C2A243: operator new(unsigned long) (vg_replace_malloc.c:334)
==22281==    by 0x27567EBA: proto::BeamEvent::beginJob() (BeamEvent_module.cc:1831)
==22281==    by 0x66C0A76: art::EDProducer::beginJobWithFrame(art::ProcessingFrame const&) (EDProducer.cc:54)
==22281==    by 0x6797142: art::detail::Producer::doBeginJob() (Producer.cc:37)
==22281==    by 0x275B7BC3: art::WorkerT<art::EDProducer>::implBeginJob() (WorkerT.h:125)
==22281==    by 0x8F9B449: art::Worker::beginJob() (Worker.cc:191)
==22281==    by 0x677E729: art::Schedule::beginJob() (Schedule.cc:112)
==22281==    by 0x5A1C7C4: art::EventProcessor::beginJob()::{lambda(art::ScheduleID)#1}::operator()(art::ScheduleID) const (EventProcessor.cc:1344)
==22281==    by 0x5A21649: void art::ScheduleIteration::for_each_schedule<art::EventProcessor::beginJob()::{lambda(art::ScheduleID)#1}>(art::EventProcessor::beginJob()::{lambda(art::ScheduleID)#1}) const (ScheduleIteration.h:36)
==22281==    by 0x5A1C8DC: art::EventProcessor::beginJob() (EventProcessor.cc:1343)
==22281==    by 0x5A27CED: std::enable_if<art::is_above_most_deeply_nested_level((art::Level)0), void>::type art::EventProcessor::begin<(art::Level)0>() (EventProcessor.cc:333)
==22281==    by 0x5A312C8: void art::EventProcessor::process<(art::Level)0>()::{lambda()#1}::operator()() const (EventProcessor.cc:1255)
==22281== 

History

#1 Updated by Jacob Calcutt 8 months ago

  • Status changed from New to Closed

Fixed all memory issues reported by valgrind listed here (plus extras which were not listed)



Also available in: Atom PDF