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 <print>
#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.

Macros

#define PR(FMT, ...)

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
CoreDumpSvc * CoreDumpSvcHandler::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.

Macro Definition Documentation

◆ PR

#define PR ( FMT,
... )
Value:
std::println(os, FMT __VA_OPT__(,) __VA_ARGS__)

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 384 of file CoreDumpSvc.cxx.

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