17 #include <condition_variable>
72 m_checkThreshold(iPSet.getUntrackedParameter<unsigned int>(
"numberOfAllowedFailedChecksInARow")),
73 m_secsBetweenChecks(iPSet.getUntrackedParameter<unsigned int>(
"secondsBetweenChecks")),
76 m_numberChecksWhenNotAlive(0)
163 edm::LogError(
"JobStuck")<<
"Too long since the job has last made progress.";
169 m_stillAlive =
false;
191 ZombieKillerService::stopThread() {
203 desc.
addUntracked<
unsigned int>(
"secondsBetweenChecks", 60)->setComment(
"Number of seconds to wait between checking if progress has been made.");
204 desc.
addUntracked<
unsigned int>(
"numberOfAllowedFailedChecksInARow", 3)->setComment(
"Number of allowed checks in a row with no progress.");
205 descriptions.
add(
"ZombieKillerService", desc);
void watchPostModuleGlobalEndLumi(PostModuleGlobalEndLumi::slot_type const &iSlot)
void watchPreModuleGlobalBeginRun(PreModuleGlobalBeginRun::slot_type const &iSlot)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
static boost::mutex mutex
void watchPostModuleEndStream(PostModuleEndStream::slot_type const &iSlot)
void watchPreModuleEvent(PreModuleEvent::slot_type const &iSlot)
void watchPostModuleEvent(PostModuleEvent::slot_type const &iSlot)
const unsigned int m_checkThreshold
void watchPostModuleGlobalBeginLumi(PostModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamEndLumi(PostModuleStreamEndLumi::slot_type const &iSlot)
void watchPostModuleStreamBeginRun(PostModuleStreamBeginRun::slot_type const &iSlot)
void watchPostSourceEvent(PostSourceEvent::slot_type const &iSlot)
void watchPreModuleBeginStream(PreModuleBeginStream::slot_type const &iSlot)
void watchPreModuleGlobalEndRun(PreModuleGlobalEndRun::slot_type const &iSlot)
void watchPostSourceRun(PostSourceRun::slot_type const &iSlot)
void watchPreSourceLumi(PreSourceLumi::slot_type const &iSlot)
void watchPreModuleEndJob(PreModuleEndJob::slot_type const &iSlot)
void watchPreSourceRun(PreSourceRun::slot_type const &iSlot)
void watchPreModuleGlobalBeginLumi(PreModuleGlobalBeginLumi::slot_type const &iSlot)
void watchPostModuleStreamEndRun(PostModuleStreamEndRun::slot_type const &iSlot)
void watchPreModuleStreamBeginLumi(PreModuleStreamBeginLumi::slot_type const &iSlot)
#define DEFINE_FWK_SERVICE(type)
void watchPostModuleBeginStream(PostModuleBeginStream::slot_type const &iSlot)
bool isProcessWideService(ZombieKillerService const *)
std::atomic< unsigned int > m_numberChecksWhenNotAlive
void watchPostSourceLumi(PostSourceLumi::slot_type const &iSlot)
void watchPostModuleGlobalEndRun(PostModuleGlobalEndRun::slot_type const &iSlot)
void watchPostModuleStreamBeginLumi(PostModuleStreamBeginLumi::slot_type const &iSlot)
void watchPreModuleStreamEndLumi(PreModuleStreamEndLumi::slot_type const &iSlot)
void watchPreModuleStreamBeginRun(PreModuleStreamBeginRun::slot_type const &iSlot)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void watchPreModuleEndStream(PreModuleEndStream::slot_type const &iSlot)
const unsigned int m_secsBetweenChecks
std::atomic< bool > m_stillAlive
void watchPreModuleStreamEndRun(PreModuleStreamEndRun::slot_type const &iSlot)
ZombieKillerService(edm::ParameterSet const &, edm::ActivityRegistry &)
void watchPostModuleGlobalBeginRun(PostModuleGlobalBeginRun::slot_type const &iSlot)
void watchPreSourceEvent(PreSourceEvent::slot_type const &iSlot)
volatile std::atomic< bool > shutdown_flag false
std::mutex m_jobDoneMutex
std::thread m_watchingThread
void watchPostModuleEndJob(PostModuleEndJob::slot_type const &iSlot)
void watchPreModuleGlobalEndLumi(PreModuleGlobalEndLumi::slot_type const &iSlot)
std::condition_variable m_jobDoneCondition
void watchPostBeginJob(PostBeginJob::slot_type const &iSlot)
convenience function for attaching to signal