[systemd-devel] [PATCH 0/4] coredump: add journal fields useful for bug reporting

Jakub Filak jfilak at redhat.com
Wed Nov 19 02:01:18 PST 2014


Hello,

these patches add several new fields to systemd-coredump journal messages. The
added fields should enable ABRT to report core files from systemd-journald to
various bug tracking systems.

The added fields:
- COREDUMP_PROC_STATUS : a copy of /proc/[pid]/status
- COREDUMP_PROC_MAPS   : a copy of /proc/[pid]/maps
- COREDUMP_PROC_LIMITS : a copy of /proc/[pid]/limits
- COREDUMP_PROC_CGROUP : a copy of /proc/[pid]/cgroup
- COREDUMP_ENVIRON     : an escaped copy of /proc/[pid]/environ
- COREDUMP_CWD         : readlink /proc/[pid]/cwd
- COREDUMP_ROOT        : readlink /proc/[pid]/root
- COREDUMP_OPEN_FDS    : readlink /proc/[pid]/fd/* + /proc/[pid]/fdinfo/*

Except COREDUMP_OPEN_FDS, the functions getting contents of the fields are
added to util.c, because I think these functions can be reused.

COREDUMP_OPEN_FDS filed is something special, hence I added it to
journal/coredump.c

I split the patch set into four patches to better comprehend my intentions.

There was a short discussion about this topic in September:
http://lists.freedesktop.org/archives/systemd-devel/2014-September/022864.html

Jakub Filak (4):
  util: add functions getting proc cwd and root
  util: add functions getting proc status, maps, limits, cgroup
  util: add function getting proc environ
  coredump: collect all /proc data useful for bug reporting

 src/journal/coredump.c | 137 +++++++++++++++++++++++++++++++-
 src/shared/util.c      | 212 +++++++++++++++++++++++++++++++++++--------------
 src/shared/util.h      |   7 ++
 src/test/test-util.c   |  34 +++++++-
 4 files changed, 326 insertions(+), 64 deletions(-)

-- 
1.8.3.1



More information about the systemd-devel mailing list