Bart Smaalders wrote:
Tao Chen wrote:
Hello,

There is a dead lock condition in my driver code. I do not understand the message "Deadlock: cycle in blocking chain", how does it happen? How do I avoid it?

Tom


panic[cpu0]/thread=ffffff0003eddc80: Deadlock: cycle in blocking chain ffffff0003eddaa0 genunix:turnstile_block+9f3 ()
ffffff0003eddb20 unix:mutex_vector_enter+38d ()
ffffff0003eddb50 qla:qla_link_state_machine+22 ()
ffffff0003eddb70 qla:qla_timer+78 () ffffff0003eddbd0 genunix:callout_execute+b1 ()
ffffff0003eddc60 genunix:taskq_thread+1dc ()
ffffff0003eddc70 unix:thread_start+8 ()
This message posted from opensolaris.org
_______________________________________________
networking-discuss mailing list
[email protected]

classic deadlock:

thread A holds lock 1
thread B holds lock 2

thread A now attempts to acquire lock 2
thread B now attempts to acquire lock 1

Solaris will detect an arbitrary number of threads in the
blocking chain...

You need to grab nested locks in a consistent order...
Yes like Bart said, a dead lock happened, and system detect it and panicked.

If you want to know what exactly happened at that time, please get the third parameters of turnstile_block function in panic thread stack, then check the mutex owner with this address by invoking ::mutex dcmd. It should help you finding two dead lock threads.

If you don't know how to use mdb, please refer to my Chinese blog(It seems you are from China). :-)

http://blog.csdn.net/yayong/archive/2007/03/04/1520604.aspx

In this blog, I gave a real case about debug system hang issues on e1000g driver.

If you possible, you also can get ACT(Automated Crash Tool) from sunsolve site, I think it can tell you the same answer.




--
Cheers,

----------------------------------------------------------------------
Oliver Yang | [EMAIL PROTECTED] | x82229 | Work from office

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to