Is libcrypto using threads and deals with sockets itself from point of view of closing them? Kamailio is multi-process and at a given moment, only one process is supposed to write to the socket. Moreover, afaik, writing to a closed socket is not causing SIGSEGV.
From the log messages, it seems an error related to the random number generator from libcrypto.
You should install debugging symbols for libssl/libcrypto and see if you can get more details on the related frames from gdb. Last frame related to kamailio code is no. 11, the first 0..10 frames point to libss/libcrypto, but those have no symbols.