TL;DR: disable selinux
I solved a tricky problem in which Asterisk, installed from a FreePBX distro, would repeatedly start, crash and dump core when run as a service on CentOS 6.4. The core dump showed it was dying with signal 6 being thrown from within a libgcrypto method. But Asterisk would run fine when started from the commandline.
I hacked /usr/sbin/safe_asterisk so that it would not restart after a crash, and then was able to see a log message complaining about inability to find an entropy generator.
Google hits on missing entropy generators led to the red herring suggestion to remove and recreate /dev/urandom and /dev/random. This was ineffective.
Further research on libgcrypto led to the hint that selinux could be involved. Disabling selinux made life all better.
Now I must repair the damage I’ve done to safe_asterisk.