[asterisk-dev] Asterisk 1.4.15 ast_service_stop() function deadlock?

Paulo Garcia paulo.astdev at gmail.com
Fri Dec 14 07:35:55 CST 2007


Hi,

Yes, I meant ast_autoservice_stop... my mistake when writting.

I did a quick test using SVN 1.4 branch and the problem was gone.

Thanks!


Paulo

On Dec 12, 2007 3:04 AM, Dmitry Andrianov <dimas at dataart.com> wrote:

>  I guess you meant ast_autoservice_stop not ast_service_stop.
>
> Honestly I have no idea what causes your problem – it is something for
> Russell to look at probably.
>
> However, I'm almost sure that upgrading tor latest SVN 1.4 branch will fix
> the problem because of commit 90967.
>
>
>
> *From:* asterisk-dev-bounces at lists.digium.com [mailto:
> asterisk-dev-bounces at lists.digium.com] *On Behalf Of *Paulo Garcia
> *Sent:* Tuesday, December 11, 2007 10:44 PM
> *To:* Asterisk Developers Mailing List
> *Subject:* [asterisk-dev] Asterisk 1.4.15 ast_service_stop() function
> deadlock?
>
>
>
> Hi,
>
> well, it isn't really a deadlock, but I think it is something wrong....
>
> in my channel driver, I have a fax detection procedure that calls
> ast_exists_extensions() to check if there is a 'fax' exten available to jump
> for.
>
> My test environment is an Asterisk box with FXO interface and another
> non-asterisk box with FXS interface. The FXS side originates the call and
> the asterisk box answer the call.
>
> I always used the following dialplan for testing:
>
> exten => s,1,Answer(1000);
> exten => s,n,Record(test:ulaw|0|0)
> exten => s,n,NoOp(${REMOTESTATIONID})
>
> When the Asterisk side answer the call, the FXS side starts a Fax
> transmit. Of course the fax won't be received since there is no Rx
> application running on Asterisk side.
>
> The problem is that, when the Asterisk detects the fax signal and calls
> ast_exists_extensions(), the function ast_service_stop() only returns when
> the call finishes. I followed the stack and it seems that the
> ast_service_stop function stay the following point:
>
> 00234    /* Wait for it to un-block */
>
> 00235    while (ast_test_flag <http://www.asterisk.org/doxygen/1.4/utils_8h.html#0cba63300a5690b7f297b26179882cd9>( <http://www.asterisk.org/doxygen/1.4/structasent.html#24fea160601399d6d7a15f28b22bebd7>
>
> chan <http://www.asterisk.org/doxygen/1.4/structasent.html#24fea160601399d6d7a15f28b22bebd7>, AST_FLAG_BLOCKING <http://www.asterisk.org/doxygen/1.4/channel_8h.html#d032a9ab2ed31c90af611a3c6221925306284ba3d5b82164197739aff2f52568>))
> 00236       usleep(1000);
>
>
> So, If my call takes 3 minutes, the Asterisk will stay on that point for 3
> minutes and return only to hangup.
>
> Also, I tested using Asterisk 1.4.14 and this problem doesn't happen. I
> saw that 1.4.15 has a lot of changes on that function, to keep dtmf frames
> but I couldn't figure out why these changes starts to cause the problem in
> 1.4.15 since that loop exists on both versions.
>
> Any idea?
>
> *Note: I used the Record() application because it has the same loop to
> wait finish that my fax rx application has. I swapped them to be sure that
> it is not only a problem in my application.
> *
> --
> --------------
> Paulo Garcia
>
> _______________________________________________
> --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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20071214/2e594aa7/attachment.htm 


More information about the asterisk-dev mailing list