You are not logged in.
Hi all.
I don't want to enter the systemd battle. Not now at least. I want to have my core dumps back.
To be more precise:
Whenever a process dumps the core I want it to be written wherever the kernel thinks it should go.
This can be, almost always, within my home directory. It could be also somewhere else in the case it's a system program to dump the core.
I would call this "the good ol' way". Which is perfectly OK to me and I don't want to discuss whether this is considered good or not.
I see a number of posts all discussing about the philosophy of letting systemd grab your core dumps and the such. Well, I am not interested in.
[SOLVED] See message #8.
Last edited by 0BADC0DE (2021-04-02 16:30:47)
Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.
Offline
Offline
Thanks @seth, But I cannot get my cores back.
I simply avoid systemd-coredump to store it within its journals/directories.
But core dumps just vanish as it looks like systemd is hijacking them.
I have manually crashed a program I started from cli by sending it a SIGBUS (kill -7 <process ID>.
I even get the message: "Bus error (core dumped) firefox".
But there's no core file!
Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.
Offline
I don't think you can fix that from systemd at all.
Shadow /usr/lib/sysctl.d/50-coredump.conf in /etc/sysctl.d/50-coredump.conf and alter the pattern, eg.
kernel.core_pattern = /var/cache/coredumps/core_%e.%p
kernel.core_uses_pid = 0Offline
I ended up by completely disabling systemd-coredump altogether:
systemctl disable systemd-coredump.socket
systemctl stop systemd-coredump.socket
Last edited by 0BADC0DE (2021-04-02 15:33:17)
Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.
Offline
The way I understood things, disabling the systemd units shouldn't help? The program will still be started by the kernel because of the value that's set in kernel.core.pattern?
$ cat /proc/sys/kernel/core_pattern
|/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %hThat "|" character at the start makes the kernel start the program according to the "man 5 core" man-page.
Last edited by Ropid (2021-04-02 15:58:50)
Offline
The way I understood things, disabling the systemd units shouldn't help? The program will still be started by the kernel because of the value that's set in kernel.core.pattern?
$ cat /proc/sys/kernel/core_pattern |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %hThat "|" character at the start makes the kernel start the program according to the "man 5 core" man-page.
You are right. The service is re-enabled at the reboot!
This is totally insane to me: if I disable a service it's because I want it not to start!
Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.
Offline
To really really bring your core dumps back you have to:
sudo ln -fs /dev/null /etc/sysctl.d/50-coredump.confto avoid systemd-coredump do whatever it thinks it's good for you and to add this command:
echo core > /proc/sys/kernel/core_patternto your booting process. I have it in /etc/rc.local now.
See here and here for more details.
Last edited by 0BADC0DE (2021-04-02 16:30:06)
Maybe Computers Will Never Become As Intelligent
As Humans. Surely They Won't Ever Become So Stupid.
Offline