I have a Segmentation fault in my multithreaded application that is becoming a headache. It looks like the problem is being generated in a usleep call. I tried to replace it with nanosleep but it persists. It also appears near to a sem_timedwait call.
I compile with gcc and -lpthread option.
Might this be the cause of the segmentation fault? What could be the reason?