Security enhancements on Linux-based platforms may prevent a core dump from being generated when you are expecting one. If you are using the core_on_error=1, core_on_error=2, or signal_regime tunables, you need to perform the following steps to override the security, and then run the application from which you require the core dump. (If you are using core_on_error=3, a core dump file will always be created, regardless of this security enhancement; follow the details in To create a core dump instead.)
ulimit -c unlimited
<user> soft core unlimited <user> hard core unlimited
echo "core.%p"> /proc/sys/kernel/core_pattern
kernel.core_pattern=core.%p
SUSE:
rcapparmor stop
Red Hat:
chkconfig abrt off
Ubuntu:
systemctl stop apport.service systemctl disable apport.service
sysctl -w kernel.suid_dumpable=2
kernel.suid_dumpable=2
If required, configure the run-time environment, so that when the run-time system receives an unhandled signal, a core dump file in created in the same directory as the application; alternatively, if the application is set to programmatically invoke a core dump (CBL_CREATE_CORE), you can just run the application.