[asterisk-dev] AST_FRAME_NULL - what is it?
Bryan Field-Elliot
bryan+asterisk-dev at nextalarm.com
Fri May 29 10:42:19 CDT 2009
Thanks Moises,
That makes sense. Even before I dive in to the code to try to find out
*what* is hanging on to the channel lock, is there some coding
technique I can apply to my code, to correctly wait for the lock, and/
or yield to other threads, before I call ast_read, so that I can be
certain I won't get a AST_FRAME_NULL in return?
On May 29, 2009, at 8:09 AM, Moises Silva wrote:
> I don't know why Asterisk is sending us the AST_FRAME_NULL's or what
> it's supposed to mean, but, our CPU is getting pegged from having to
> process and ignore all those frames. CPU is NOT pegged when a SIP
> client connects which is not sending us these null frames.
>
> Can anyone please advise why this is happening, and how we can get it
> to stop?
I think someone is holding that channel lock and then you're calling
ast_read from your thread which is causing ast_read to return a null
frame because it cannot take the lock (check main/channel.c in
function __ast_read()). If that't the case you need to find who is
locking that channel and not releasing it.
Can you reproduce this easily? You should dive into main/channel.c and
channels/chan_sip.c to check who's returning that frame.
--
Moises Silva
Software Developer
Sangoma Technologies Inc. | 50 McIntosh Drive, Suite 120, Markham ON
L3R 9T3 Canada
t. 1 905 474 1990 x 128 | e. moy at sangoma.com
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
More information about the asterisk-dev
mailing list