[minicoredumper] Write core dumps even if they have not existed before

John Ogness john.ogness at linutronix.de
Sun Oct 1 23:41:48 CEST 2017

Hi Michael,

On 2017-09-30, Michael <michael at mipisi.de> wrote:
> Motivation:
> On embedded system an enduser should not see any core dumps on the
> device. So core dumps are something you only need for development.

The above comment is not really related to your patch, but I wanted to
respond to it. Actually the main motivation for developing the
minicoredumper is so that embedded developers start making core dumps a
part of their devices. With now the ability to generate 12KB core files,
why would you _not_ want to include it on the live device? If the device
is ever returned due to defects, having core dumps available is a huge
benefit to developers to study what was going wrong.

> There is a nice feature of minicoredumper that allows to customize the
> path where core files are stored. My problem here is that this path
> needs to exist in filesystem.

I am concerned about automatically creating the full path because a
system developer must consider several factors when choosing a path:

- what kind of filesystem should host the dumps
- what are the permissions for that directory
- how should the directory be limited and secured

If the minicoredumper automatically creates the base directory, there is
a greater risk that the minicoredumper may be dropping files that are
unwanted, not secured, or not limited.

> What I have done is setting the customized core dump path to
> /home/root/crash and patch the minicoredump to not fail if dir does
> not exist.  Instead now the sub directory "crash" is created when the
> first crash occurs.
> For me and my colleagues (especially for fieldtest) this is nice,
> because then you see: If a dir crash exists, something went wrong,
> else all fine.

Currently it is: If the crash directory is not empty, something went
wrong, else all fine.

Is that really so different?

> Please don't take my implementation proposal too serious. I just want
> to give you the idea here.  If you agree that this is an improvement
> maybe it would be even better to have an option in JSON file if you
> want to write non-existing paths.

I prefer to keep the minicoredumper more conservative in this regard,
but I appreciate you sharing your changes.

John Ogness

More information about the minicoredumper mailing list