Find the answer to your Linux question:
Results 1 to 2 of 2
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 ...
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    1

    pthread_mutex_call blocks forever causing cpu usage 100%

    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.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,975
    Please provide full system configuration information for both hardware and software. Also, source for your application where it is using the mutex_lock calls would be helpful.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...