title: Enabling core dumps on Debian 9
body: <p>I've noticed my Debian 9 VM doesn't create a core dump with <code>kill -s 6 &lt;pid&gt;</code>. Looked into ulimit, suid_dumpable, core_pattern - they seem OK to me. The message after <em>kill</em> doesn't show <em>(core dumped)</em>, and there is no core file in either the working directory or the one specified in core_pattern. Sudo doesn't help. Any configuration piece I'm missing?</p>
  <p>Configuration:</p>
  <pre><code>   Static hostname: &lt;hostname&gt;
           Icon name: computer-vm
             Chassis: vm
          Machine ID: &lt;redacted&gt;
             Boot ID: &lt;redacted&gt;
      Virtualization: microsoft
    Operating System: Debian GNU/Linux 9 (stretch)
              Kernel: Linux 4.19.128-dcc08d126b2b
        Architecture: x86-64
  &lt;user&gt;@&lt;hostname&gt;:~$ ulimit -Ha
  core file size          (blocks, -c) unlimited
  data seg size           (kbytes, -d) unlimited
  scheduling priority             (-e) 0
  file size               (blocks, -f) unlimited
  pending signals                 (-i) 56048
  max locked memory       (kbytes, -l) 64
  max memory size         (kbytes, -m) unlimited
  open files                      (-n) 1048576
  pipe size            (512 bytes, -p) 8
  POSIX message queues     (bytes, -q) 819200
  real-time priority              (-r) 0
  stack size              (kbytes, -s) unlimited
  cpu time               (seconds, -t) unlimited
  max user processes              (-u) 56048
  virtual memory          (kbytes, -v) unlimited
  file locks                      (-x) unlimited
  &lt;user&gt;@&lt;hostname&gt;:~$ ulimit -Sa
  core file size          (blocks, -c) 100000
  data seg size           (kbytes, -d) unlimited
  scheduling priority             (-e) 0
  file size               (blocks, -f) unlimited
  pending signals                 (-i) 56048
  max locked memory       (kbytes, -l) 64
  max memory size         (kbytes, -m) unlimited
  open files                      (-n) 1024
  pipe size            (512 bytes, -p) 8
  POSIX message queues     (bytes, -q) 819200
  real-time priority              (-r) 0
  stack size              (kbytes, -s) 8192
  cpu time               (seconds, -t) unlimited
  max user processes              (-u) 56048
  virtual memory          (kbytes, -v) unlimited
  file locks                      (-x) unlimited
  &lt;user&gt;@&lt;hostname&gt;:~$ cat /proc/sys/fs/suid_dumpable
  1
  &lt;user&gt;@&lt;hostname&gt;:~$ cat /proc/sys/kernel/core_pattern
  /opt/core/%e.SIG-%s.%p.core
  </code></pre>
  <p>Example:</p>
  <pre><code>&lt;user&gt;@&lt;hostname&gt;:~$ sleep 500 &amp;
  [1] 14259
  &lt;user&gt;@&lt;hostname&gt;:~$ kill -s 6 14259
  [1]+  Aborted                 sleep 500
  &lt;user&gt;@&lt;hostname&gt;:~$ ls -la /opt/core/
  total 8
  drwxr-xr-x 2 root root 4096 Jun  8 15:27 .
  drwxr-xr-x 6 root root 4096 Jun  8 15:27 ..
  &lt;user&gt;@&lt;hostname&gt;:~$ ls -la | grep core
  &lt;user&gt;@&lt;hostname&gt;:~$
  </code></pre>