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.

link|improve this question
feedback

1 Answer

up vote 0 down vote accepted

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)
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.