Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

ven81.c File Reference


Detailed Description

KERNEL main.

---------------------------------------------------------------------

Author:
JoergM
See also:
example.html ...
---------------------------------------------------------------------

Definition in file ven81.c.

#include "RunTime/RTE_Types.h"
#include "heo07.h"
#include "gen60.h"
#include "heo00.h"
#include "geo50_0.h"
#include "gen00.h"
#include "geo007_1.h"
#include "hen40.h"
#include "gen41.h"
#include "gen43.h"
#include "gen45.h"
#include "hen50.h"
#include "gen52.h"
#include "gen54.h"
#include "geo67.h"
#include "gen70.h"
#include "gen71.h"
#include "gen72.h"
#include "gen74.h"
#include "gen75.h"
#include "gen79.h"
#include "gen81.h"
#include "gen83.h"
#include "gen84.h"
#include "gen85.h"
#include "gen88.h"
#include "heo92.h"
#include "hsp100.h"
#include "geo57.h"
#include "heo15.h"
#include "RunTime/Diagnose/RTEDiag_ServerCrashHist.h"
#include "RunTime/System/RTESys_Time.h"
#include "Trace/Trace_InfoPage.h"
#include "RunTime/RTE_Speed.h"
#include <pwd.h>
#include <sys/wait.h>
#include "RunTime/MemoryManagement/RTEMem_PageAllocator.h"
#include "gip00.h"
#include "liveCache/MemoryManagement/LVCMem_Allocator.h"
#include <sys/resource.h>
#include <unistd.h>
#include <grp.h>
#include <ucontext.h>
#include "RunTime/RTE_DiagPipe.h"
#include "RunTime/Threading/RTEThread_Console.h"
#include "RunTime/Configuration/RTEConf_ParameterAccessKernelInterface.h"
#include "SAPDBCommon/SAPDB_Names.h"
#include "heo670.h"
#include "RunTime/System/RTESys_SystemInfo.h"

Go to the source code of this file.

Classes

struct  _en81_WorkerInfo

Defines

#define DEAD_DETECTION_TIMEOUT_EN81   1
#define DEBUG_COMMAND_BUFFER_MXEN81   (300)
#define ERR_TIMER_BAD_WAITSEM   11036,ERR_TYPE,"timer ","ABEND: strange result from sqltimewaitsem %d"
#define EXIT_CODE_HUP_SIGNAL   42
#define EXIT_CODE_PANIC_SIGNAL   47
#define FILE_CONTENT_MXEN81   8192
#define KERNEL_TERMINATED_BY_HUP_SIGNAL   (-1)
#define MAX_DEADCHECK_SLEEP_SECONDS   600
#define MAX_ENV_PART   114
#define MF__   MOD__"en81_GetDebugEnv"
#define MF__   MOD__"en81_InitEventing"
#define MF__   MOD__"en81_StartAliveThread"
#define MF__   MOD__"en81_InsertKeepAlive"
#define MF__   MOD__"en81_LastWords"
#define MF__   MOD__"en81_SigName"
#define MF__   MOD__"en81CallDebugger"
#define MF__   MOD__"en81RunKernel"
#define MF__   MOD__"en81_InitFirstDescriptors"
#define MF__   MOD__"en81_SetSignalHandler"
#define MF__   MOD__"en81_HupSignaled"
#define MF__   MOD__"en81_CrashAction"
#define MF__   MOD__"en81_CrashAction"
#define MF__   MOD__"en81_CrashSignalHandler"
#define MF__   MOD__"en81_dump_process_core"
#define MF__   MOD__"en81_UktDumpAction"
#define MF__   MOD__"en81_ForkAndExit"
#define MF__   MOD__"en81Abort"
#define MF__   MOD__"en81_StopAction"
#define MF__   MOD__"en81_StopDatabase"
#define MF__   MOD__"en81_resume"
#define MF__   MOD__"en81_WaitForTermination"
#define MF__   MOD__"en81_CreateUkts"
#define MF__   MOD__"en81_CreateRteProcs"
#define MF__   MOD__"en81_CreateWorker"
#define MF__   MOD__"en81_WorkerMain"
#define MF__   MOD__"en81_WaitForWorker"
#define MF__   MOD__"en81_TriggerWorker"
#define MF__   MOD__"en81_CreateKtSemaphores"
#define MF__   MOD__"en81_CreateWorkerSemaphores"
#define MF__   MOD__"en81_Startup"
#define MF__   MOD__"en81TimerThreadWakeup"
#define MF__   MOD__"en81TimerThreadSleep"
#define MF__   MOD__"en81NotifyStarter"
#define MF__   MOD__"en81_kill_database"
#define MF__   MOD__"en81_NotifyCoordinator"
#define MF__   MOD__"en81_kernel_main"
#define MOD__   "ven81.c:"
#define SAPDB_Debug_Env   "SAPDB_Debug_Env"
#define SIG_FORK_AND_EXIT   SIGINT
#define SIG_STOP_DATABASE   SIGTERM
#define TRACE_WRITER_TIMEOUT_EN81   60
#define WCOREDUMP(e_)   (((e_) & 0200) == 0200)

Typedefs

typedef struct _en81_WorkerInfo ten81_WorkerInfo

