core

Core From Hackepedia

When a process receives certain signals it will exit and dump core. This is the state of the process when the signal arrived. A debugger such as gdb can be used to examine this corefile. A corefile can be called "core", "program.core" or even be configured to be written to a certain location (in FreeBSD). A program can switch off writing a corefile by setting the resource limit "core file size" (RLIMIT_CORE) to 0.

The kernel also can dump core upon a panic or when instructed to do so. It saves the corefile to swap which is then transferred upon the next boot to /var/crash, it's a good idea to have the /var filesystem big enough to accomodate the size of the physical memory of the system.

Signals that cause a process to dump core


    SIGQUIT     create core image   quit program
    SIGILL      create core image   illegal instruction
    SIGTRAP     create core image   trace trap
    SIGABRT     create core image   abort(3) call (formerly SIGIOT)
    SIGEMT      create core image   emulate instruction executed
    SIGFPE      create core image   floating-point exception
    SIGBUS      create core image   bus error
    SIGSEGV     create core image   segmentation violation
    SIGSYS      create core image   system call given invalid argument
    SIGEMT      create core image   emulate instruction executed
    SIGFPE      create core image   floating-point exception
    SIGBUS      create core image   bus error
    SIGSEGV     create core image   segmentation violation
    SIGSYS      create core image   system call given invalid argument


German - von Hackepedia

Wenn bestimmte Signalle in einem Programm empfangen werden, dann stürtzt das programm ab und hinterlässt ein "core" bild (das ist eine datei mit dem namen "core"). Dieser core ist das bild eines prozesses wenn das signal angekommen ist. Ein "debugger" (entwanzer) so wie gdb kann dann benutzt werden um das bild des programms zu examinieren. Eine core-datei kann "core" heissen, "programm.core" oder auch konfigurierbar zu einem bestimmten Verzeichniss geschrieben werden (in FreeBSD zum beispiel). Ein programm kann auch das schreiben einer "core" datei abschalten mit dem Resource limit "core file size" (RLIMIT_CORE) wenn dies auf 0 gesetzt wird.

Das Kernel kann auch ein "core" file machen wenn es abstürtzt mit einer Kernel-Panik. Es schreibt dann den corefile zu dem "swap" und wird dann auf eine Partition geschrieben nach dem nächsten start (es wird zu /var/crash in BSD geschrieben). Deswegen ist es eine gute Idee /var grösser machen zu lassen als es RAM Speicher gibt, so das das core bild reinpasst.

DeutschEnglish
Panikpanic
Kerncore
Verzeichnissdirectory