Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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