libpthread.so : pthread_mutex_lock() hangs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

 My prog. hangs on pthread_mutex_lock()
 (Using glibc 2.2.4)

When I attached to the process through gdb, 

Program received signal SIGINT, Interrupt.
0x40ee5cb5 in sigsuspend () from /lib/libc.so.6
(gdb) where
#0  0x40ee5cb5 in sigsuspend () from /lib/libc.so.6
#1  0x40e28c19 in pthread_kill_other_threads_np () 
from /lib/libpthread.so.0
#2  0x40e2aec9 in sem_destroy () from
/lib/libpthread.so.0
#3  0x40e26dd6 in pthread_mutex_lock () from
/lib/libpthread.so.0
#4  0x0809e53f in Synchronizable::lock
(this=0x829b45c) at 
S/synchronizable.cpp:50
....(App.level trace)
.....
#16 0x08091223 in main (argc=7, argv=0xbffec544) at
S/main.cpp:72
#17 0x40ed3757 in __libc_start_main () from
/lib/libc.so.6

Info : 
The default mutex is created (fast)
I checked for possible deadlocks , etc , none to my
knowledge.
And the same code works fine for a while. 
Only when its run for a couple of days continuously it
ends up with this hanging issue.

Qns : 

1. When will pthread_mutex_lock end up calling
sem_destroy ?
   What are the conditions for this to occur ?

2. In the above trace, sem_destroy ends up calling
 pthread_kill_other_threads_np
which tries to kill all the threads in the process.

Ideally I've seen  pthread_kill_other_threads_np
call only when the process runs out of
resources/descriptors or during exit.

 Why is it being called here within pthread_mutex_lock
?

3. Any ptrs on known issues on pthread_mutex_lock or
when does pthread_mutex_lock create the above stack
trace will be helpful.

Thanks,
Arun



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 


_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/redhat-devel-list

[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux