How did you compile kamailio? It uses pthread mutexes, which should not happen, there is no proper synchronization done there, so crashing can happen at any time.
I cloned kamailio and compiled it as usual and it uses the default FAST_LOCK for sync, not PTHREAD_MUTEX.