1. configuration
# ulimit -c unlimited
# mkdir -p /var/local/dumps
# install -m 1777 -d /var/local/dumps
# echo "/var/local/dumps/core.%e.%p" > /proc/sys/kernel/core_pattern
# rcapparmor stop
# sysctl -w kernel.suid_dumpable=2

then
restart your process and try send ABORT signal, bellows were commands on my test machine:

# ps -ef | grep a.txt
   root     32059 31489  0 14:38 pts/1    00:00:00 vi a.txt
# kill -s SIGABRT 32059
linux-kaf2:/var/local/dumps # ls -l
total 1216
-rw------- 1 root root 1433600 Nov  5 14:38 core.vi.32059
linux-kaf2:/var/local/dumps


2. permanent effectiveness for the setting to all the users

1)
# ulimit -c unlimited
  is only effective under the current login user, you can persist it by edit the configuration file:
/etc/security/limits.conf 
  add bellows:


* hard  core   10240000000
* soft   core     10240000000

 it will effect for later login

2)
# echo "/var/local/dumps/core.%e.%p" > /proc/sys/kernel/core_pattern
# sysctl -w kernel.suid_dumpable=2
will be lost on every rebooting

you can persist it by:
vi /etc/sysctl.conf
add:
kernel.suid_dumpable=2
kernel.core_pattern=/var/local/dumps/core.%e.%p

which will effect when you reboot your OS, you and also run command for effecting directly.
# sysctl -p