List Info

Thread: help : the reason for block on "stall" when the program call pthread_mutex_lo




help : the reason for block on "stall" when the program call pthread_mutex_lo
user name
2008-03-13 00:29:19
 

Dear all opensolaris developers

 ENV:

System: SUN solaris 8,9,10

Using ANSI C

Multi-processes

Phenomena:

When the program run for long time, sometimes(not often, perhaps for over several days once) one process will block on the stack information just like below:

 

----------------- lwp# 4 / thread# 4 --------------------

ffffffff7bdd4780 lwp_mutex_timedlock (ffffffff7bef7c90, 0)

ffffffff7bdcae64 stall (0, 20d8, 10031690c, ffffffff7beec000, 1211c4, 2000) + 34

ffffffff7bdcb568 mutex_lock_internal (ffffffff72c02428, fffffffffffffff3, 10, 1000, ffffffff7bef7d40, ffffffff5d900400) + 450

 

question:

when one process block here,the other process can't use the lock. I read some docs but I didn't find any article including the content just like: why the function(pthread_mutex_lock) will call "stall" function.

 

I saw other processes, when the process block pthread_mutex_lock, the stack information will like below(without stall()):

----------------- lwp# 4 / thread# 4 --------------------

ffffffff7bdd4780 lwp_mutex_timedlock (ffffffff74009950, 0)

ffffffff7bdcb360 mutex_lock_internal (ffffffff74009950, 0, 0, 1000, ffffffff7bef7d40, ffffffff5d900400) + 248

 

I know there must be some bug in my program, but I want to know why the stall function appear here, and how can I simulate this phenomena in my test programe?

 

Please help me, thanks.

 

Best Regards,

13 March 2008

 

michael

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )