ATLAS Offline Software
Loading...
Searching...
No Matches
CoreDumpSvc.cxx File Reference

Implementation of the CoreDumpSvc. More...

#include <ctime>
#include <cstdio>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
#include <time.h>
#include <sys/types.h>
#include <sys/sysinfo.h>
#include "CoreDumpSvc.h"
#include "TSystem.h"
#include "Gaudi/Property.h"
#include "GaudiKernel/IAlgorithm.h"
#include "GaudiKernel/IIncidentSvc.h"
#include "GaudiKernel/IAlgContextSvc.h"
#include "GaudiKernel/IAlgExecStateSvc.h"
#include "GaudiKernel/IAlgManager.h"
#include "GaudiKernel/ServiceHandle.h"
#include "GaudiKernel/System.h"
#include "GaudiKernel/ConcurrencyFlags.h"
#include "GaudiKernel/EventContext.h"
#include "AthenaKernel/IAthenaSummarySvc.h"
#include "StoreGate/StoreGateSvc.h"
#include "CxxUtils/SealCommon.h"
#include "CxxUtils/SealSignal.h"
#include "CxxUtils/SealDebug.h"
#include "CxxUtils/read_athena_statm.h"
#include "CxxUtils/checker_macros.h"

Go to the source code of this file.

Namespaces

namespace  CoreDumpSvcHandler
 Signal handler for CoreDumpSvc.

Typedefs

typedef std::map< int, struct sigaction > CoreDumpSvcHandler::SigHandler_t

Functions

bool CoreDumpSvcHandler::callOldHandler (true)
 forward calls to old handlers?
bool CoreDumpSvcHandler::dumpCoreFile (false)
 dump core file on exit?
bool CoreDumpSvcHandler::stackTrace (false)
 produce stack trace?
bool CoreDumpSvcHandler::fastStackTrace (false)
 produce fast stack trace using CxxUtils/Seal
CoreDumpSvcCoreDumpSvcHandler::coreDumpSvc (nullptr)
 pointer to CoreDumpSvc
std::ostream &log CoreDumpSvcHandler::ATLAS_NOT_THREAD_SAFE ()
 convenience method for logging
void action CoreDumpSvcHandler::ATLAS_NOT_THREAD_SAFE (int sig, siginfo_t *info, void *extra)
 Signal handler for the CoreDumpSvc.
void CoreDumpSvc::print ATLAS_NOT_THREAD_SAFE ()
 Install fatal handler with default options.

Variables

SigHandler_t CoreDumpSvcHandler::oldSigHandler
 old signal handlers

Detailed Description

Implementation of the CoreDumpSvc.

Author
Frank Winklmeier

Definition in file CoreDumpSvc.cxx.

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

void CoreDumpSvc::print ATLAS_NOT_THREAD_SAFE ( )

Install fatal handler with default options.

This is meant to be easy to call from python via ctypes.

Definition at line 379 of file CoreDumpSvc.cxx.

380{
381 // Print a FATAL message but don't use the MsgStream anymore once we crashed
382 CoreDumpSvcHandler::log() << name() << " FATAL Caught fatal signal. Printing details to "
383 << m_coreDumpStream.value()
384 << (m_dumpCoreFile ? ". Will try to produce a core dump file on exit." : ".")
385 << std::endl;
386
387 CoreDumpSvcHandler::log() << dump() << std::flush;
388}
-event-from-file