<div dir="auto">Thanks bogdan, ill see how I can work around it keeping launch() in mind.<div dir="auto"><br></div><div dir="auto">-Qasim</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Apr 13, 2017 4:28 PM, "Bogdan-Andrei Iancu" <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<tt>The async()</tt><tt>, as bas</tt><tt>ed on transactions, works
only for req</tt><tt>uests, not for repl</tt><tt>ies. This is
limitation that will be changed in the nex</tt><tt>t releases (</tt><tt>but
not in 2.3).</tt><tt><br>
</tt><tt><br>
</tt><tt>What you could do in 2.3 is to use launch() statement to
run y</tt><tt>our async stuff. </tt><tt><br>
</tt><tt> </tt><tt>launch( blocking_function(...) );</tt><tt><br>
</tt><tt>The launch will start your function in background and
continue your script.</tt><br>
<pre class="m_7147362451226639646moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_7147362451226639646moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a>
OpenSIPS Summit May 2017 Amsterdam
<a class="m_7147362451226639646moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html" target="_blank">http://www.opensips.org/<wbr>events/Summit-2017Amsterdam.<wbr>html</a>
</pre>
<div class="m_7147362451226639646moz-cite-prefix">On 04/13/2017 02:00 PM,
<a class="m_7147362451226639646moz-txt-link-abbreviated" href="mailto:qasimakhan@gmail.com" target="_blank">qasimakhan@gmail.com</a> wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>Hi Bogdan,<br>
</div>
<div><br>
Yes i have to do some accounting calls based on reply
recieved. So i guess that means that async is not available
in reply route? Is it still planned for future release or
maybe in 2.3?<br>
<br>
</div>
Regards,<br>
</div>
Qasim<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Apr 13, 2017 at 3:15 PM,
Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank"><a class="m_7147362451226639646moz-txt-link-abbreviated" href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a></a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> <tt>Hi Qasim,<br>
<br>
This looks very very similar to an old report:<br>
<a class="m_7147362451226639646m_-669877160082485275moz-txt-link-freetext" href="http://lists.opensips.org/pipermail/users/2017-January/036231.html" target="_blank">http://lists.opensips.org/pipe<wbr>rmail/users/2017-January/03623<wbr>1.html</a><br>
<br>
And this was fixed in 2.2:<br>
<a class="m_7147362451226639646m_-669877160082485275moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/commit/4023a5d797960d245b52eb73dc9fc26b8cdf2914" target="_blank">https://github.com/OpenSIPS/op<wbr>ensips/commit/4023a5d797960d24<wbr>5b52eb73dc9fc26b8cdf2914</a><br>
<br>
I guess you try to do some async stuff in the reply
route, right ?<br>
<br>
Regards,<br>
</tt><span>
<pre class="m_7147362451226639646m_-669877160082485275moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_7147362451226639646m_-669877160082485275moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a>
OpenSIPS Summit May 2017 Amsterdam
<a class="m_7147362451226639646m_-669877160082485275moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html" target="_blank">http://www.opensips.org/events<wbr>/Summit-2017Amsterdam.html</a>
</pre>
</span><div><div class="m_7147362451226639646h5"><div class="m_7147362451226639646m_-669877160082485275moz-cite-prefix">On 04/13/2017 12:56 PM,
<a class="m_7147362451226639646m_-669877160082485275moz-txt-link-abbreviated" href="mailto:qasimakhan@gmail.com" target="_blank">qasimakhan@gmail.com</a> wrote:
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>Hi Bogdan,
</div>
PFA required logs. Also fund below some more info on the setup
i am using.
<b>OS:</b>
Distributor ID: SUSE LINUX
Description: openSUSE Leap 42.1 (x86_64)
Release: 42.1
</div>
<b>Opensips:</b>
<div>version: opensips 2.2.3 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP,
PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144,
MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll_lt, epoll_et, sigio_rt,
select.
git revision: 815a81abb
main.c compiled on 13:56:49 Apr 12 2017 with gcc 4.8
</div>
<div>Please also note that i have tried compiling it from git
but the problem persists.
</div>
<div>Regards,
</div>
<div>Qasim
</div>
<div>
</div>
</div>
<div class="gmail_extra">
<div class="gmail_quote">On Thu, Apr 13, 2017 at 2:26 PM,
Bogdan-Andrei Iancu <span dir="ltr"><<a class="m_7147362451226639646m_-669877160082485275moz-txt-link-abbreviated" href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span> wrote:
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> <tt>Hi Qasim,
Thank you for your report. Could you please run a "bt
full" in gdb a post the output ?
Best regards,
</tt>
<pre class="m_7147362451226639646m_-669877160082485275m_-1466275934586020385moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="m_7147362451226639646m_-669877160082485275m_-1466275934586020385moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a>
OpenSIPS Summit May 2017 Amsterdam
<a class="m_7147362451226639646m_-669877160082485275m_-1466275934586020385moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2017Amsterdam.html" target="_blank">http://www.opensips.org/events<wbr>/Summit-2017Amsterdam.html</a>
</pre><div><div class="m_7147362451226639646m_-669877160082485275h5">
<div class="m_7147362451226639646m_-669877160082485275m_-1466275934586020385moz-cite-prefix">On 04/13/2017 12:09 PM,
<a class="m_7147362451226639646m_-669877160082485275m_-1466275934586020385moz-txt-link-abbreviated" href="mailto:qasimakhan@gmail.com" target="_blank">qasimakhan@gmail.com</a> wrote:
</div>
</div></div><blockquote type="cite"><div><div class="m_7147362451226639646m_-669877160082485275h5">
<div dir="ltr">
<div>
<div>
<div>Hi,
</div>
I have upgraded my script from 1.11 to 2.2.3 which works
fine until i put async function on a single rest_get query.
When the async line is executed i get following errors:
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">2017-04-13T14:03:45.320300+05:<wbr>00
sip01 kernel: [31710929.448312] opensips[11475]: segfault
at 10 ip 0000000000427260 sp 00007ffe8c29f6e8 error 6 in
opensips[400000+228000]
2017-04-13T14:03:45.908172+05:<wbr>00 sip01
./sbin/opensips[10993]: WARNING:core:utimer_ticker: utimer
task <tm-utimer> already scheduled for 19470 ms (now
19570 ms), it may overlap..
2017-04-13T14:03:46.008338+05:<wbr>00 sip01
./sbin/opensips[10993]: WARNING:core:utimer_ticker: utimer
task <tm-utimer> already scheduled for 19470 ms (now
19670 ms), it may overlap..
</blockquote>
</div>
I also have a core dump available, after opening in gdb i get
the following info:
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[Thread
debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./sbin/opensips -P
/var/run/opensips.pid'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000000427260 in context_put_int
(type=CONTEXT_GLOBAL, ctx=0x0, pos=4, data=1) at context.c:173
<div style="margin-left:40px">173 ((int
*)ctx)[pos] = data;
</div>
</blockquote>
<div>
</div>
<div>Please note i will keep core dumps if you guys need some
more info on it.
</div>
<div>Regards,
</div>
<div>Qasim
</div>
</div>
<fieldset class="m_7147362451226639646m_-669877160082485275m_-1466275934586020385mimeAttachmentHeader"></fieldset>
</div></div><pre>______________________________<wbr>_________________
Users mailing list
<a class="m_7147362451226639646m_-669877160082485275m_-1466275934586020385moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_7147362451226639646m_-669877160082485275m_-1466275934586020385moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</div>
</blockquote></div>
</div>
</blockquote>
</div></div></div></blockquote></div>
</div>
</blockquote>
</div></blockquote></div></div>