[asterisk-dev] Does anybody know how to do a producer/consumer based buffered writer in C?

Chris Howard chris at asteriasgi.com
Wed Jul 19 12:45:26 MST 2006


Kevin P. Fleming wrote:
> ----- C. Maj <cmaj-SPAM at freedomcorpse.com> wrote:
>   
>> Are you planning to drop chan_agent completely ?
>>     
>
> No, it will still be useful in 'connected' (not callback) mode. The code will just be much simpler and with far fewer locking issues.
>
>   
I believe that we are running into one of the locking issues in 
'connected' mode.  After five minutes or so app_queue appears to be 
deadlock when a call pops out of the queue to an agent (chan_agent).  We 
tried to get a backtrace:

#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7f7fd1e in __lll_mutex_lock_wait () from /lib/libpthread.so.0
#2  0xb7f7cd89 in _L_mutex_lock_149 () from /lib/libpthread.so.0
#3  0x081c1588 in ?? ()
#4  0x0805bae5 in ast_update_use_count () at lock.h:542
#5  0xb797e9d6 in agent_new (p=0x818d928, state=0) at lock.h:601
#6  0xb7980163 in agent_request (type=0xb6c57020 "Agent", format=64, 
data=0xb6c57026, cause=0xb6c5641c)
   at chan_agent.c:1328
#7  0x0806333c in ast_request (type=0xb6c57020 "Agent", format=64, 
data=0xfffffffc, cause=0xfffffffc) at channel.c:2533
#8  0xb750578d in ring_entry (qe=0xb6c57b70, tmp=0x8233760, 
busies=0xb6c57268) at app_queue.c:1515
#9  0xb7506026 in ring_one (qe=0xb6c57b70, outgoing=0x81684c8, 
busies=0xb6c57268) at app_queue.c:1675
#10 0xb75068e8 in try_calling (qe=0xb6c57b70, options=0xb6c57268 "\003", 
announceoverride=0x0, url=0x0, go_on=0x1b58)
   at app_queue.c:2306
#11 0xb750b240 in queue_exec (chan=0x822f518, data=0x1) at app_queue.c:3187



More information about the asterisk-dev mailing list