We have an Ubuntu server deployed with apport enabled as shown.
~$ cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport %p %s %c
Unfortunately apport's behaviour in dealing with non-packaged application crashes is not entirely to our liking. apport is producing "core" files (assuming ulimit -c is set appropriately) in the working directory in these scenarios. For example, from the apport logs,
ERROR: apport (pid 10117) Tue Jan 8 08:56:25 2013: executable: /home/jess/a.out (command line "./a.out")
ERROR: apport (pid 10117) Tue Jan 8 08:56:25 2013: executable does not belong to a package, ignoring
ERROR: apport (pid 10117) Tue Jan 8 08:56:25 2013: writing core dump to /home/jess/core (limit: 18889465931478580853760)
Frustratingly, once a core file is there it will not be overwritten. So for example if we're testing an app and forgot to clear an old core file from the working directory, then the app crashes during test, we won't see a new core file. Even if it were overwritten, this might not be ideal either as we then lose the old core.
Ideally what we'd like is the ability to tell apport, via an argument for example, that for non-packaged application case, generate a core file with a file name formatted according to a specified pattern (as per the core_pattern file specification) ... is there any way of doing this, or something equivalent?