<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi guys,</div><div class="">I’m getting ready to switch to using opensips 2.4 but as soon as i put traffic on it (like 3 calls, not a lot) it crashed.</div><div class="">it happened twice - once when I didn’t have the dump cores on, so I turned it on, then started and it crashed almost immediately after that</div><div class=""><br class=""></div><div class="">I thought maybe it was because it did a insert on my postgres DB which doesn’t happen every call, </div><div class=""><br class=""></div><div class="">It’s really strange because when i try test calls it seems fine, but real traffic it doesn’t’ like :(</div><div class=""><br class=""></div><div class=""> </div><div class="">I think it’s part of where i do lookups for limit like this tutorial: <a href="https://www.opensips.org/Documentation/Tutorials-ConcurrentCallsLimitation" class="">https://www.opensips.org/Documentation/Tutorials-ConcurrentCallsLimitation</a></div><div class=""><br class=""></div><div class=""><div class=""><br class=""></div><div class=""><div class=""><b class="">version: opensips 2.4.2 (x86_64/linux)</b></div><div class="">flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT</div><div class="">ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535</div><div class="">poll method support: poll, epoll, sigio_rt, select.</div><div class="">main.c compiled on with gcc 4.9.2</div></div></div><div class=""><br class=""></div><div class="">Here are some relevant bits from my opensips.cfg</div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class=""><div class="">loadmodule "db_virtual.so"</div><div class="">modparam("db_virtual", "db_urls", "define debdb FAILOVER")</div></font></div><div class=""><div class=""><font face="Courier New" class="">modparam("db_virtual", "db_urls", "<a href="postgres://opensips:" class="">postgres://opensips:</a></font><span style="font-family: 'Courier New';" class="">passwd</span><font face="Courier New" class="">@192.168.5.65/opensips_cazcore")</font></div></div><div class=""><div class=""><font face="Courier New" class="">modparam("db_virtual", "db_urls", "<a href="postgres://opensips:" class="">postgres://opensips:</a></font><span style="font-family: 'Courier New';" class="">passwd</span><font face="Courier New" class="">@192.168.6.65/opensips_cazcore")</font></div></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class="">#### DIALOG module</font></div></div><div class=""><div class=""><font face="Courier New" class="">loadmodule "dialog.so"</font></div></div><div class=""><div class=""><font face="Courier New" class="">modparam("dialog", "dlg_match_mode", 1)</font></div></div><div class=""><div class=""><font face="Courier New" class="">modparam("dialog", "default_timeout", 21600) # 6 hours timeout</font></div></div><div class=""><div class=""><font face="Courier New" class="">modparam("dialog", "db_mode", 1) </font></div></div><div class=""><div class=""><font face="Courier New" class="">modparam("dialog", "db_update_period", 5) </font></div></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class="">#modparam("dialog", "db_url",<span class="Apple-tab-span" style="white-space:pre"> </span>"<a href="postgres://opensips:passwd@192.168.5.65/opensips_cazcore" class="">postgres://opensips:passwd@192.168.5.65/opensips_cazcore</a>") </font></div></div><div class=""><div class=""><font face="Courier New" class="">modparam("dialog", "db_url", "<a href="virtual://debdb" class="">virtual://debdb</a>") </font></div></div><div class=""><div class=""><font face="Courier New" class="">modparam("dialog", "dialog_replication_cluster", 1)</font></div></div><div class=""><div class=""><font face="Courier New" class="">modparam("dialog", "profile_replication_cluster", 1)</font></div></div><div class=""><div class=""><font face="Courier New" class="">#tags for VIP handling in cluster</font></div></div><div class=""><div class=""><font face="Courier New" class="">modparam("dialog", "dlg_sharing_tag", "vipA=MY_VIPA")</font></div></div><div class=""><div class=""><font face="Courier New" class="">modparam("dialog", "dlg_sharing_tag", "vipB=MY_VIPB")</font></div></div><div class=""><div class=""><font face="Courier New" class=""># ani dnis to limit calls from ani or to dnis. /b means replicated </font></div></div><div class=""><div class=""><font face="Courier New" class="">modparam("dialog", "profiles_with_value", "dnis/b;ani/b")</font></div></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class=""><b class="">#I called the lookup like this</b></font></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>route("limit_dnis",$var(limit_dnis),2);</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>route("limit_ani",$var(limit_ani),2);</font></div></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><font face="Courier New" class=""><b class="">#The lookup route looks like this</b></font></div><div class=""><font face="Courier New" class=""><br class=""></font></div><div class=""><div class=""><font face="Courier New" class="">route[limit_dnis]</font></div></div><div class=""><div class=""><font face="Courier New" class="">{</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span># first add to the profile, just to avoid "test and set" false results</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>set_dlg_profile("dnis/b","$param(1)");</font></div></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span># do the actual test - see how many calls the user has so far</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>get_profile_size("dnis/b","$param(1)","$var(calls)");</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>xlog("$ft $Ri There are $var(calls) ongoing calls to $param(1), limit is $param(2)\n");</font></div></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span># check within limit</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>if( $var(calls)>$param(2) )</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>{<span class="Apple-tab-span" style="white-space:pre"> </span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>xlog("$ft $Ri LIMIT_DNIS [$var(calls)/$param(2)]: From:$fU To:$param(1) Callid:$ci\n");</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>avp_db_query("insert into caztel.opensips_log(event,fulltext,linenr,digits,hostname) values ('LIMIT DNIS','$ft $Ri LIMIT_DNIS [$var(calls)/$param(2)]: From:$fU To:$param(1) Callid:$ci','$fU','$tU','MY_HOSTNAME')");</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>send_reply("486","DNIS LIMIT");</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>exit;</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span># terminating this call will automatically remove the call from the profile</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span># call was added to the profile without exceeding the limit, simply continue</font></div></div><div class=""><div class=""><font face="Courier New" class="">}</font></div></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class="">route[limit_ani]</font></div></div><div class=""><div class=""><font face="Courier New" class="">{</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span># first add to the profile, just to avoid "test and set" false results</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>set_dlg_profile("ani/b","$param(1)");</font></div></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span># do the actual test - see how many calls the user has so far</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>get_profile_size("ani/b","$param(1)","$var(calls_ani)");</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>xlog("$ft $Ri User $param(1) has $var(calls_ani) ongoing calls so far, limit is $param(2)\n");</font></div></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span># check within limit</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>if( $var(calls_ani)>$param(2) )</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>{<span class="Apple-tab-span" style="white-space:pre"> </span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>xlog("$ft $Ri LIMIT_ANI [$var(calls_ani)/$param(2)]: From:$param(1) To:$tU Callid:$ci\n");</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>avp_db_query("insert into caztel.opensips_log(event,fulltext,linenr,digits,hostname) values ('LIMIT ANI','$ft $Ri LIMIT_ANI [$var(calls_ani)/$param(2)]: From:$param(1) To:$tU Callid:$ci','$fU','$tU','MY_HOSTNAME')");</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>send_reply("486", "ANI LIMIT\n");</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>exit;</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span># terminating this call will automatically remove the call from the profile</font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>}</font></div></div><div class=""><div class=""><font face="Courier New" class=""><br class=""></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span class="Apple-tab-span" style="white-space:pre"> </span># call was added to the profile without exceeding the limit, simply continue</font></div></div><div class=""><div class=""><font face="Courier New" class="">}</font></div></div><div class=""><font face="Courier New" class=""><br class=""></font></div></blockquote><div class=""><br class=""></div><div class=""><b class="">from the log: </b></div><div class=""><br class=""></div><div class=""><div class="">Oct 24 12:21:29 CazcoreA /usr/sbin/opensips[5690]: 20138040-1546 10.10.10.109 There are 1 ongoing calls to 491232412323, limit is 2</div><div class="">Oct 24 12:21:29 CazcoreA /usr/sbin/opensips[5690]: 20138040-1546 10.10.10.109 User 4186880000 has 1 ongoing calls so far, limit is 2</div><div class="">Oct 24 12:21:29 CazcoreA /usr/sbin/opensips[5690]: CRITICAL:core:sig_usr: segfault in process pid: 5690, id: 11</div><div class="">Oct 24 12:21:29 CazcoreA /usr/sbin/opensips[5688]: 20138040-1546 10.10.10.109 Call from: caz5400. Outcarrierid = 24. <a href="sip:4186880000@10.10.10.118" class="">sip:4186880000@10.10.10.118</a> -> <a href="sip:24491232412323@10.10.10.109:5060" class="">sip:24491232412323@10.10.10.109:5060</a></div><div class="">Oct 24 12:21:29 CazcoreA /usr/sbin/opensips[5688]: 20138040-1546 10.10.10.109 There are 2 ongoing calls to 491232412323, limit is 2</div><div class="">Oct 24 12:21:29 CazcoreA /usr/sbin/opensips[5688]: 20138040-1546 10.10.10.109 User 4186880000 has 2 ongoing calls so far, limit is 2</div><div class="">Oct 24 12:21:30 CazcoreA /usr/sbin/opensips[5686]: 20138040-1546 10.10.10.109 Call from: caz5400. Outcarrierid = 24. <a href="sip:4186880000@10.10.10.118" class="">sip:4186880000@10.10.10.118</a> -> <a href="sip:24491232412323@10.10.10.109:5060" class="">sip:24491232412323@10.10.10.109:5060</a></div><div class="">Oct 24 12:21:30 CazcoreA /usr/sbin/opensips[5686]: 20138040-1546 10.10.10.109 There are 3 ongoing calls to 491232412323, limit is 2</div><div class="">Oct 24 12:21:30 CazcoreA /usr/sbin/opensips[5686]: 20138040-1546 10.10.10.109 LIMIT_DNIS [3/2]: From:4186880000 To:491232412323 Callid:<a href="mailto:146FDAEB-D6E811E8-A098C2A6-4A2230D0@10.10.10.118" class="">146FDAEB-D6E811E8-A098C2A6-4A2230D0@10.10.10.118</a></div><div class="">Oct 24 12:21:30 CazcoreA /usr/sbin/opensips[5749]: CRITICAL:core:handle_worker: dead child 11 (EOF received), pid 5690</div><div class="">Oct 24 12:21:32 CazcoreA /usr/sbin/opensips[5678]: INFO:core:handle_sigs: child process 5690 exited by a signal 11</div><div class="">Oct 24 12:21:32 CazcoreA /usr/sbin/opensips[5678]: INFO:core:handle_sigs: core was generated</div><div class="">Oct 24 12:21:32 CazcoreA /usr/sbin/opensips[5678]: INFO:core:handle_sigs: terminating due to SIGCHLD</div></div><div class=""><br class=""></div><div class=""><b class="">backtrace</b></div><div class=""><br class=""></div><div class="">GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1</div><div class="">Copyright (C) 2014 Free Software Foundation, Inc.</div><div class="">License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html" class="">http://gnu.org/licenses/gpl.html</a>></div><div class="">This is free software: you are free to change and redistribute it.</div><div class="">There is NO WARRANTY, to the extent permitted by law. Type "show copying"</div><div class="">and "show warranty" for details.</div><div class="">This GDB was configured as "x86_64-linux-gnu".</div><div class="">Type "show configuration" for configuration details.</div><div class="">For bug reporting instructions, please see:</div><div class=""><<a href="http://www.gnu.org/software/gdb/bugs/" class="">http://www.gnu.org/software/gdb/bugs/</a>>.</div><div class="">Find the GDB manual and other documentation resources online at:</div><div class=""><<a href="http://www.gnu.org/software/gdb/documentation/" class="">http://www.gnu.org/software/gdb/documentation/</a>>.</div><div class="">For help, type "help".</div><div class="">Type "apropos word" to search for commands related to "word"...</div><div class="">Reading symbols from /usr/sbin/opensips...(no debugging symbols found)...done.</div><div class="">[New LWP 5690]</div><div class="">[Thread debugging using libthread_db enabled]</div><div class="">Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".</div><div class="">Core was generated by `/usr/sbin/opensips -P /run/opensips/opensips.pid -f /etc/opensips/opensips.cfg'.</div><div class="">Program terminated with signal SIGSEGV, Segmentation fault.</div><div class="">#0 0x00007f5afe73b35c in fetch_dlg_value () from /usr/lib/x86_64-linux-gnu/opensips/modules/dialog.so</div><div class="">(gdb) bt full</div><div class="">#0 0x00007f5afe73b35c in fetch_dlg_value () from /usr/lib/x86_64-linux-gnu/opensips/modules/dialog.so</div><div class="">No symbol table info available.</div><div class="">#1 0x00007f5afe78022b in get_shtag_state () from /usr/lib/x86_64-linux-gnu/opensips/modules/dialog.so</div><div class="">No symbol table info available.</div><div class="">#2 0x00007f5afe742a05 in get_profile_size () from /usr/lib/x86_64-linux-gnu/opensips/modules/dialog.so</div><div class="">No symbol table info available.</div><div class="">#3 0x00007f5afda28022 in lb_route () from /usr/lib/x86_64-linux-gnu/opensips/modules/load_balancer.so</div><div class="">No symbol table info available.</div><div class="">#4 0x00007f5afda1ef35 in ?? () from /usr/lib/x86_64-linux-gnu/opensips/modules/load_balancer.so</div><div class="">No symbol table info available.</div><div class="">#5 0x0000000000433585 in do_action ()</div><div class="">No symbol table info available.</div><div class="">#6 0x0000000000438390 in run_action_list ()</div><div class="">No symbol table info available.</div><div class="">#7 0x0000000000462f3c in eval_expr ()</div><div class="">No symbol table info available.</div><div class="">#8 0x0000000000462b89 in eval_expr ()</div><div class="">No symbol table info available.</div><div class="">#9 0x0000000000462b33 in eval_expr ()</div><div class="">No symbol table info available.</div><div class="">#10 0x0000000000433526 in do_action ()</div><div class="">---Type <return> to continue, or q <return> to quit---</div><div class="">No symbol table info available.</div><div class="">#11 0x0000000000438390 in run_action_list ()</div><div class="">No symbol table info available.</div><div class="">#12 0x00000000004384ba in ?? ()</div><div class="">No symbol table info available.</div><div class="">#13 0x000000000043594b in do_action ()</div><div class="">No symbol table info available.</div><div class="">#14 0x0000000000438390 in run_action_list ()</div><div class="">No symbol table info available.</div><div class="">#15 0x0000000000436b3c in do_action ()</div><div class="">No symbol table info available.</div><div class="">#16 0x0000000000438390 in run_action_list ()</div><div class="">No symbol table info available.</div><div class="">#17 0x0000000000438648 in run_top_route ()</div><div class="">No symbol table info available.</div><div class="">#18 0x000000000043dd28 in receive_msg ()</div><div class="">No symbol table info available.</div><div class="">#19 0x000000000052e7d8 in ?? ()</div><div class="">No symbol table info available.</div><div class="">#20 0x0000000000519ad9 in udp_start_processes ()</div><div class="">No symbol table info available.</div><div class="">---Type <return> to continue, or q <return> to quit---</div><div class="">#21 0x000000000041c5a6 in main ()</div><div class="">No symbol table info available.</div><div class="">(gdb)</div><div class="">
<div class=""><span style="orphans: 2; widows: 2;" class="">---------------------------------------------------</span><br style="orphans: 2; widows: 2;" class=""><span style="orphans: 2; widows: 2;" class="">Jennifer Akemi Hashimoto</span><br style="orphans: 2; widows: 2;" class=""><span style="orphans: 2; widows: 2;" class="">Caztel Communications</span><br style="orphans: 2; widows: 2;" class=""><a href="mailto:jennifer.hashimoto@caztel.com" style="orphans: 2; widows: 2;" class="">jennifer.hashimoto@caztel.com</a><br style="orphans: 2; widows: 2;" class=""><span style="orphans: 2; widows: 2;" class="">905-836-5445 </span></div>
</div>
<br class=""></body></html>