File indexing completed on 2024-04-06 12:31:46
0001
0002 from __future__ import print_function
0003 import sys
0004
0005 fileName = sys.argv[1]
0006
0007 f = open(fileName,'r')
0008
0009 messageToIgnore = [
0010 'edm::FunctorTask'
0011 ,'edm::FunctorWaitingTask'
0012 ,'edm::ModuleCallingContext::setContext'
0013 ,'edm::SerialTaskQueue::'
0014 ,'edm::SerialTaskQueueChain::'
0015 ,'edm::WaitingTaskList'
0016 ,'edm::Worker::RunModuleTask<'
0017 ,'edm::Worker::beginStream'
0018 ,'edm::eventsetup::EventSetupRecord::getFromProxy'
0019 ,'edm::GlobalSchedule::processOneGlobalAsync'
0020 ,'edm::SerialTaskQueueChain::push'
0021 ,'edm::Worker::doWorkNoPrefetchingAsync'
0022 ,'edm::ServiceRegistry::setContext'
0023 ,'edm::ServiceRegistry::presentToken()'
0024 ,'edm::service::InitRootHandlers::ThreadTracker::on_scheduler_entry'
0025 ,'__TBB_machine_fetchstore4'
0026 ,'__TBB_machine_cmpswp4'
0027 ,'__TBB_machine_fetchstore1'
0028 ,'acquire (spin_rw_mutex.h:118)'
0029 ,'reset_extra_state ('
0030 ,'priority (scheduler_common.h:130)'
0031 ,'edm::service::MessageLogger::'
0032
0033
0034 ,'edm::service::MessageLogger::unEstablishModule'
0035 ,'tbb::'
0036 ,'edm::RunForOutput::RunForOutput('
0037 ,'edm::stream::EDAnalyzerAdaptor<'
0038 ,'edm::EventSetup::find('
0039 ,'edm::eventsetup::EventSetupRecord::find('
0040 ,'edm::eventsetup::DataKey::operator<('
0041 ,'edm::eventsetup::SimpleStringTag::operator<('
0042 ,'std::__shared_ptr<edm::serviceregistry::ServicesManager'
0043 ,'try_acquire (spin_mutex.h:109)'
0044 ,'edm::Run::Run('
0045 ,'FastTimerService::preStreamBeginRun('
0046 ,'decltype ({parm#1}()) edm::convertException::wrap<bool edm::Worker::runModule'
0047 ,'edm::Worker::reset()'
0048 ,'edm::stream::ProducingModuleAdaptorBase<edm::stream::EDProducerBase>::doStreamBeginLuminosityBlock('
0049 ,'edm::stream::ProducingModuleAdaptorBase<edm::stream::EDFilterBase>::doStreamBeginLuminosityBlock('
0050 ,'edm::LuminosityBlock::LuminosityBlock(edm::LuminosityBlockPrincipal'
0051 ,'edm::StreamSchedule::processOneStreamAsync<'
0052 ,'edm::Worker::doWorkAsync<'
0053 ,'edm::StreamSchedule::processOneEventAsync('
0054 ,'edm::ParentContext::moduleCallingContext()'
0055 ,'edm::ModuleCallingContext::getTopModuleCallingContext'
0056 ,'edm::Event::Event('
0057 ,'edm::Path::workerFinished('
0058 ,'edm::Path::updateCounters('
0059 ,'edm::Path::recordStatus('
0060 ,'FastTimerService::postPathEvent('
0061 ,'edm::hash_detail::isCompactForm_('
0062 ,'edm::InputProductResolver::resolveProduct_'
0063 ,'edm::NoProcessProductResolver::dataValidFromResolver('
0064 ,'edm::DataManagingProductResolver::productWasFetchedAndIsValid_(bool)'
0065 ,'FastTimerService::postModuleEvent('
0066 ,'edm::UnscheduledProductResolver::prefetchAsync_'
0067
0068
0069 ,'edm::NoProcessProductResolver::'
0070 ,'reco::Jet::detectorP4'
0071 ,'edm::EarlyDeleteHelper::moduleRan'
0072 ,'edm::clearLoggedErrorsSummary('
0073 ,'edm::ProductProvenanceRetriever::branchIDToProvenance('
0074 ,'HistogramProbabilityEstimator::probability'
0075 ,'edm::EventPrincipal::setLuminosityBlockPrincipal'
0076 ,'edm::DataManagingProductResolver::'
0077 ]
0078
0079 stackToIgnore = [
0080 'edm::service::MessageLogger::'
0081 ,'edm::MessageSender::ErrorObjDeleter'
0082 ,'edm::Run::runPrincipal() const'
0083 ,'edm::WaitingTaskList::'
0084 ,'edm::EventProcessor::beginJob()'
0085 ,'edm::StreamSchedule::processOneEventAsync'
0086 ,'edm::WorkerManager::resetAll()'
0087 ,'edm::ParentageRegistry::insertMapped('
0088 ,'edm::one::EDFilterBase::doEvent('
0089 ,'edm::one::EDProducerBase'
0090 ,'edm::EventBase::triggerNames_'
0091 ,'edm::EDFilter::doEvent('
0092 ,'edm::EDAnalyzer::doEvent('
0093 ,'edm::one::OutputModuleBase::doEvent'
0094 ,'edm::EDProducer::doEvent'
0095 ,'edm::Principal::clearPrincipal'
0096 ,'edm::RootOutputFile::writeOne'
0097 ,'edm::PrincipalCache::deleteRun('
0098 ,'edm::eventsetup::EventSetupProvider::eventSetupForInstance'
0099 ,'edm::EventPrincipal::clearEventPrincipal()'
0100 ,'FastTimerService::Resources::operator+='
0101 ,'FastTimerService::preSourceEvent(edm::StreamID)'
0102 ,'edm::EventPrincipal::fillEventPrincipal('
0103 ,'edm::InputProductResolver::putProduct_('
0104 ]
0105
0106 addressesToIgnore = [
0107
0108
0109
0110
0111 'is in a rw- anonymous segment'
0112
0113 ,'tbb::internal::arena::arena('
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127 ,'DQMStore::book'
0128 ,'L1TdeCSCTF::L1TdeCSCTF'
0129
0130 ,'std::vector<reco::TrackExtra'
0131 ,'std::vector<reco::Track'
0132 ,'std::vector<reco::PFConversion'
0133 ]
0134
0135 addressesToIgnoreIfRead = [
0136 'edm::eventsetup::makeEventSetupProvider('
0137 ,' edm::eventsetup::DataProxy::get('
0138 ,'cond::createPayload<'
0139 ,'edm::pset::Registry::getMapped('
0140
0141 ,'edm::RootFile::fillRunAuxiliary'
0142
0143 ,'edm::EventPrincipal::fillEventPrincipal('
0144 ,'edm::Principal::addUnscheduledProduct('
0145 ,'edm::RootDelayedReader::getProduct_'
0146 ,'TBranchElement::GetEntry('
0147 ,'edm::Event::put<'
0148 ,'edm::stream::EDProducerAdaptorBase::doEvent'
0149 ,'edm::stream::EDFilterAdaptorBase::doEvent('
0150 ,'edm::EventProcessor::init('
0151 ,'edm::global::EDProducerBase::doEvent'
0152 ,'FastTimerService::postBeginJob()'
0153 ,'edm::EDProducer::doEvent('
0154 ,'_ZN3pat15PackedCandidate27covarianceParameterization_E'
0155 ,'edm::RootOutputFile::writeOne'
0156 ,'BSS segment'
0157 ,'bytes inside data symbol'
0158 ,'FSQ::HandlerTemplate'
0159
0160 ,'TBufferFile::'
0161 ,'edm::service::MessageLogger::'
0162 ,'TClass::GetClass('
0163 ]
0164
0165
0166 endOfMessage ='-------------------'
0167 startOfMessage = 'Possible data race'
0168 startOfMessageLength = len(startOfMessage)
0169 messageStarted = False
0170 lineCount = 100
0171 buffer = []
0172 maxCount = 20
0173 lookForAddress = False
0174 foundAddress = False
0175 addressCount = 100
0176 possibleDataRaceRead = False
0177 foundStartOfMessage = False
0178 for l in f.readlines():
0179 if l[:2] != '==':
0180 continue
0181 if l.find(endOfMessage) != -1:
0182 foundAddress = False
0183 addressCount = 100
0184 if l.find(startOfMessage) != -1:
0185 lookForAddress = False
0186 foundAddress = False
0187 possibleDataRaceRead = (l.find('data race during read') != -1)
0188 if buffer:
0189
0190 print('---------------------')
0191 for b in buffer:
0192 print(b[:-1])
0193
0194 buffer=[l]
0195 lineCount = 0
0196 continue
0197
0198
0199
0200
0201
0202 if lineCount < maxCount:
0203 skipThis = False
0204 for i in stackToIgnore:
0205 if l.find(i) != -1:
0206 lineCount = 100
0207 skipThis = True
0208 buffer = []
0209 break
0210 if skipThis:
0211 continue
0212 buffer.append(l)
0213 lineCount +=1
0214 if ' at 0x' in l:
0215 for i in messageToIgnore:
0216 if l.find(i) != -1:
0217 buffer = []
0218 lineCount = 100
0219 break
0220 if lineCount == 100:
0221 continue
0222 if l.find('Address 0x') != -1:
0223 lookForAddress = True
0224 foundAddress = False
0225 lineCount = 100
0226 if lineCount == maxCount:
0227 lookForAddress = True
0228 foundAddress = False
0229 lineCount = 100
0230 if lookForAddress:
0231 if l.find('Address 0x') != -1:
0232 foundAddress = True
0233 lookForAddress = False
0234 addressCount = 0
0235 lineCount = 100
0236 if foundAddress:
0237 addressCount +=1
0238 if addressCount < maxCount:
0239 buffer.append(l)
0240 for i in addressesToIgnore:
0241 if l.find(i) != -1:
0242 buffer = []
0243 foundAddress = False
0244 addressCount = 100
0245 break
0246 if possibleDataRaceRead:
0247 for i in addressesToIgnoreIfRead:
0248 if l.find(i) != -1:
0249 buffer = []
0250 foundAddress = False
0251 addressCount = 100
0252 break
0253 if l[-3:]=="== ":
0254 foundAddress = False
0255 addressCount = 100