I have a program that is segfaulting under Mac Catalina, but the core file is not showing up in /cores. I checked to ensure that core file size is unlimited and that core files were enabled by both creating an /etc/launchd.conf file (with "limit core unlimited" in it) and executing "launchctl". None of those has had any effect.
Anyone know how to re-enable core files under Catalina, and/or where they are being stored?
I recently upgraded to macOS Catalina and was perplexed that I was no longer getting core dumps despite sysctl -a
reporting the expected kern.corefile: /cores/core.%P
and kern.coredump: 1
. And having run ulimit -c unlimited
in my interactive shell. I eventually traced the problem to the /cores directory having permissions rwxr-xr-x
. Once I did sudo chmod 1777 /cores
I was able to create core dumps as a non-root user.
It seems that files in /bin/
are not allowed to throw cores.
if you invoke sleep 50000&
to kill -11 %1
this will not generate a coredump.
If you copy the program to /tmp/
beforehand, it will.
So the usefull trick to kill sleep with SIG11 to validate corefile generation won't work easily.
It also seems that killing backgrounded processes in the same shell doesn't produce coredumps in all cases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With