Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to repair a 'secondary Gentoo system'
Date: Mon, 11 Dec 2017 20:56:49
In Reply to: Re: [gentoo-user] How to repair a 'secondary Gentoo system' by David Haller
1 On Mon, Dec 11, 2017 at 2:45 PM, David Haller <gentoo@×××××××.de> wrote:
2 >
3 > On Mon, 11 Dec 2017, Helmut Jarausch wrote:
4 >>Strangely enough, dmesg shows
5 >>
6 >>systemd-coredump[25375]: Failed to connect to coredump service: No such file
7 > ^^^^^^
8 >>or directory
9 >>
10 >>although I'm not using system but openrc on both system
11 >
12 > It seems to me though, that that systemd-coredump thingy is running
13 > though ...
14 >
15 > $ ps a -eo pid,cmd | awk '$1 == 25375 { print;}'
16 >
18 That won't show anything, because systemd-coredump isn't a daemon. If
19 configured to do so, the kernel runs it when a core file is generated,
20 pipes the core into it, and it in turns passes it along to a
21 socket-activated service which logs it. Then all those processes
22 terminate. You wouldn't see them running except for a brief moment
23 when a process dumps core.
25 In your case the problem is that the socket doesn't exist, probably
26 because you aren't actually running systemd. So, systemd-coredump is
27 being run by the kernel, but it can't pass the core file along to the
28 service that logs it.
30 Most likely you have systemd installed but aren't actually running it.
31 It isn't particularly easy to accidentally install systemd under
32 Gentoo (I can't imagine that bug going unreported for long around
33 here...). Presumably you're using a systemd profile, or otherwise
34 have installed it.
36 If systemd is installed, then chances are you have this file
37 installed: /usr/lib/sysctl.d/50-coredump.conf
39 If that file exists, then I suspect openrc will parse it and set:
40 kernel.core_pattern=|/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %e
42 And that will cause the issue you're seeing.
44 Just move that file someplace else and reboot. Or run sysctl
45 kernel.core_pattern=/tmp/core.%p or something like that. Then core
46 files will be dumped to disk and not piped into systemd-coredump.
48 Long-term you should sort out which service manager you want to run
49 and configure the entire system accordingly. You might run into
50 subtle bugs like this one if you have systemd installed and don't use
51 it. There is nothing wrong with switching back and forth, but it
52 isn't a well-tested config.
54 --
55 Rich