[opensuse-factory] Collecting coredumps with systemd-coredump seems to be broken
Hey list, There's an utility shipped with systemd, /usr/lib/systemd/systemd-coredump, which, being set up as kernel.core_pattern handler, writes core dumps to journal. A companion utility, systemd-coredumpctl, can list core dumps, export them and run gdb against them. I'm aware openSUSE disables this feature, but I'm consdering it very useful for my purposes, so I was actually able to make use of it in openSUSE 13.1 by installing systemd-logger and creating /etc/sysctl.d/50-coredump.conf pretty identical to bundled one — http://cgit.freedesktop.org/systemd/systemd/tree/sysctl.d/50-coredump.conf.i.... But trying to do the same on Factory I've faced an issue — rsyslog is gone, core_pattern is set, but systemd-coredumpctl shows nothing, despite segfaults happen pretty often. So I've got following questions regarding this situation: * What is blessed way to automatically collect coredumps in openSUSE? I've noticed /var/log/core directory, but it's empty and nobody seem to touch it. * If systemd-coredump is okay, what else would you suggest to try to track down root cause of an issue? P.S. Some snippets from shell: $ /usr/sbin/sysctl kernel.core_pattern kernel.core_pattern = /usr/lib/systemd/systemd-coredump %p %u %g %s %t %e $ cat /tmp/sigsegv.c int main(void) { char *s = "hello world"; *s = 'H'; } $ /tmp/a.out fish: Job 1, “/tmp/a.out ” terminated by signal SIGSEGV (Address boundary error) [trust me, a.out is compiled from sigsegv.c] $ journalctl -e …skip… Aug 28 00:00:46 linux-z0lo.site kernel: a.out[432]: segfault at 4005a4 ip 000000000040050d sp 00007fffe4fe8120 error 7 in a.out[400000+1000] $ systemd-coredumpctl list | wc -l 0 Thank you in advance. -- Regards, Andrei Dziahel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
El 27/08/14 a las #4, Andrei Dziahel escribió:
$ /tmp/a.out fish: Job 1, “/tmp/a.out ” terminated by signal SIGSEGV (Address boundary error) [trust me, a.out is compiled from sigsegv.c]
No coredump is generated there.. when a crash happens it clearly states it "(core dumped)" ..did not ran ulimit -c unlimited .. I just tested with exactly your example and it works as expected. -- Cristian "I don't know the key to success, but the key to failure is trying to please everybody." -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Thank you for hint — now I remember that I also had to edit /etc/security/limits.conf in order to get cores actually dumped. On Thu, Aug 28, 2014 at 1:21 AM, Cristian Rodríguez <crrodriguez@opensuse.org> wrote:
El 27/08/14 a las #4, Andrei Dziahel escribió:
$ /tmp/a.out fish: Job 1, “/tmp/a.out ” terminated by signal SIGSEGV (Address boundary error) [trust me, a.out is compiled from sigsegv.c]
No coredump is generated there.. when a crash happens it clearly states it "(core dumped)" ..did not ran ulimit -c unlimited .. I just tested with exactly your example and it works as expected.
-- Cristian "I don't know the key to success, but the key to failure is trying to please everybody."
-- Regards, Andrei Dziahel -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (2)
-
Andrei Dziahel
-
Cristian Rodríguez