On Fri, 2 Oct 2015 10:20:54 -0500
Will Senn <[email protected]> wrote:

> On 10/2/15 6:04 AM, Hazel Russman wrote:
> > On Fri, 2 Oct 2015 02:40:49 -0500
> > Will Senn <[email protected]> wrote:
> >
> >> Hi again,
> >>
> >> In a budding lfs instance - somewhere in the neighborhood of section
> >> 6.18 or so, when a program segfaults and dumps core, where do the cores
> >> go? I have set ulimit -c unlimited, but no core is generated even though
> >> linux reports a segment fault and core dump. I looked at
> >> /proc/sys/kernel/core_pattern and is says:
> >>
> >> |/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e
> >>
> >> I have no idea what it means, but it looks suspiciously like the cores
> >> aren't gonna get generated like they ought to. I would like to have the
> >> corefile generated. How can I get cores to show up when they are
> >> supposed to?
> >>
> >> Thanks,
> >>
> >> Will
> >> -- 
> > Look in /usr/lib/sysctl.d and you'll find the configuration file that sets 
> > this behaviour. It's called nn-coredump.conf.
> >
> > Another of systemd's tiresome "mother knows best" things.
> I don't see that file and I should have been more specific that I am 
> running through the standard LFS, not the LFS-systemd. I read up on man 
> core and now know what the core_pattern entry:
> 
>      |/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e
> 
> means. It is a pipe to the systemd-coredump command. That command does 
> not exist. I ran the example from the man page (sort of, I don't yet 
> have regular users, so I ran it as root) and used my own crashing 
> program that core dumped):
> 
>      http://man7.org/linux/man-pages/man5/core.5.html
> 
> I tried the test:
> 
> $ cc -o core_pattern_pipe_test core_pattern_pipe_test.c
> $ su
> Password:
> # echo "|$PWD/core_pattern_pipe_test %p UID=%u GID=%g sig=%s" > \
> /proc/sys/kernel/core_pattern
> # exit
> $ sleep 100
> ^\                     # type control-backslash
> Quit (core dumped)
> $ cat core.info
> 
> But no file was created. I also tried emptying core_pattern, still no 
> core file. Thoughts?
> 
> Thanks,
> 
> Will
> 
Does your host run systemd? I had the identical problem when I was building a 
standard LFS on an LFS-systemd host. It happened because I was using my host's 
kernel, which was configured via sysctl to use systemd-coredump -- a program 
that didn't exist in my chroot environment!

Have you looked in your host's /usr/lib/sysctl.d?
-- 
H Russman
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to