[asterisk-dev] need help debugging a deadlock in 1.6.2.13
Antonio Goméz Soto
antonio.gomez.soto at gmail.com
Tue Oct 5 15:22:53 CDT 2010
Hello,
I am new to this list. I have a deadlock in 1.6.2.13, that I am trying to debug myself.
What happens is there are two threads that lock resources in a different order causing a deadlock.
The threads are:
1. from taskprocessor handle_statechange() is called.
This one locks ast_rdlock_contexts, and then eventually call cb_extensionstate()
which immediately does a sip_pvt_lock()
2. do_monitor calls sipsock_read() which calls handle_request_do() which calls
find_call(), which does a sip_pvt_lock() too.
The incoming request is a subscription, so it calls ast_get_hint(), which calls
ast_hint_extension() which calls ast_rdlock_contexts(). Deadlock.
From what I know, I'd say the last thread uses the wrong order. It would probably
not be appropriate to lock the contexts for each incoming request would it?
Can anyone suggest how to handle this?
Thanks,
Antonio
More information about the asterisk-dev
mailing list