LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   pthread_mutex_lock segmentation fault (https://www.linuxquestions.org/questions/linux-software-2/pthread_mutex_lock-segmentation-fault-748047/)

satishku 08-17-2009 01:52 AM

pthread_mutex_lock segmentation fault
 
I am crosscompiling a library for ARM processor running Linux. My host is
Intel x86 / Ubuntu. When I compile and run on my host machine,
everything works well. However, when I compile, link and run an example
program on the target, it results in Segmentation Fault. In particular,

The library creates a FEW mutexes and has numerous operations to create, lock, release those mutexes. For a while, it works ok. Mutexes are created, locked and released on the traget. But after a point, suddely, it crashes with Segmentation Fault in the lock step :

pthread_mutex_lock(this=0x20005,hMutex=0x7500) //random numbers
Program Recd signal SIGSEGV

I am unable to reason out under what conditions this error may happen. Since the system is able to lock mutexes in many instances before. Plus, this error does not happen on Ubuntu but happens on the target device.

What can I do to debug this problem and find a solution, Please advice, VERY URGENT


All times are GMT -5. The time now is 11:05 AM.