<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi, sorry bother you.<div class=""><br class=""></div><div class="">I get a new backtrace </div><div class=""><br class=""></div><div class=""><div class="">Core was generated by `/usr/sbin/asterisk -f -vvvg -c'.</div><div class="">Program terminated with signal 11, Segmentation fault.</div><div class="">#0  0x00007f82ad124c80 in pthread_mutex_lock () from /lib64/libpthread.so.0</div><div class="">#0  0x00007f82ad124c80 in pthread_mutex_lock () from /lib64/libpthread.so.0</div><div class="">No symbol table info available.</div><div class="">#1  0x0000000000533c38 in __ast_pthread_mutex_lock (filename=<optimized out>, lineno=<optimized out>, func=<optimized out>, mutex_name=<optimized out>, t=<optimized out>) at lock.c:315</div><div class="">No locals.</div><div class="">#2  0x00007f829927aa12 in ast_odbc_release_obj (obj=obj@entry=0x7f81e8021900) at res_odbc.c:724</div><div class="">        class = 0x0</div><div class="">        __PRETTY_FUNCTION__ = "ast_odbc_release_obj"</div><div class="">#3  0x00007f81c2aee0b1 in dial_exec (chan=<optimized out>, data=0x7f81c3e85ae0 “\"SIP/magnus\"") at app_mbilling.c:4220</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">My code line 4219 - 4222:</div><div class=""><br class=""></div><div class=""><div class="">4219               if(obj){</div><div class="">4220<span class="Apple-tab-span" style="white-space:pre">                   </span>ast_odbc_release_obj(obj);</div><div class="">4221<span class="Apple-tab-span" style="white-space:pre">                    </span>obj = NULL;</div><div class="">4222<span class="Apple-tab-span" style="white-space:pre">           </span>}<span class="Apple-tab-span" style="white-space:pre">   </span></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Please help me.</div><div class=""><br class=""></div><div class="">Best regards</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On 12 Sep 2018, at 20:10, <a href="mailto:info@magnussolution.com" class="">info@magnussolution.com</a> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">thanks for you help.<div class=""><br class=""></div><div class=""><br class=""></div><div class="">I try use backtrace. But I no a expert. </div><div class=""><br class=""></div><div class="">I using cents 7 64x</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">gdb -se "asterisk" -ex "bt full" -ex "thread apply all bt" --batch -c core.13414 > /tmp/backtrace.txt</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0); min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">warning: exec file is newer than core file.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Missing separate debuginfo for /usr/lib64/libmyodbc5.so</span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[Thread debugging using libthread_db enabled]</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Using host libthread_db library "/lib64/libthread_db.so.1".</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Missing separate debuginfo for /usr/lib64/libmyodbc5.so</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Core was generated by `asterisk -vvvvvvvg'.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Program terminated with signal 11, Segmentation fault.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">#0  ast_odbc_release_obj (obj=0x0) at res_odbc.c:712</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgba(255, 255, 255, 0.639216); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">712<span class="Apple-tab-span" style="white-space:pre">               </span>struct odbc_class *class = obj->parent;</span></div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">to use ODBC on centos7 and mariaDB 10 I install it</div><div class=""><br class=""></div><div class=""><div class=""><div class="">yum -y remove mysql-connector-odbc</div><div class="">yum -y localinstall --nogpgcheck <a href="http://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.11-1.el7.x86_64.rpm" class="">http://dev.mysql.com/get/Downloads/Connector-ODBC/5.3/mysql-connector-odbc-5.3.11-1.el7.x86_64.rpm</a></div><div class="">ln -s /usr/lib64/libmyodbc5w.so  /usr/lib64/libmyodbc5.so </div><div class=""><br class=""></div><div class=""><br class=""></div></div></div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 12 Sep 2018, at 19:28, Alex Villací­s Lasso <<a href="mailto:a_villacis@palosanto.com" class="">a_villacis@palosanto.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">El 12/9/18 a las 14:33, <a href="mailto:info@magnussolution.com" class="">info@magnussolution.com</a> escribió:<br class=""><blockquote type="cite" class="">that’s correct. I wrote a ael context with func_odbc and this work very well.<br class=""><br class="">But, using my app_mbilling.c work more faster than ael and func_odbc.<br class=""><br class="">example:<br class="">agi 15 CPS<br class="">ael-func_odbc 30 CPS<br class="">native application 50 CPS<br class=""></blockquote><br class="">Have you tried yet FastAGI? Ordinary AGI is slowed down by the spawning of an entire process per call. FastAGI just requires a daemon that listens to requests on a TCP/IP port. This is way less invasive than writing a whole new Asterisk application in C. Any bottlenecks would now be located in the FastAGI server and could be tuned without touching the Asterisk core.<br class=""><br class="">As an aside, just a wild guess, but I think the crashes could be due to one or more race conditions, and the proper locking required to solve them would slow down your C application to the ael-func_odbc level.<br class=""><br class=""><br class="">-- <br class="">_____________________________________________________________________<br class="">-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com/" class="">http://www.api-digital.com</a> --<br class=""><br class="">Astricon is coming up October 9-11!  Signup is available at: <a href="https://www.asterisk.org/community/astricon-user-conference" class="">https://www.asterisk.org/community/astricon-user-conference</a><br class=""><br class="">asterisk-dev mailing list<br class="">To UNSUBSCRIBE or update options visit:<br class="">  <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" class="">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></div></div></blockquote></div><br class=""></div></div>-- <br class="">_____________________________________________________________________<br class="">-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" class="">http://www.api-digital.com</a> --<br class=""><br class="">Astricon is coming up October 9-11!  Signup is available at: <a href="https://www.asterisk.org/community/astricon-user-conference" class="">https://www.asterisk.org/community/astricon-user-conference</a><br class=""><br class="">asterisk-dev mailing list<br class="">To UNSUBSCRIBE or update options visit:<br class="">   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" class="">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></div></blockquote></div><br class=""></div></body></html>