Hi,
I have upgraded to Kamailio v4.3.3 rev. e275bc on my test server running debian wheezy 32 bit and getting this error,
-- ERROR: async [async_sleep.c:248]: async_send_task(): failed to suspend the processing --
Basically, I am running a sql query in script which if returns any records then i suspend the transaction with "async_task_route" to process data returned by query later on. The problem happens when this "async_task_route" method is executed. This is old code which was working perfectly fine with Kamailio v4.3.2 and it only gives error after the upgrade to v4.3.3.
Please help.
Thank you.
Hello,
was there a final response sent to the caller?
Can you run with debug=3 and send the log messages to me?
Cheers, Daniel
On 05/10/15 12:46, M S wrote:
Hi,
I have upgraded to Kamailio v4.3.3 rev. e275bc on my test server running debian wheezy 32 bit and getting this error,
-- ERROR: async [async_sleep.c:248]: async_send_task(): failed to suspend the processing --
Basically, I am running a sql query in script which if returns any records then i suspend the transaction with "async_task_route" to process data returned by query later on. The problem happens when this "async_task_route" method is executed. This is old code which was working perfectly fine with Kamailio v4.3.2 and it only gives error after the upgrade to v4.3.3.
Please help.
Thank you.
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Hi,
Yes, i send final response before calling the method. The data returned by SQL is processed by method to send new sip requests using uac modules. I will send you debug level 3 logs shortly.
Thank you.
On Mon, Oct 5, 2015 at 3:32 PM, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
was there a final response sent to the caller?
Can you run with debug=3 and send the log messages to me?
Cheers, Daniel
On 05/10/15 12:46, M S wrote:
Hi,
I have upgraded to Kamailio v4.3.3 rev. e275bc on my test server running debian wheezy 32 bit and getting this error,
-- ERROR: async [async_sleep.c:248]: async_send_task(): failed to suspend the processing --
Basically, I am running a sql query in script which if returns any records then i suspend the transaction with "async_task_route" to process data returned by query later on. The problem happens when this "async_task_route" method is executed. This is old code which was working perfectly fine with Kamailio v4.3.2 and it only gives error after the upgrade to v4.3.3.
Please help.
Thank you.
sr-dev mailing listsr-dev@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - http://asipto.com/u/kat
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Sorry i couldn't provide you with debug level 3 logs earlier on due to an outage of our test setup.
Anyways in the meantime i reviewed the configuration file which was causing the problem. It does not seems right to make potentially massive SQL query in sync process and serialize the entire result-set to be processed in async process. So i changed the config to do the db query in async process instead. Now the problem does not happen at all and everything is OK.
My test setup is back online now, so let me know if this case interests you. I will deploy old configuration and let you test it.
Again, thank you so much for all your help and cooperation.
Hello,
no longer need for debug messages, I know the reason now. Suspending a 'terminated' transaction exposes the risk of either crash or memory leak. A transaction in this state has either a short life (few seconds) or lives forever, because the transaction in terminated state can be cleaned up by the wait timer, or if reference counter is incremented, is unlikely to be decremented because no new branch transmission will be done on a transaction that has a final response sent out. If you did the processing very shortly after the sending of response, then you were within the cleanup interval, but at any time can risk a crash, if there is some delay in processing the async task.
Therefore, if the final response was sent out, the best is to send needed data to another process via mqueue. The consumer processes of mqueue task can be created with rtimer module. See sipweet slides in the next presentation for a sample of mqueue+rtimer usage:
- http://www.kamailio.org/events/2014-KamailioWorld/day2/26-Daniel-Constantin....
Cheers, Daniel
On 05/10/15 16:59, M S wrote:
Hi,
Yes, i send final response before calling the method. The data returned by SQL is processed by method to send new sip requests using uac modules. I will send you debug level 3 logs shortly.
Thank you.
On Mon, Oct 5, 2015 at 3:32 PM, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
Hello, was there a final response sent to the caller? Can you run with debug=3 and send the log messages to me? Cheers, Daniel On 05/10/15 12:46, M S wrote:
Hi, I have upgraded to Kamailio v4.3.3 rev. e275bc on my test server running debian wheezy 32 bit and getting this error, -- ERROR: async [async_sleep.c:248]: async_send_task(): failed to suspend the processing -- Basically, I am running a sql query in script which if returns any records then i suspend the transaction with "async_task_route" to process data returned by query later on. The problem happens when this "async_task_route" method is executed. This is old code which was working perfectly fine with Kamailio v4.3.2 and it only gives error after the upgrade to v4.3.3. Please help. Thank you. _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org <mailto:sr-dev@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierla http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - http://asipto.com/u/kat _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org <mailto:sr-dev@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Daniel,
Does this mean it's generally bad practice to suspend+resume when handling initial INVITE requests while handling all other requests in the main SIP worker children/main config body? In my case I suspend INVITEs and resume them in rtimer processes consuming an mqueue, but CANCELs for example, and everything else, is handled without async.
-- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Sent from my BlackBerry.
That's ok.
The issue on this thread was about suspending a transaction for which a final response was sent out back to initial originator of the request (e.g., invite was forwarded, 200ok comes in and it is sent out, then the transaction is suspended).
Daniel
On 06/10/15 00:23, Alex Balashov wrote:
Daniel,
Does this mean it's generally bad practice to suspend+resume when handling initial INVITE requests while handling all other requests in the main SIP worker children/main config body? In my case I suspend INVITEs and resume them in rtimer processes consuming an mqueue, but CANCELs for example, and everything else, is handled without async.
-- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Sent from my BlackBerry.
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Great, it all makes a lot of sense now. Thank you so much.
I will do some more reading and testing on mqueues.
Thank you.
On Tue, Oct 6, 2015 at 12:11 AM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
Hello,
no longer need for debug messages, I know the reason now. Suspending a 'terminated' transaction exposes the risk of either crash or memory leak. A transaction in this state has either a short life (few seconds) or lives forever, because the transaction in terminated state can be cleaned up by the wait timer, or if reference counter is incremented, is unlikely to be decremented because no new branch transmission will be done on a transaction that has a final response sent out. If you did the processing very shortly after the sending of response, then you were within the cleanup interval, but at any time can risk a crash, if there is some delay in processing the async task.
Therefore, if the final response was sent out, the best is to send needed data to another process via mqueue. The consumer processes of mqueue task can be created with rtimer module. See sipweet slides in the next presentation for a sample of mqueue+rtimer usage:
http://www.kamailio.org/events/2014-KamailioWorld/day2/26-Daniel-Constantin....
Cheers, Daniel
On 05/10/15 16:59, M S wrote:
Hi,
Yes, i send final response before calling the method. The data returned by SQL is processed by method to send new sip requests using uac modules. I will send you debug level 3 logs shortly.
Thank you.
On Mon, Oct 5, 2015 at 3:32 PM, Daniel-Constantin Mierla < miconda@gmail.commiconda@gmail.com> wrote:
Hello,
was there a final response sent to the caller?
Can you run with debug=3 and send the log messages to me?
Cheers, Daniel
On 05/10/15 12:46, M S wrote:
Hi,
I have upgraded to Kamailio v4.3.3 rev. e275bc on my test server running debian wheezy 32 bit and getting this error,
-- ERROR: async [async_sleep.c:248]: async_send_task(): failed to suspend the processing --
Basically, I am running a sql query in script which if returns any records then i suspend the transaction with "async_task_route" to process data returned by query later on. The problem happens when this "async_task_route" method is executed. This is old code which was working perfectly fine with Kamailio v4.3.2 and it only gives error after the upgrade to v4.3.3.
Please help.
Thank you.
sr-dev mailing listsr-dev@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - http://asipto.com/u/kat
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - http://asipto.com/u/kat