1

Core dump limits are disabled for a user using the normal /etc/security/limits.conf mechanism:

# ulimit -a  
core file size        (blocks, -c) unlimited

However, running a segfault test shows no core being dumped:

/tmp/a.out  
Segmentation fault

No 'core dumped' message. Hrm. /etc/security/limits.conf looks as follows:

username            -        core            unlimited

Has anyone encountered this before? Is this a bug in SLES? Thanks.

mikemaccana
  • 3,070
  • 5
  • 24
  • 29

1 Answers1

0

Core dumps were enabled, but the core_pattern used for filenames was pointing to a directory that did not exist.

This causes the core dump to silently fail.

# cat /proc/sys/kernel/core_pattern
/cores/core.%p

# ls -la /cores
/bin/ls: /cores: No such file or directory

The fix is simple: create the dir specified, or modify sysctl.conf accordingly:

# mkdir /cores
# /tmp/a.out                              
Segmentation fault (core dumped)
mikemaccana
  • 3,070
  • 5
  • 24
  • 29