Functions

int en80RunKernel (struct ten50_KT_Control *pMainThread)
static void en81_AllowCoreDump ()
static void en81_CheckCoroutineUsage (RTE_XPARAM_REC *XparamParameters)
static int en81_CheckTracewriterRunning ()
static void en81_CrashAction ()
static void en81_CrashSignalHandler (int sig, siginfo_t *sigInfo, void *context)
static int en81_CreateKtSemaphores ()
static int en81_CreateRteProcs ()
static int en81_CreateUkts ()
static int en81_CreateWorker (ten81_WorkerInfo *pInfo, void(*work)())
static int en81_CreateWorkerSemaphores (ten81_WorkerInfo *pWorker, int *pIdx)
void en81_dump_process_core ()
 Dump a core of the current process.
static int en81_FillServerDbName (char *dbname, const char *arg0)
static void en81_ForkAndExit (int sig, siginfo_t *sigInfo, void *context)
static int en81_GetDebugEnv (const char *Variable, char *ResultBuffer, const size_t MaxLength)
static void en81_HupSignaled (int sig, siginfo_t *sigInfo, void *context)
static int en81_InitEventing ()
static void en81_InitFirstDescriptors ()
static int en81_InitializePageAllocator (RTE_XPARAM_REC *XParam)
static void * en81_InsertKeepAlive (void *arg)
externC int en81_kernel_main (int argc, char *argv[], char *envp[])
 the coordinator main process prepares for all kernel processes/threads.
externC int en81_kill_database ()
 If the server was in normal operation, try to activate the bufwriter to get dump and trace. When the bufwriter terminates, it's process exits.
static void en81_LastWords (int runKernelExitCode)
externC void en81_NotifyCoordinator (int tw_gone)
 On normal termination each 'main' thread calls this function to terminate the database.
static int en81_ParseCommandLine (int argc, char *argv[], SAPDB_UInt4 *pStartupOptions)
static void en81_resume (struct TASK_TYPE *tcb)
static int en81_SetDefaultAction (int sig)
static int en81_SetIgnoreAction (int sig)
static int en81_SetSigAction (int sig, void(*handler)(int, siginfo_t *, void *))
static void en81_SetSignalHandler (tsp00_Bool suppressCore)
static const char * en81_SigName (int sigCode)
static void en81_StartAliveThread ()
static int en81_Startup (tsp00_Versionc currentVersion, char *envp[])
static void en81_StopAction ()
static void en81_StopDatabase (int sig, siginfo_t *sigInfo, void *context)
static void en81_SuppressCoreDump ()
static void en81_TriggerWorker (ten81_WorkerInfo *pInfo)
static void en81_UktDumpAction ()
static void en81_WaitForTermination ()
static void en81_WaitForWorker (ten81_WorkerInfo *pInfo)
static void * en81_WorkerMain (void *info)
void en81Abort ()
externC int en81CallDebugger ()
 This call tries to call a debugger, if a debug environment is set. Display must be set to your XDisplay identifier, i.e. p26216.0. Make sure that Display is set to the correct value... depends on the Operating System.
externC void en81FinalAction ()
 Called in case kernel crashes.
void en81GetCommandLineOptions (int *pArgc, char ***pArgv)
void en81NotifyStarter ()
 This call tries to notify the starter process.
static void en81OutputResourceLimits (RTE_XPARAM_REC *XparamParameters, char *envp[])
externC int en81RunKernel (struct ten50_KT_Control *pMainThread)
 The 'real kernel' main function.
void en81ShowMaxStackUse ()
 This call shows all maximum stack usages is SHOW_MAX_STACK_USE is set.
externC void en81TimerThreadSleep (tsp00_Int4 SleepPeriod)
 This call enables the timer thread to sleep.
externC void en81TimerThreadWakeup ()
 This call wakes up the timer thread.
static void en81WriteResourceLimitToString (SAPDB_UInt8 size, SAPDB_Char *value, SAPDB_Bool inMB, SAPDB_UInt8 unlimited)
char * getenv (const char *)
void RTETask_CWrapperForCreateWorkerThread (SAPDB_Int4 stackSize)
static void ShowXParamIndependendStatupInformation (tsp00_Versionc currentVersion, tsp00_NodeIdc dbnode)

Variables

volatile int e60_dbgdbglvl
volatile tsp00_Bool en50NoCoreDumpWanted
static ten81_WorkerInfo en81_CrashWorker
tsp00_DbNamec en81_dbname
volatile int en81_KernelGotCrashSignal = 0
long en81_MemPageSize = 0L
 Calls vabort of stack overflow was detected.
volatile int en81_neverStop = 1
static int en81_OtherArgc = 0
static char ** en81_OtherArgv = 0
static tsp00_Pathc en81_pathToExecutable
static ten81_WorkerInfo en81_StopWorker
static teo07_ThreadSemaphore en81_TerminateCondition = NULL
static teo07_ThreadSemaphore en81_TerminateEndCondition = NULL
static teo07_ThreadSemaphore en81_TimerSleepCondition = NULL
static ten81_WorkerInfo en81_UktDumpWorker
int en81_usable_fds = 0
int etext


Generated by  Doxygen 1.6.0   Back to index