Home Linux Community Forums Programming and Development Software Development pthread_mutex_call blocks forever ->cpu load 100%

pthread_mutex_call blocks forever ->cpu load 100%

Link to this post 16 Nov 09

pthread_mutex_lock() call never returns causing other threads to wait
for gaining its lock forever in turn causing 100% cpu load. I have tried
using alternate call pthread_mutex_trylock() which try to lock and if the
mutex is locked in some other thread it returns with an error code.

The above mentioned call pthread_mutex_lock is used in an application which
goes to full cpu load once mutex blocks forever, and even if i kill the application
and restart it, it will again go to full cpu load, the problem of full cpu load only gets
resolved when i restart the machine, is there any other alternate call or any other
possible solution for this problem.

Link to this post 27 Feb 10

What distribution+version of Linux, as well as what kernel, version of gcc/g++, and glibc/libc are you using?

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board