Re: [PATCH 1/4] coredump: add an interface to control the core dumproutine

From: Andrew Morton
Date: Fri Mar 30 2007 - 12:11:40 EST


On Fri, 30 Mar 2007 19:29:23 +0900 "Kawai, Hidehiro" <hidehiro.kawai.ez@xxxxxxxxxxx> wrote:

> > core_pattern:
> > ...
> > . If the first character of the pattern is a '|', the kernel will treat
> > the rest of the pattern as a command to run. The core dump will be
> > written to the standard input of that program instead of to a file.
>
> I think dumping core over a pipe is almost good. Filtering and writing
> out a core by a separete userspace program can be reliable because it is
> independent of the failed user process. But I have one concern; data
> transfer over a pipe is slow. It took 7 seconds to transfer 2GB
> anonymous shared memory (detailed at the last of this mail).
>
> In the case of dumping hundreds processes which share giga bytes memory,
> it will take a few minutes even if the huge shared memory is not written
> to a disk. If a user wants to restart the failed application as soon
> as possible to keep downtime to a minimum, this extra transfer time will
> be a barrier. So I think in-kernel filtering is still needed.

Yes, I agree - I don't think we presently have a way of avoiding having
to send all of that uninteresting data down the pipe.

One may, however, be able to play tricks with /proc/<pid>/mem from within
the corefile-generating program: select the vmas which are to be dumped,
read only those ones. I don't know how practical that would be.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/