|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef ATHENASERVICES_COREDUMPSVC_H
6 #define ATHENASERVICES_COREDUMPSVC_H 1
12 #include <tbb/concurrent_unordered_map.h>
20 #include "GaudiKernel/IIncidentListener.h"
68 virtual std::
string dump()
const override;
79 virtual
void handle(
const Incident& incident ) override;
88 typedef tbb::concurrent_unordered_map<std::string,std::string >
UserCore_t;
94 thread_local
static std::vector<uint8_t>
s_stack;
98 Gaudi::Property<std::vector<int>>
m_signals{
this,
"Signals", {SIGSEGV,SIGBUS,SIGILL,SIGFPE,SIGALRM},
99 "List of signals to catch"};
102 "Call previous signal handler"};
105 "Produce a core dump file if resource limits (ulimit -c) allow"};
108 "Produce (gdb) stack trace on crash. Useful if no other signal handler is used"};
111 "Produce fast stack trace of current thread"};
114 "Stream to use for core dump [stdout,stderr]"};
117 "Flags given to the fatal handler this service installs\n"
118 "if the flag is zero, no additional fatal handler is installed."};
120 Gaudi::Property<double>
m_timeout{
this,
"TimeOut", 30.0*60*1e9,
121 "Terminate job after it this reaches the time out in Wallclock time, "
122 "usually due to hanging during stack unwinding. Timeout given in nanoseconds despite seconds precision"};
124 Gaudi::Property<bool>
m_killOnSigInt{
this,
"KillOnSigInt",
true,
"Terminate job on SIGINT (aka Ctrl-C)"};
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
virtual StatusCode start() override
Gaudi::Property< bool > m_fastStackTrace
StatusCode installSignalHandler ATLAS_NOT_THREAD_SAFE()
Install signal handlers.
std::vector< sysDumpRec > m_sysCoreDumps
Core dump info collected by this service
Gaudi::Property< bool > m_callOldHandler
virtual ~CoreDumpSvc() ATLAS_CTORDTOR_NOT_THREAD_SAFE
Destructor.
Gaudi::Property< std::string > m_coreDumpStream
virtual StatusCode initialize ATLAS_NOT_THREAD_SAFE() override
void setAltStack()
Set up an alternate stack for the current thread.
bool const RAWDATA *ch2 const
std::atomic< EventID::event_number_t > m_eventCounter
Event counter.
tbb::concurrent_unordered_map< std::string, std::string > UserCore_t
void propertyHandler ATLAS_NOT_THREAD_SAFE(Gaudi::Details::PropertyBase &p)
Property handler.
void print ATLAS_NOT_THREAD_SAFE()
Print core dump records to configured stream.
virtual void setCoreDumpInfo(const std::string &name, const std::string &value) override
Set a name/value pair in the core dump record.
Service to print additional information before a crash.
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
Gaudi::Property< double > m_timeout
siginfo_t * m_siginfo
Pointer to siginfo_t struct (set by signal handler)
std::ostream &log ATLAS_NOT_THREAD_SAFE()
convenience method for logging
::StatusCode StatusCode
StatusCode definition for legacy code.
CoreDumpSvc()
Default constructor (do not use)
virtual std::string dump() const override
Print all core dump records.
virtual void handle(const Incident &incident) override
Incident listener.
void setSigInfo(siginfo_t *info)
Set pointer to siginfo_t struct.
Signal handler for CoreDumpSvc.
void print(char *figname, TCanvas *c1)
Gaudi::Property< std::vector< int > > m_signals
Alternate stack for signal handler.
Gaudi::Property< bool > m_dumpCoreFile
Gaudi::Property< bool > m_killOnSigInt
Gaudi::Property< bool > m_stackTrace
std::vector< UserCore_t > m_usrCoreDumps
User defined core dump info.
#define ATLAS_CTORDTOR_NOT_THREAD_SAFE
Interface of a core dump service.
static thread_local std::vector< uint8_t > s_stack
Define macros for attributes used to control the static checker.
Gaudi::Property< int > m_fatalHandlerFlags
StatusCode uninstallSignalHandler ATLAS_NOT_THREAD_SAFE()
Uninstall signal handlers.