cms-sw / cmssw

CMS Offline Software
http://cms-sw.github.io/
Apache License 2.0
1.09k stars 4.33k forks source link

Conditional jump or move depends on uninitialized variable in `SiPixelDigitizerAlgorithm::add_noise()` #46759

Open makortel opened 9 hours ago

makortel commented 9 hours ago

From https://github.com/cms-sw/cmssw/issues/42564#issuecomment-2492556852 Valgrind on workflow 250202.5 step 2 reports

==3506566== Conditional jump or move depends on uninitialised value(s)
==3506566==    at 0x55237B54: SiPixelDigitizerAlgorithm::add_noise(PixelGeomDetUnit const*, float, CLHEP::HepRandomEngine*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/pluginSimTrackerSiPixelDigitizerPlugins.so)
==3506566==    by 0x5522DF4C: SiPixelDigitizerAlgorithm::digitize(PixelGeomDetUnit const*, std::vector<PixelDigi, std::allocator<PixelDigi> >&, std::vector<PixelDigiSimLink, std::allocator<PixelDigiSimLink> >&, std::vector<PixelDigiAddTempInfo, std::allocator<PixelDigiAddTempInfo> >&, TrackerTopology const*, CLHEP::HepRandomEngine*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/pluginSimTrackerSiPixelDigitizerPlugins.so)
==3506566==    by 0x5521B3DB: cms::SiPixelDigitizer::finalizeEvent(edm::Event&, edm::EventSetup const&) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/pluginSimTrackerSiPixelDigitizerPlugins.so)
==3506566==    by 0x49737BCA: edm::MixingModule::finalizeEvent(edm::Event&, edm::EventSetup const&) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/pluginSimGeneralMixingModulePlugins.so)
==3506566==    by 0x497A0D10: edm::BMixingModule::produce(edm::Event&, edm::EventSetup const&) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libMixingBase.so)
==3506566==    by 0x4C88FC2: edm::stream::EDProducerAdaptorBase::doEvent(edm::EventTransitionInfo const&, edm::ActivityRegistry*, edm::ModuleCallingContext const*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x4C7053B: edm::WorkerT<edm::stream::EDProducerAdaptorBase>::implDo(edm::EventTransitionInfo const&, edm::ModuleCallingContext const*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x4BF4CF8: std::__exception_ptr::exception_ptr edm::Worker::runModuleAfterAsyncPrefetch<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(std::__exception_ptr::exception_ptr, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::TransitionInfoType const&, edm::StreamID, edm::ParentContext const&, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::Context const*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x4BF51F0: edm::Worker::RunModuleTask<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >::execute() (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x421B237: tbb::detail::d1::function_task<edm::WaitingTaskList::announce()::{lambda()#1}>::execute(tbb::detail::d1::execution_data&) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreConcurrency.so)
==3506566==    by 0x64553E0: UnknownInlinedFun (task_dispatcher.h:322)
==3506566==    by 0x64553E0: UnknownInlinedFun (task_dispatcher.h:458)
==3506566==    by 0x64553E0: tbb::detail::r1::task_dispatcher::execute_and_wait(tbb::detail::d1::task*, tbb::detail::d1::wait_context&, tbb::detail::d1::task_group_context&) (task_dispatcher.cpp:168)
==3506566==    by 0x4B7539A: edm::FinalWaitingTask::wait() (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x4B82E2E: edm::EventProcessor::processRuns() (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x4B832E0: edm::EventProcessor::runToCompletion() (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x40840B: tbb::detail::d1::task_arena_function<main::{lambda()#1}::operator()() const::{lambda()#1}, void>::operator()() const (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/bin/el8_amd64_gcc12/cmsRun)
==3506566==    by 0x64419AC: tbb::detail::r1::task_arena_impl::execute(tbb::detail::d1::task_arena_base&, tbb::detail::d1::delegate_base&) (arena.cpp:688)
==3506566==    by 0x40A0F1: main::{lambda()#1}::operator()() const (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/bin/el8_amd64_gcc12/cmsRun)
==3506566==    by 0x4050FF: main (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/bin/el8_amd64_gcc12/cmsRun)
==3506566==  Uninitialised value was created by a heap allocation
==3506566==    at 0x403BEE1: operator new(unsigned long) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/external/valgrind/3.23.0-143b83b3001a13f5bb2e0a4b5445fed5/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==3506566==    by 0x55237B00: SiPixelDigitizerAlgorithm::add_noise(PixelGeomDetUnit const*, float, CLHEP::HepRandomEngine*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/pluginSimTrackerSiPixelDigitizerPlugins.so)
==3506566==    by 0x5522DF4C: SiPixelDigitizerAlgorithm::digitize(PixelGeomDetUnit const*, std::vector<PixelDigi, std::allocator<PixelDigi> >&, std::vector<PixelDigiSimLink, std::allocator<PixelDigiSimLink> >&, std::vector<PixelDigiAddTempInfo, std::allocator<PixelDigiAddTempInfo> >&, TrackerTopology const*, CLHEP::HepRandomEngine*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/pluginSimTrackerSiPixelDigitizerPlugins.so)
==3506566==    by 0x5521B3DB: cms::SiPixelDigitizer::finalizeEvent(edm::Event&, edm::EventSetup const&) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/pluginSimTrackerSiPixelDigitizerPlugins.so)
==3506566==    by 0x49737BCA: edm::MixingModule::finalizeEvent(edm::Event&, edm::EventSetup const&) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/pluginSimGeneralMixingModulePlugins.so)
==3506566==    by 0x497A0D10: edm::BMixingModule::produce(edm::Event&, edm::EventSetup const&) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libMixingBase.so)
==3506566==    by 0x4C88FC2: edm::stream::EDProducerAdaptorBase::doEvent(edm::EventTransitionInfo const&, edm::ActivityRegistry*, edm::ModuleCallingContext const*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x4C7053B: edm::WorkerT<edm::stream::EDProducerAdaptorBase>::implDo(edm::EventTransitionInfo const&, edm::ModuleCallingContext const*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x4BF4CF8: std::__exception_ptr::exception_ptr edm::Worker::runModuleAfterAsyncPrefetch<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >(std::__exception_ptr::exception_ptr, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::TransitionInfoType const&, edm::StreamID, edm::ParentContext const&, edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1>::Context const*) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x4BF51F0: edm::Worker::RunModuleTask<edm::OccurrenceTraits<edm::EventPrincipal, (edm::BranchActionType)1> >::execute() (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x421B237: tbb::detail::d1::function_task<edm::WaitingTaskList::announce()::{lambda()#1}>::execute(tbb::detail::d1::execution_data&) (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreConcurrency.so)
==3506566==    by 0x64553E0: UnknownInlinedFun (task_dispatcher.h:322)
==3506566==    by 0x64553E0: UnknownInlinedFun (task_dispatcher.h:458)
==3506566==    by 0x64553E0: tbb::detail::r1::task_dispatcher::execute_and_wait(tbb::detail::d1::task*, tbb::detail::d1::wait_context&, tbb::detail::d1::task_group_context&) (task_dispatcher.cpp:168)
==3506566==    by 0x4B7539A: edm::FinalWaitingTask::wait() (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x4B82E2E: edm::EventProcessor::processRuns() (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x4B832E0: edm::EventProcessor::runToCompletion() (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/lib/el8_amd64_gcc12/libFWCoreFramework.so)
==3506566==    by 0x40840B: tbb::detail::d1::task_arena_function<main::{lambda()#1}::operator()() const::{lambda()#1}, void>::operator()() const (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/bin/el8_amd64_gcc12/cmsRun)
==3506566==    by 0x64419AC: tbb::detail::r1::task_arena_impl::execute(tbb::detail::d1::task_arena_base&, tbb::detail::d1::delegate_base&) (arena.cpp:688)
==3506566==    by 0x40A0F1: main::{lambda()#1}::operator()() const (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/bin/el8_amd64_gcc12/cmsRun)
==3506566==    by 0x4050FF: main (in /cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02864/el8_amd64_gcc12/cms/cmssw/CMSSW_14_2_X_2024-11-17-0000/bin/el8_amd64_gcc12/cmsRun)
cmsbuild commented 9 hours ago

cms-bot internal usage

cmsbuild commented 9 hours ago

A new Issue was created by @makortel.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

makortel commented 9 hours ago

assign SimTracker/SiPixelDigitizer

cmsbuild commented 9 hours ago

New categories assigned: simulation

@civanch,@kpedro88,@mdhildreth you have been requested to review this Pull request/Issue and eventually sign? Thanks

makortel commented 9 hours ago

I'll re-run valgrind with debug symbols in SiPixelDigitizerAlgorithm to get line numbers