c++ - Can Ubuntu "Sometimes" Fail to Generate Core Files? -


i've configured amazon ec2 instance generate core files when processes crash, , part works expected. problem doesn't work. program have issues comprised of 9 concurrent processes working in concert via mpi. when program crashes, core dump, in rare cases no core dump generated, though segfault(11) reported in logs capturing stderr. in other cases (very rare), resulting core file truncated.

i have not configured core pattern, 1 core (named "core") can exist in directory process launched from. further details below question.

how can no core dump generated "sometimes"? possible 2 processes attempting dump core file @ once, , both failing because in conflict? core dumps not reliable method of tracing bugs?

.bash_profile

export ld_library_path=/usr/local/lib source ./.bashrc ulimit -c unlimited 

/etc/security/limuits.conf

*                soft    core            unlimited root             hard    core            unlimited 

ulimit -a

core file size          (blocks, -c) unlimited data seg size           (kbytes, -d) unlimited scheduling priority             (-e) 0 file size               (blocks, -f) unlimited pending signals                 (-i) 29879 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) 29879 virtual memory          (kbytes, -v) unlimited file locks                      (-x) unlimited 

edit1

i've found bug reliably omit core file. in attempt generate core when program in suspicious state, have inserted following lines in several places:

if (value > flt_max){     int *i=null;     *i=1; } 

about half of processes reach 1 of these lines , segfault, within few milliseconds of each other since take identical code paths. don't raise(sigsegv) because i've seen program swallow , continue before; perhaps because signal technically doesn't require quit?

edit2

core files include pid in names:

sudo -s echo "1" > /proc/sys/kernel/core_uses_pid 

the issue still occurs. there restrictions in ubuntu prevent writing more 1 core file @ time in cases?


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -