Commit graph

32 commits

Author SHA1 Message Date
Lennart Poettering 93240d3aba coredump: never write more than the configured processing size limit to disk 2014-06-23 16:28:05 +02:00
Lennart Poettering 6388c31525 coredump: quit early if we cannot store ay coredump to disk 2014-06-23 15:53:03 +02:00
Lennart Poettering b0b21dce0e coredump: also escape spaces in comm fields when formatting file names 2014-06-23 12:40:38 +02:00
Filipe Brandenburger cacd6403a0 coredump: fix include of xattr.h
The correct path is now <sys/xattr.h> (from glibc-headers) and no longer
<attr/xattr.h> (from libattr-devel.)

Fixes: 34c10968cb
2014-06-20 00:26:03 +02:00
Lennart Poettering 0cd77f9783 coredump: simplify how we apply extended attributes to coredumps 2014-06-19 12:38:45 +02:00
Lennart Poettering 8d4e028f18 coredump: include stacktrace of coredumps in the log message
elfutils' libdw is maintained, can read DWARF debug data and appears to
be the library of choice for generating backtraces today.
2014-06-19 12:38:45 +02:00
Lennart Poettering a035f8191a coredump: add 3 more metadata fields to coredump entries 2014-06-19 00:00:24 +02:00
Lennart Poettering 34c10968cb coredump: optionally store coredumps on disk, not in the journal
Introduce a new configuration file /etc/systemd/coredump.conf to
configure when to place coredumps in the journal and when on disk.

Since the coredumps are quite large, default to storing them only on
disk.
2014-06-19 00:00:24 +02:00
Zbigniew Jędrzejewski-Szmek ca2d378414 Unify GREEDY_REALLOC and GREEDY_REALLOC_T
greedy_realloc() and greedy_realloc0() now store the allocated
size as the count, not bytes.

Replace GREEDY_REALLOC uses with GREEDY_REALLOC_T everywhere,
and then rename GREEDY_REALLOC_T to GREEDY_REALLOC. It is just
too error-prone to have two slightly different macros which do the
same thing.
2014-04-12 10:20:55 -04:00
Zbigniew Jędrzejewski-Szmek d18d46ecea journal: export valid_user_field and size defines
In preparation for use elsewhere.
2014-03-17 01:55:47 -04:00
Zbigniew Jędrzejewski-Szmek 872c8faaf2 Fix write-only use of a few variables
Since the invention of read-only memory, write-only memory has been
considered deprecated. Where appropriate, either make use of the
value, or avoid writing it, to make it clear that it is not used.
2013-10-13 17:56:54 -04:00
Andrew Cook 92f2ff4415 systemd-coredump: Log crashes without coredumps on failure
Make a best-effort attempt to store information about crashes during
failure, currently if these are encountered the crash is completely
silenced.

ideally coredumpctl would show if a coredump is available.
2013-09-06 10:09:55 +02:00
Andrew Cook ca0ceb6f3e systemd-coredump: Ignore coredumps larger than COREDUMP_MAX
Currently this check happens when the coredump has been collected in
it's entirety and being received by journald. this is not ideal
behaviour when the crashing process is consuming significant percentage
of physical memory such as a large instance of firefox or a java
application.
2013-09-06 10:09:54 +02:00
Colin Walters 910003d022 coredump: use realloc() loop instead of malloc(768M)
I typically run VMs with 1024MiB allocated; systemd is unable to write
coredumps in this scenario at all because the default kernel
configuration will only overcommit 50% of available RAM.

Avoid this failure by using a realloc() loop.

See: http://lists.freedesktop.org/archives/systemd-devel/2013-April/010709.html
2013-04-25 22:51:31 -04:00
Harald Hoyer 7fd1b19bc9 move _cleanup_ attribute in front of the type
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
2013-04-18 09:11:22 +02:00
Lennart Poettering c4aa09b06f journald: bring max coredump size in sync with max entry size 2013-04-08 20:35:26 +02:00
Zbigniew Jędrzejewski-Szmek 5e75606a41 coredump: do not free twice 2013-03-28 22:27:15 -04:00
Lennart Poettering 41be2ca14d coredump: bump coredump truncation size from 24M to 768M
In the long run we really should make this runtime configurable.
2013-03-01 19:22:30 +01:00
Mirco Tischler b7f7c68570 coredump: make use of the cleanup macros 2013-02-07 01:02:34 -05:00
Mirco Tischler f904546894 journal: log user units for coredumps and show them in systemctl status 2013-02-07 01:02:34 -05:00
Lukas Nykryn 9bdbc2e2ec systemctl,loginctl,cgls: do not ellipsize cgroup members when --full is specified
New file output.h with output flags and modes.

--full parameter also for cgls and loginctl.

Include 'all' parameter in flags (show_cgroup_by_path, show_cgroup,
show_cgroup_and_extra, show_cgroup_and_extra_by_spec).

get_process_cmdline with max_length == 0 will not ellipsize output.

Replace LINE_MAX with 0 in some calls of get_process_cmdline.

[zj: Default to --full when under pager for clgs.
     Drop '-f' since it wasn't documented and didn't actually work.
     Reindent a bit.
]
2013-01-16 12:11:47 -05:00
Shawn Landden 0d0f0c50d3 log.h: new log_oom() -> int -ENOMEM, use it
also a number of minor fixups and bug fixes: spelling, oom errors
that didn't print errors, not properly forwarding error codes,
few more consistency issues, et cetera
2012-07-26 11:48:26 +02:00
Shawn Landden 669241a076 use "Out of memory." consistantly (or with "\n")
glibc/glib both use "out of memory" consistantly so maybe we should
consider that instead of this.

Eliminates one string out of a number of binaries. Also fixes extra newline
in udev/scsi_id
2012-07-25 11:23:57 +02:00
Lennart Poettering b7def68494 util: rename join() to strjoin()
This is to match strappend() and the other string related functions.
2012-07-13 13:41:01 +02:00
Kay Sievers d2e54fae5c mkdir: append _label to all mkdir() calls that explicitly set the selinux context 2012-05-31 12:40:20 +02:00
Lennart Poettering ba1261bc02 build-sys: fix built with --disable-logind 2012-05-30 22:25:01 +02:00
Lennart Poettering 5430f7f2bc relicense to LGPLv2.1 (with exceptions)
We finally got the OK from all contributors with non-trivial commits to
relicense systemd from GPL2+ to LGPL2.1+.

Some udev bits continue to be GPL2+ for now, but we are looking into
relicensing them too, to allow free copy/paste of all code within
systemd.

The bits that used to be MIT continue to be MIT.

The big benefit of the relicensing is that closed source code may now
link against libsystemd-login.so and friends.
2012-04-12 00:24:39 +02:00
Kay Sievers 49e942b2bc rename basic.la to shared.la and put selinux deps in shared-selinx.la
Only 34 of 74 tools need libselinux linked, and libselinux is a pain
with its unconditional library constructor.
2012-04-10 22:43:05 +02:00
Lennart Poettering 803a3464ce coredump: avoid coredump loops, divert coredump if journald itself is crashing 2012-02-02 01:22:49 +01:00
Lennart Poettering fee80f6956 journal: drop privileges when storing coredump 2012-01-14 03:37:32 +01:00
Lennart Poettering de0229ca36 journal: collect coredump up to 24M in size 2012-01-14 03:05:34 +01:00
Lennart Poettering f5e04665eb journal: hook up coredumping with journal 2012-01-14 01:54:33 +01:00