aboutsummaryrefslogtreecommitdiffstats
path: root/man5
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2016-04-21 11:20:17 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2016-04-21 11:22:14 +0200
commitd9f2d36adb9962b81a021b28337215501625c5ef (patch)
treeff35ace5884a35b498848cba28bbddafb841fbc1 /man5
parent2a79c2ac32e334fc2bbc065fde042d525432913a (diff)
downloadman-pages-d9f2d36adb9962b81a021b28337215501625c5ef.tar.gz
core.5: Document /proc/sys/kernel/core_pipe_limit
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man5')
-rw-r--r--man5/core.535
1 files changed, 34 insertions, 1 deletions
diff --git a/man5/core.5 b/man5/core.5
index d6afee66d1..f2bfcc1819 100644
--- a/man5/core.5
+++ b/man5/core.5
@@ -230,7 +230,7 @@ Since kernel 2.6.19, Linux supports an alternate syntax for the
.I /proc/sys/kernel/core_pattern
file.
If the first character of this file is a pipe symbol (\fB|\fP),
-then the remainder of the line is interpreted as a program to be
+then the remainder of the line is interpreted as a user-space program to be
executed.
Instead of being written to a disk file, the core dump is given as
standard input to the program.
@@ -252,6 +252,39 @@ the % specifiers listed above.
For example, to pass the PID of the process that is being dumped, specify
.I %p
in an argument.
+.\"
+.SS /proc/sys/kernel/core_pipe_limit
+When collecting core dumps via a pipe to a user-space program,
+it can be useful for the collecting program to gather data about
+the crashing process from that process's
+.IR /proc/PID
+directory.
+In order to do this safely,
+the kernel must wait for the program collecting the core dump to exit,
+so as not to remove the crashing process's
+.IR /proc/PID
+files prematurely.
+This in turn creates the
+possibility that a misbehaving collecting program can block
+the reaping of a crashed process by simply never exiting.
+
+Since Linux 2.6.32,
+.\" commit a293980c2e261bd5b0d2a77340dd04f684caff58
+the
+.I /proc/sys/kernel/core_pipe_limit
+can be used to defend against this possibility.
+The value in this file defines how many concurrent crashing
+processes may be piped to user-space programs in parallel.
+If this value is exceeded, then those crashing processes above this value
+are noted in the kernel log and their core dumps are skipped.
+
+A value of 0 in this file is special.
+It indicates that unlimited processes may be captured in parallel,
+but that no waiting will take place (i.e., the collecting
+program is not guaranteed access to
+.IR /proc/<crashing-PID> ).
+The default value for this file is 0.
+.\"
.SS Controlling which mappings are written to the core dump
Since kernel 2.6.23, the Linux-specific
.IR /proc/PID/coredump_filter