'\" t
.TH "SYSTEMD\-COREDUMP" "8" "" "systemd 262~rc1" "systemd-coredump"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
systemd-coredump, systemd-coredump.socket, systemd-coredump@.service, systemd-coredump-register.service, systemd-coredumpd.service \- Acquire, save and process core dumps
.SH "SYNOPSIS"
.PP
/usr/lib/systemd/systemd\-coredump
.PP
/usr/lib/systemd/systemd\-coredump
\fB\-\-backtrace\fR
.PP
/usr/lib/systemd/systemd\-coredump
\fB\-\-manager\fR
.PP
/usr/lib/systemd/systemd\-coredump
\fB\-\-check\-requirements\fR
.PP
systemd\-coredump\&.socket
.PP
systemd\-coredump@\&.service
.PP
systemd\-coredump\-register\&.service
.PP
systemd\-coredumpd\&.service
.SH "DESCRIPTION"
.PP
systemd\-coredump@\&.service
is a system service to process core dumps\&. It will log a summary of the event to
\fBsystemd-journald.service\fR(8), including information about the process identifier, owner, the signal that killed the process, and the stack trace if possible\&. It may also save the core dump for later processing\&. See the "Information about the crashed process" section below\&.
.PP
The behavior of a specific program upon reception of a signal is governed by a few factors which are described in detail in
\fBcore\fR(5)\&. In particular, the core dump will only be processed when the related process resource limits (\fBRLIMIT_CORE\fR) are sufficient\&.
.PP
Core dumps can be written to the journal or saved as a file\&. In both cases, they can be retrieved for further processing, for example in
\fBgdb\fR(1)\&. See
\fBcoredumpctl\fR(1), in particular the
\fBlist\fR
and
\fBdebug\fR
verbs\&.
.PP
By default,
\fBsystemd\-coredump\fR
will log the core dump to the journal, including a backtrace if possible, and store the core dump (an image of the memory contents of the process) itself in an external file in
/var/lib/systemd/coredump/\&. These core dumps are deleted after a few days by default; see
/usr/lib/tmpfiles\&.d/systemd\&.conf
for details\&. Note that the removal of core files from the file system and the purging of journal entries are independent, and the core file may be present without the journal entry, and journal entries may point to since\-removed core files\&. Some metadata is attached to core files in the form of extended attributes, so the core files are useful for some purposes even without the full metadata available in the journal entry\&.
.PP
For further details see
\m[blue]\fBsystemd Coredump Handling\fR\m[]\&\s-2\u[1]\d\s+2\&.
.SS "Overview"
.PP
The
\fBsystemd\-coredump\fR
executable does the actual work, but is invoked differently depending on the capabilities of the running kernel\&.
.PP
When the kernel supports the kernel coredump socket protocol (see "Kernel Requirements" below, generally kernel v6\&.19 or newer),
systemd\-coredumpd\&.service
creates and listens on a Unix socket, and
systemd\-coredump\-register\&.service
writes the socket path to
/proc/sys/kernel/core_pattern\&. When a process crashes, the kernel connects to the socket, and sends the core dump of the process through the socket\&. Then,
systemd\-coredumpd\&.service
transfers the core to the corresponding container if the crashed process is in a container environment, otherwise saves the core in the local storage and writes information about the crashed process to journal\&.
.PP
When the running kernel does not meet those requirements, the executable
\fBsystemd\-coredump\fR
is invoked twice: once as the handler by the kernel, and the second time in the
systemd\-coredump@\&.service
to actually write the data to the journal and process and save the core file\&.
.PP
When the kernel invokes
\fBsystemd\-coredump\fR
to handle a core dump this way, it runs in privileged mode, and will connect to the socket created by the
systemd\-coredump\&.socket
unit, which in turn will spawn an unprivileged
systemd\-coredump@\&.service
instance to process the core dump\&. Hence
systemd\-coredump\&.socket
and
systemd\-coredump@\&.service
are helper units which do the actual processing of core dumps and are subject to normal service management\&.
.PP
See "Units" below for details on the individual units involved in either mode\&.
.SS "Command\-line Options"
.PP
\fBsystemd\-coredump\fR
is normally not invoked directly by the user, but by the kernel, or by the units described below\&. It supports the following modes of invocation:
.PP
(no option)
.RS 4
Handles a single core dump\&. This is the mode the kernel uses to invoke
\fBsystemd\-coredump\fR
directly (via
\fIkernel\&.core_pattern\fR) on kernels that do not support the kernel coredump socket protocol, as well as the mode used by
systemd\-coredump@\&.service
to actually process and save a core dump that was handed to it via
systemd\-coredump\&.socket\&.
.RE
.PP
\fB\-\-backtrace\fR
.RS 4
\fBsystemd\-coredump\fR
expects a journal entry in the
\m[blue]\fBJournal Export Format\fR\m[]\&\s-2\u[2]\d\s+2
on standard input\&. The entry should contain a
\fIMESSAGE=\fR
field and any additional metadata fields the caller deems reasonable\&.
\fBsystemd\-coredump\fR
will append additional metadata fields in the same way it does for core dumps received from the kernel\&. In this mode, no core dump is stored in the journal\&.
.RE
.PP
\fB\-\-manager\fR
.RS 4
Runs
\fBsystemd\-coredump\fR
as the long\-running manager process that listens on the kernel coredump socket, accepts connections from the kernel, and forks off worker processes to process each individual core dump\&. This is the mode used internally by
systemd\-coredumpd\&.service
and is not intended to be invoked interactively\&. See "Units" below for details\&.
.sp
Added in version 262\&.
.RE
.PP
\fB\-\-check\-requirements\fR
.RS 4
Checks whether the running kernel and execution environment fulfil the requirements for the kernel coredump socket protocol (see "Kernel Requirements" below), and exits with a non\-zero status if they are not met\&. This is used internally as the
\fIExecCondition=\fR
of
systemd\-coredumpd\&.service
and
systemd\-coredump\-register\&.service, so that those units are skipped, without being marked as failed, on systems where the feature is unavailable\&. It is not intended to be invoked interactively\&.
.sp
Added in version 262\&.
.RE
.SS "Kernel Requirements for the Coredump Socket"
.PP
The kernel coredump socket protocol, used by
systemd\-coredumpd\&.service
and
systemd\-coredump\-register\&.service, requires:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
A kernel that supports the
\fBPIDFD_INFO_COREDUMP\fR
(since kernel v6\&.16) and
\fBPIDFD_INFO_COREDUMP_SIGNAL\fR
(since kernel v6\&.19) flags for the
\fBPIDFD_GET_INFO\fR
\fBioctl\fR(2)
operation on a PID file descriptor (see
\fBpidfd_open\fR(2))\&. Support for these flags is used as an indicator that the kernel is also new enough to support the request\-mode ("@@"\-prefixed) kernel coredump socket
\fIkernel\&.core_pattern\fR, which was introduced in kernel v6\&.17\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBsystemd\-coredump\fR
must be running in the initial PID, USER, and TIME namespaces, i\&.e\&. on the host, not inside a container\&.
.RE
.PP
These conditions are checked with
\fBsystemd\-coredump\fR
\fB\-\-check\-requirements\fR
before
systemd\-coredumpd\&.service
and
systemd\-coredump\-register\&.service
are started\&. If the requirements are not met,
\fBsystemd\-coredump\fR
instead falls back to the legacy invocation via
systemd\-coredump\&.socket
and
systemd\-coredump@\&.service\&.
.SS "Units"
.PP
The following units are involved in processing core dumps\&. Which of them are active depends on whether the kernel coredump socket protocol is available, see "Kernel Requirements" above\&.
.PP
systemd\-coredumpd\&.service
.RS 4
A long\-running manager service, started early at boot on kernels that support the kernel coredump socket protocol\&. It creates and listens on the
\fBAF_UNIX\fR
socket
/run/systemd/coredumpd/kernel
(this path is also passed to the kernel via
\fIkernel\&.core_pattern\fR
by
systemd\-coredump\-register\&.service, see below)\&. When the kernel connects to this socket to submit a core dump,
systemd\-coredumpd\&.service
accepts the connection and forks off a worker process to receive and process that specific core dump, up to a limit of 8 concurrently running workers (once this limit is reached, no further connections are accepted until a worker finishes)\&. Workers that run for longer than 5 minutes are killed automatically\&.
.sp
The configuration in
\fBcoredump.conf\fR(5)
is read once when
systemd\-coredumpd\&.service
starts\&. Since the service keeps running afterwards (rather than being invoked anew for every core dump, as
systemd\-coredump@\&.service
is), changes to
coredump\&.conf
and its drop\-ins are
\fInot\fR
picked up automatically\&. Reload the service to apply configuration changes, see
\fBcoredump.conf\fR(5)
for details\&.
.sp
Added in version 262\&.
.RE
.PP
systemd\-coredump\-register\&.service
.RS 4
A oneshot unit, automatically pulled in and bound to the lifetime of
systemd\-coredumpd\&.service
(it is not meant to be started or stopped manually)\&. Once
systemd\-coredumpd\&.service
is up, this unit points the kernel at it by setting
\fIkernel\&.core_pattern\fR
to the request\-mode ("@@"\-prefixed) socket path
/run/systemd/coredumpd/kernel, and persists this setting to
/run/sysctl\&.d/60\-coredump\&.conf
via
\fBsystemd-sysctl\fR(8)\&. When
systemd\-coredumpd\&.service
is stopped,
systemd\-coredump\-register\&.service
is stopped along with it and reverts
\fIkernel\&.core_pattern\fR
to its previous value\&.
.sp
Because
/run/sysctl\&.d/60\-coredump\&.conf
takes precedence, per the usual
\fBsysctl.d\fR(5)
ordering rules, over the
/usr/lib/sysctl\&.d/50\-coredump\&.conf
file described in "Configuration" below, masking or overriding
50\-coredump\&.conf
alone is
\fInot\fR
sufficient to install a custom
\fIkernel\&.core_pattern\fR
on a system where
systemd\-coredumpd\&.service
is active\&. See "Configuration" below for how to prevent this\&.
.sp
Added in version 262\&.
.RE
.PP
systemd\-coredump\&.socket, systemd\-coredump@\&.service
.RS 4
Legacy handler units, used on kernels that do not support the kernel coredump socket protocol (see "Kernel Requirements" above)\&. The kernel invokes
\fBsystemd\-coredump\fR
directly and in privileged mode for each crash; that instance connects to
systemd\-coredump\&.socket, which in turn spawns an unprivileged
systemd\-coredump@\&.service
instance to actually process and save the core dump\&. Unlike
systemd\-coredumpd\&.service, a fresh
systemd\-coredump@\&.service
instance is started for every core dump, so it always reads the current
coredump\&.conf
configuration\&.
.RE
.SS "Core dumps in Containers/Namespaces"
.PP
The
systemd\-coredump@\&.service
service will automatically attempt to extract a stacktrace from a process as it crashes\&. For this stacktrace symbols will be resolved based on debug information embedded in the crashing ELF image, or equivalent debug information separately available on the host OS\&. For processes that crash inside of local containers or other mount namespace\-based sandboxes, this auxiliary debug information is typically not available on the host (simply because containers typically run different software versions than the host)\&.
systemd\-coredump
provides two mechanisms to address this:
.sp
.RS 4
.ie n \{\
\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
.IP "  1." 4.2
.\}
For full\-OS containers running systemd inside it is a good idea to enable
\fICoredumpReceive=\fR
on the unit (see
\fBsystemd.resource-control\fR(5)), which ensures that coredumps of a container are attempted to be forwarded to
systemd\-coredump@\&.service
running inside the container, i\&.e the container gets to process and store its own core dumps\&. Note that
\fBsystemd-nspawn\fR(1)
defaults to this mode if invoked with the
\fB\-\-boot\fR
switch\&. This mode of operation is generally recommended for security reasons: the security\-sensitive processing of the core dump is done within the confinements of the container itself, by the container\*(Aqs own code, backed by the container\*(Aqs own storage\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
.IP "  2." 4.2
.\}
Alternatively, for more restricted containers (that do not run a proper
init
system as PID 1) it is possible to enable processing of the core dump on the host, with access to the debug information data from the container itself\&. This mode of operation must be enabled via
\fIEnterNamespace=\fR
in
\fBcoredump.conf\fR(5), and defaults to off, for security reasons\&.
.RE
.PP
If both
\fICoredumpReceive=\fR
is enabled on the unit of the container the core dump belongs to, and
\fIEnterNamespace=\fR
is enabled in the
coredump\&.conf
configuration file, the former takes precedence\&.
.SH "CONFIGURATION"
.PP
For programs started by
\fBsystemd\fR, process resource limits can be set by directive
\fILimitCORE=\fR, see
\fBsystemd.exec\fR(5)\&.
.PP
In order to be used by the kernel to handle core dumps,
\fBsystemd\-coredump\fR
must be configured in
\fBsysctl\fR(8)
parameter
\fIkernel\&.core_pattern\fR\&. The syntax of this parameter is explained in
\fBcore\fR(5)\&. systemd installs the file
/usr/lib/sysctl\&.d/50\-coredump\&.conf
which configures
\fIkernel\&.core_pattern\fR
accordingly\&. This file may be masked or overridden to use a different setting following normal
\fBsysctl.d\fR(5)
rules\&. If the sysctl configuration is modified, it must be updated in the kernel before it takes effect, see
\fBsysctl\fR(8)
and
\fBsystemd-sysctl\fR(8)\&.
.PP
On systems where
systemd\-coredumpd\&.service
is active (see "Kernel Requirements" and "Units" above),
systemd\-coredump\-register\&.service
writes its own
\fIkernel\&.core_pattern\fR
setting to
/run/sysctl\&.d/60\-coredump\&.conf
whenever
systemd\-coredumpd\&.service
is running, and this file takes precedence over
/usr/lib/sysctl\&.d/50\-coredump\&.conf\&. As a result, masking or overriding
50\-coredump\&.conf
alone does
\fInot\fR
override the default
\fIkernel\&.core_pattern\fR
on such systems, since
60\-coredump\&.conf
will still take effect\&. To set a custom
\fIkernel\&.core_pattern\fR
of your own on a system where
systemd\-coredumpd\&.service
is available, you must additionally stop (if currently running) and mask
systemd\-coredumpd\&.service:
.sp
.if n \{\
.RS 4
.\}
.nf
systemctl mask \-\-now systemd\-coredumpd\&.service
.fi
.if n \{\
.RE
.\}
.sp
Masking
systemd\-coredumpd\&.service
also prevents
systemd\-coredump\-register\&.service, which is bound to it, from running and writing
60\-coredump\&.conf\&.
.PP
In order to be used in the
\fB\-\-backtrace\fR
mode, an appropriate backtrace handler must be installed on the sender side\&. For example, in case of
\fBpython\fR(1), this means a
\fIsys\&.excepthook\fR
must be installed, see
\m[blue]\fBsystemd\-coredump\-python\fR\m[]\&\s-2\u[3]\d\s+2\&.
.PP
The behavior of
\fBsystemd\-coredump\fR
itself is configured through the configuration file
/etc/systemd/coredump\&.conf
and corresponding snippets
/etc/systemd/coredump\&.conf\&.d/*\&.conf, see
\fBcoredump.conf\fR(5)\&. When core dumps are processed via
systemd\-coredump@\&.service
(see "Units" above), a new instance of
\fBsystemd\-coredump\fR
is invoked upon receiving every core dump, and changes in these files will take effect the next time a core dump is received\&. When core dumps are instead processed by the long\-running
systemd\-coredumpd\&.service, configuration changes require an explicit reload of that service to take effect; see
\fBcoredump.conf\fR(5)
for details\&.
.PP
Resources used by core dump files are restricted in two ways\&. Parameters like maximum size of acquired core dumps and files can be set in files
/etc/systemd/coredump\&.conf
and snippets mentioned above\&. In addition the storage time of core dump files is restricted by
\fBsystemd\-tmpfiles\fR, corresponding settings are by default in
/usr/lib/tmpfiles\&.d/systemd\&.conf\&. The default is to delete core dumps after a few days; see the above file for details\&.
.SS "Disabling coredump processing"
.PP
To disable potentially resource\-intensive processing by
\fBsystemd\-coredump\fR, set
.sp
.if n \{\
.RS 4
.\}
.nf
Storage=none
ProcessSizeMax=0
.fi
.if n \{\
.RE
.\}
.sp
in
\fBcoredump.conf\fR(5)\&.
.SH "INFORMATION ABOUT THE CRASHED PROCESS"
.PP
\fBcoredumpctl\fR(1)
can be used to retrieve saved core dumps independently of their location, to display information, and to process them e\&.g\&. by passing to the GNU debugger (gdb)\&.
.PP
Data stored in the journal can be also viewed with
\fBjournalctl\fR(1)
as usual (or from any other process, using the
\fBsd-journal\fR(3)
API)\&. The relevant messages have
\fBMESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1\fR:
.sp
.if n \{\
.RS 4
.\}
.nf
$ journalctl MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1 \-o verbose
\&...
MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1
COREDUMP_PID=552351
COREDUMP_UID=1000
COREDUMP_GID=1000
COREDUMP_SIGNAL_NAME=SIGSEGV
COREDUMP_SIGNAL=11
COREDUMP_CODE=2
COREDUMP_TIMESTAMP=1614342930000000
COREDUMP_COMM=Web Content
COREDUMP_EXE=/usr/lib64/firefox/firefox
COREDUMP_USER_UNIT=app\-gnome\-firefox\-552136\&.scope
COREDUMP_CMDLINE=/usr/lib64/firefox/firefox \-contentproc \-childID 5 \-isForBrowser \&...
COREDUMP_CGROUP=/user\&.slice/user\-1000\&.slice/user@1000\&.service/app\&.slice/app\-\&...\&.scope
COREDUMP_FILENAME=/var/lib/systemd/coredump/core\&.Web\&...\&.552351\&.\&...\&.zst
\&...
.fi
.if n \{\
.RE
.\}
.PP
The following fields are saved (if known) with the journal entry
.PP
\fICOREDUMP_UID=\fR, \fICOREDUMP_PID=\fR, \fICOREDUMP_GID=\fR
.RS 4
The process number (PID), owner user number (UID), and group number (GID) of the crashed process\&.
.sp
When the crashed process was part of a container (or in a process or user namespace in general), those are the values as seen
\fIoutside\fR, in the namespace where
systemd\-coredump
is running\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_BY_PIDFD=\fR
.RS 4
If the crashed process was analyzed using a PIDFD provided by the kernel (requires kernel v6\&.16) then this field will be present and set to
"1"\&. If this field is not set, then the crashed process was analyzed via a PID, which is known to be subject to race conditions\&.
.sp
Added in version 258\&.
.RE
.PP
\fICOREDUMP_TIMESTAMP=\fR
.RS 4
The time of the crash as reported by the kernel (in μs since the epoch)\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_RLIMIT=\fR
.RS 4
The core file size soft resource limit, see
\fBgetrlimit\fR(2)\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_UNIT=\fR, \fICOREDUMP_SLICE=\fR
.RS 4
The system unit and slice names\&.
.sp
When the crashed process was in container, those are the units names
\fIoutside\fR, in the main system manager\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_CGROUP=\fR
.RS 4
The primary cgroup of the unit of the crashed process\&.
.sp
When the crashed process was in a container, this is the full path, as seen outside of the container\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_PROC_CGROUP=\fR
.RS 4
Control group information in the format used in
/proc/self/cgroup\&. On systems with the unified cgroup hierarchy, this is a single path prefixed with
"0::", and multiple paths prefixed with controller numbers on legacy systems\&.
.sp
When the crashed process was in a container, this is the full path, as seen outside of the container\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_OWNER_UID=\fR, \fICOREDUMP_USER_UNIT=\fR, \fICOREDUMP_SESSION=\fR
.RS 4
The numerical UID of the user owning the login session or systemd user unit of the crashed process, the user manager unit, and the session identifier\&. All three fields are only present for user processes\&.
.sp
When the crashed process was in container, those are the values
\fIoutside\fR, in the main system\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_SIGNAL_NAME=\fR, \fICOREDUMP_SIGNAL=\fR
.RS 4
The terminating signal name (with the
"SIG"
prefix
\&\s-2\u[4]\d\s+2) and numerical value\&. (Both are included because signal numbers vary by architecture\&.)
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_CODE=\fR
.RS 4
The reason why the signal was sent as a numerical value\&. The code is defined as field
\fIsi_code\fR
in the
\fIsiginfo_t\fR
structure and documented in
\fBsigaction\fR(2)\&.
.sp
Added in version 261\&.
.RE
.PP
\fICOREDUMP_CWD=\fR, \fICOREDUMP_ROOT=\fR
.RS 4
The current working directory and root directory of the crashed process\&.
.sp
When the crashed process is in a container, those paths are relative to the root of the container\*(Aqs mount namespace\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_DUMPABLE=\fR
.RS 4
The
\fBPR_GET_DUMPABLE\fR
field as reported by the kernel, see
\fBprctl\fR(2)\&.
.sp
Added in version 258\&.
.RE
.PP
\fICOREDUMP_OPEN_FDS=\fR
.RS 4
Information about open file descriptors, in the following format:
.sp
.if n \{\
.RS 4
.\}
.nf
\fIfd\fR:\fI/path/to/file\fR
pos:     \&.\&.\&.
flags:   \&.\&.\&.
\&.\&.\&.

\fIfd\fR:\fI/path/to/file\fR
pos:     \&.\&.\&.
flags:   \&.\&.\&.
\&.\&.\&.
.fi
.if n \{\
.RE
.\}
.sp
The first line contains the file descriptor number
\fIfd\fR
and the path, while subsequent lines show the contents of
/proc/\fIpid\fR/fdinfo/\fIfd\fR\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_EXE=\fR
.RS 4
The destination of the
/proc/\fIpid\fR/exe
symlink\&.
.sp
When the crashed process is in a container, that path is relative to the root of the container\*(Aqs mount namespace\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_CMDLINE=\fR, \fICOREDUMP_COMM=\fR, \fICOREDUMP_ENVIRON=\fR, \fICOREDUMP_PROC_AUXV=\fR, \fICOREDUMP_PROC_LIMITS=\fR, \fICOREDUMP_PROC_MAPS=\fR, \fICOREDUMP_PROC_MOUNTINFO=\fR, \fICOREDUMP_PROC_STATUS=\fR
.RS 4
Fields that map the per\-process entries in the
/proc/
filesystem:
/proc/\fIpid\fR/cmdline
(the command line of the crashed process),
/proc/\fIpid\fR/comm
(the command name associated with the process),
/proc/\fIpid\fR/environ
(the environment block of the crashed process),
/proc/\fIpid\fR/auxv
(the auxiliary vector of the crashed process, see
\fBgetauxval\fR(3)),
/proc/\fIpid\fR/limits
(the soft and hard resource limits),
/proc/\fIpid\fR/maps
(memory regions visible to the process and their access permissions),
/proc/\fIpid\fR/mountinfo
(mount points in the process\*(Aqs mount namespace),
/proc/\fIpid\fR/status
(various metadata about the process)\&.
.sp
See
\fBproc\fR(5)
for more information\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_HOSTNAME=\fR
.RS 4
The system hostname\&.
.sp
When the crashed process was in container, this is the container hostname\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_CONTAINER_CMDLINE=\fR
.RS 4
For processes running in a container, the command line of the process spawning the container (the first parent process with a different mount namespace)\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP=\fR
.RS 4
When the core is stored in the journal, the core image itself\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_FILENAME=\fR
.RS 4
When the core is stored externally, the path to the core file\&.
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_TRUNCATED=\fR
.RS 4
Set to
"1"
when the saved coredump was truncated\&. (A partial core image may still be processed by some tools, though obviously not all information is available\&.)
.sp
Added in version 248\&.
.RE
.PP
\fICOREDUMP_PACKAGE_NAME=\fR, \fICOREDUMP_PACKAGE_VERSION=\fR, \fICOREDUMP_PACKAGE_JSON=\fR
.RS 4
If the executable contained \&.package metadata ELF notes, they will be parsed and attached\&. The
\fIpackage\fR
and
\fIversion\fR
of the \*(Aqmain\*(Aq ELF module (i\&.e\&., the executable) will be appended individually\&. The JSON\-formatted content of all modules will be appended as a single JSON object, each with the module name as the key\&. For more information about this metadata format and content, see the
\m[blue]\fBPackage Metadata for Executable Files\fR\m[]\&\s-2\u[5]\d\s+2
document\&.
.sp
Added in version 249\&.
.RE
.PP
\fIMESSAGE=\fR
.RS 4
The message generated by
\fBsystemd\-coredump\fR
that includes the backtrace if it was successfully generated\&. When
\fBsystemd\-coredump\fR
is invoked with
\fB\-\-backtrace\fR, this field is provided by the caller\&.
.sp
Added in version 248\&.
.RE
.PP
Various other fields exist in the journal entry, but pertain to the logging process, i\&.e\&.
\fBsystemd\-coredump\fR, not the crashed process\&. See
\fBsystemd.journal-fields\fR(7)\&.
.PP
The following fields are saved (if known) with the external file listed in
\fICOREDUMP_FILENAME=\fR
as extended attributes:
.PP
\fIuser\&.coredump\&.pid\fR, \fIuser\&.coredump\&.uid\fR, \fIuser\&.coredump\&.gid\fR, \fIuser\&.coredump\&.signal\fR, \fIuser\&.coredump\&.timestamp\fR, \fIuser\&.coredump\&.rlimit\fR, \fIuser\&.coredump\&.hostname\fR, \fIuser\&.coredump\&.comm\fR, \fIuser\&.coredump\&.exe\fR
.RS 4
Those are the same as
\fICOREDUMP_PID=\fR,
\fICOREDUMP_UID=\fR,
\fICOREDUMP_GID=\fR,
\fICOREDUMP_SIGNAL=\fR,
\fICOREDUMP_TIMESTAMP=\fR,
\fICOREDUMP_RLIMIT=\fR,
\fICOREDUMP_HOSTNAME=\fR,
\fICOREDUMP_COMM=\fR, and
\fICOREDUMP_EXE=\fR, described above\&.
.sp
Added in version 248\&.
.RE
.PP
Those can be viewed using
\fBgetfattr\fR(1)\&. For the core file described in the journal entry shown above:
.sp
.if n \{\
.RS 4
.\}
.nf
$ getfattr \-\-absolute\-names \-d /var/lib/systemd/coredump/core\&.Web\&...\&.552351\&.\&...\&.zst
# file: /var/lib/systemd/coredump/core\&.Web\&...\&.552351\&.\&...\&.zst
user\&.coredump\&.pid="552351"
user\&.coredump\&.uid="1000"
user\&.coredump\&.gid="1000"
user\&.coredump\&.signal="11"
user\&.coredump\&.timestamp="1614342930000000"
user\&.coredump\&.comm="Web Content"
user\&.coredump\&.exe="/usr/lib64/firefox/firefox"
\&...
.fi
.if n \{\
.RE
.\}
.sp
.SH "SEE ALSO"
.PP
\fBcoredump.conf\fR(5), \fBcoredumpctl\fR(1), \fBsystemd-journald.service\fR(8), \fBsystemd-tmpfiles\fR(8), \fBcore\fR(5), \fBsysctl.d\fR(5), \fBsystemd-sysctl.service\fR(8), \m[blue]\fBsystemd Coredump Handling\fR\m[]\&\s-2\u[1]\d\s+2
.SH "NOTES"
.IP " 1." 4
systemd Coredump Handling
.RS 4
\%https://systemd.io/COREDUMP
.RE
.IP " 2." 4
Journal Export Format
.RS 4
\%https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-export-format
.RE
.IP " 3." 4
systemd-coredump-python
.RS 4
\%https://github.com/systemd/systemd-coredump-python
.RE
.IP " 4." 4
\fBkill\fR(1)
expects signal names
\fIwithout\fR
the prefix;
\fBkill\fR(2)
uses the prefix; all systemd tools accept signal names both with and without the prefix.
.IP " 5." 4
Package Metadata for Executable Files
.RS 4
\%https://systemd.io/PACKAGE_METADATA_FOR_EXECUTABLE_FILES/
.RE
