Strange Unit failure

Maxim Konovalov maxim at
Fri Jun 23 16:12:02 UTC 2023



> So this will be hard to diagnose without either a backtrace from a core
> dump or a reliable way to reproduce it.
> I'm not sure how to do it on FreeBSD (on Linux it's just a matter of
> editing /proc/sys/kernel/core_pattern, and these days coredumps
> get piped through to systemd by default), but perhaps you can have the
> coredumps go to /var/tmp or something?

To enable coredumps on FreeBSD I’d recommend something like that

# mkdir -p /var/coredumps && chmod 1777 /var/coredumps
# sysctl kern.corefile="/var/coredumps/%N.%P.core”
# sysctl kern.sugid_coredump=1

You may want to put the above sysctl’s in /etc/sysctl.conf.

Make sure that you have coredumps enabled at all (enabled by default)

# sysctl kern.coredump

You may also want to adjust the core file size limit in /etc/login.conf (pay attention to the comments at the top of the file) but by default there is no limit.

Maxim Konovalov

More information about the unit mailing list