[OpenSIPS-Devel] [opensips] OpenSIPS accepts broken Contact header, then fails to start (#729)

2015-12-17 Thread Saúl Ibarra Corretgé
(Tested on OpenSIPS 1.11 as of commit 95f5f79)

OpenSIPS accepts a registration with a broken Contact header and saves it in 
the location table. Example REGISTER:


REGISTER sip:sip2sip.info SIP/2.0
Via: SIP/2.0/UDP 127.0.1.1:5060;branch=z9hG4bK-1605-1-0
Max-Forwards: 70
From: "sipp" ;tag=1
To: "sipp" 
Call-ID: reg///1-1605@127.0.1.1
CSeq: 7 REGISTER
Contact: 
Expires: 3600
Content-Length: 0
User-Agent: SIPp


After this, if OpenSIPS is restarted, it fails to start with the following log:


DBG:core:parse_uri: bad host in uri (error at char ; in state 4) parsed: 
(XX) / (XX)
ERROR:usrloc:compute_next_hop: failed to parse URI of next hop: '   
   '
ERROR:usrloc:new_ucontact: failed to resolve next hop
ERROR:usrloc:mem_insert_ucontact: failed to create new contact
ERROR:usrloc:preload_udomain: inserting contact failed


---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/729___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] Sigfault in opensips 2.1 git rev. a173499

2015-12-17 Thread M S
Hi,

I recently installed opensips version 2.1 with git revision a173499 on a
32bit debian wheezy and it is keep getting crashed while acquiring lock in
TM module. Here is BT given by GDB,

-
Core was generated by `/usr/local/adx-ipc/sbin/opensips -P
/var/run/opensips/opensips.pid -m 256 -M 16'.
Program terminated with signal 11, Segmentation fault.
#0  0xb660a188 in tsl (lock=0x0) at ../../mem/../fastlock.h:86

warning: Source file is more recent than executable.
▒▒/usr/src/svn-src/opensips/fastlock.h:86:2617:beg:0xb660a188
(gdb) bt
#0  0xb660a188 in tsl (lock=0x0) at ../../mem/../fastlock.h:86
#1  get_lock (lock=) at ../../mem/../fastlock.h:176
#2  _lock (s=) at lock.h:100
#3  set_timer (ext_timeout=0x0, list_id=RT_T1_TO_1, new_tl=0xa61072c0) at
timer.c:899
#4  set_timer (new_tl=new_tl@entry=0xa61072c0,
list_id=list_id@entry=RT_T1_TO_1,
ext_timeout=0x0, ext_timeout@entry=0x1) at timer.c:876
#5  0xb66078db in _set_fr_retr (retr=, rb=0xa610728c) at
t_funcs.h:137
#6  start_retr (rb=0xa610728c) at t_funcs.h:151
#7  t_forward_nonack (t=t@entry=0xa6107174, p_msg=p_msg@entry=0xb66aa29c,
proxy=proxy@entry=0x0) at t_fwd.c:728
#8  0xb6602f6d in t_relay_to (p_msg=p_msg@entry=0xb66aa29c,
proxy=proxy@entry=0x0, flags=flags@entry=0) at t_funcs.c:247
#9  0xb6619814 in w_t_relay (p_msg=0xb66aa29c, proxy=0x0, flags=0x0) at
tm.c:1213
#10 0x0806441c in do_action (a=a@entry=0xb66752d0, msg=msg@entry=0xb66aa29c)
at action.c:1862
#11 0x0806bd34 in run_action_list (a=0xb66752d0, msg=msg@entry=0xb66aa29c)
at action.c:169
#12 0x080dbb48 in eval_elem (e=0xb6675344, msg=msg@entry=0xb66aa29c,
val=val@entry=0x0) at route.c:1643
#13 0x080db439 in eval_expr (e=0xb6675344, msg=msg@entry=0xb66aa29c,
val=val@entry=0x0) at route.c:1988
#14 0x080db567 in eval_expr (e=0xb6675370, msg=msg@entry=0xb66aa29c,
val=val@entry=0x0) at route.c:2004
#15 0x080db421 in eval_expr (e=0xb667539c, msg=msg@entry=0xb66aa29c,
val=val@entry=0x0) at route.c:2009
#16 0x080646fa in do_action (a=a@entry=0xb66754c8, msg=msg@entry=0xb66aa29c)
at action.c:
#17 0x0806b722 in run_action_list (msg=0xb66aa29c, a=) at
action.c:169
#18 run_actions (a=a@entry=0xb6660dac, msg=msg@entry=0xb66aa29c) at
action.c:134
#19 0x0806c106 in run_actions (msg=0xb66aa29c, a=0xb6660dac) at action.c:127
#20 run_top_route (a=a@entry=0xb6660dac, msg=msg@entry=0xb66aa29c) at
action.c:209
#21 0x080c5182 in receive_msg (
buf=0x827c5e0 "INVITE sip:99710170@172.16.171.21 SIP/2.0\r\nVia:
SIP/2.0/UDP 172.16.253.35:5060;branch=z9hG4bK.gQwBAxWsi;rport\r\nFrom: <
sip:997101701108@172.16.171.21>;tag=1~GfF8zam\r\nTo:
sip:99710170@172.16.171"..., len=,
rcv_info=rcv_info@entry=0xbfa16260) at receive.c:196
#22 0x081c3137 in udp_read_req (si=0xb665aaf8, bytes_read=0xbfa16328) at
net/proto_udp/proto_udp.c:190
#23 0x081b42d1 in handle_io (fm=, idx=,
event_type=) at net/net_udp.c:260
#24 handle_io (fm=, idx=,
event_type=) at net/net_udp.c:287
#25 io_wait_loop_epoll (h=, t=,
repeat=) at net/../io_wait_loop.h:215
#26 udp_rcv_loop (si=si@entry=0xb665aaf8) at net/net_udp.c:308
#27 0x081b6b01 in udp_start_processes (chd_rank=chd_rank@entry=0x823ff7c,
startup_done=startup_done@entry=0x0) at net/net_udp.c:448
#28 0x080603f6 in main_loop () at main.c:723
#29 main (argc=11, argv=0xbfa165d4) at main.c:1260
-

Can you please suggest what is wrong?

Thank you.
___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Bug - StartTLS in LDAP module fail to start (#441)

2015-12-17 Thread Ionut Ionita
I will close the issue. I consider that the "bug" was because the error message 
was misleading. Now you will get a proper error message which may help you 
solve the problem.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/441#issuecomment-165504019___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] [opensips] Bug - StartTLS in LDAP module fail to start (#441)

2015-12-17 Thread Ionut Ionita
Closed #441.

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/441#event-494885924___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [opensips] Slot Based Taildrop algorithm for ratelimit (#728)

2015-12-17 Thread Ionut Ionita
In this new algorithm a window is held per every pipe,
which is defined by two parameters: window_size(seconds) and
slot_period(microseconds). The number of slots is
window_size*1000/slot_period. The window is updated with every
call received and it's implemented as a circular vector, which
modifies it's start based on the elements that were dropped.

How is the window updated:
* if no message comes in 2*window_time from when the window start
was set , it means we can't use the values from any of the slots
and we set the value from any of the slots to 0; the window start
time is updated;
* if the message comes in t=[start+window_time; start+2*window_time)
it means that we can keep the values in slots in the interval
[t-window_time;start+window_time) and drop the ones in
[window_time; t-window_time); the window start time is updated;
* it the message come in t=[start; start+window_time) we don't
do any update do the window, only to the value of the slot corresponding
to time t;

The algorithm also shares this value through bin interface, allowing
having the values from all the replicas. Also, before sending the
value through the interface, the replica checks the window in order
to send only the values in valid slots. Two different functions
were made because of efficiency reasons. When replicating
we only do some very short loops or maybe nothing.
You can view, comment on, or merge this pull request online at:

  https://github.com/OpenSIPS/opensips/pull/728

-- Commit Summary --

  * Slot Based Taildrop algorithm for ratelimit

-- File Changes --

M modules/ratelimit/README (61)
M modules/ratelimit/doc/ratelimit_admin.xml (91)
M modules/ratelimit/ratelimit.c (129)
M modules/ratelimit/ratelimit.h (19)
M modules/ratelimit/ratelimit_helper.c (81)

-- Patch Links --

https://github.com/OpenSIPS/opensips/pull/728.patch
https://github.com/OpenSIPS/opensips/pull/728.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/728
___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


[OpenSIPS-Devel] [opensips] crash in dlg_hash +791 (#730)

2015-12-17 Thread 46 Labs LLC
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x7fa0585613ea in unref_dlg (dlg=0x7fa0609fcea8, cnt=1) at 
dlg_hash.c:791
791 d_entry = &(d_table->entries[dlg->h_entry]);
Traceback (most recent call last):
  File 
"/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py", 
line 63, in 
from libstdcxx.v6.printers import register_libstdcxx_printers
ImportError: No module named 'libstdcxx'
(gdb) bt full
#0  0x7fa0585613ea in unref_dlg (dlg=0x7fa0609fcea8, cnt=1) at 
dlg_hash.c:791
d_entry = 
__FUNCTION__ = "unref_dlg"
#1  0x7fa05c159b48 in empty_tmcb_list (head=head@entry=0x7fa06340abc0) at 
t_hooks.c:53
cbp = 0x0
cbp_tmp = 0x7fa05ed127a0
#2  0x7fa05c13bed5 in free_cell (dead_cell=0x7fa06340ab50) at h_table.c:127
b = 
i = 
rpl = 
tt = 
foo = 
p = 
#3  0x7fa05c13cefa in free_hash_table () at h_table.c:375
No locals.
#4  0x7fa05c153a9b in tm_shutdown () at t_funcs.c:91
__FUNCTION__ = "tm_shutdown"
#5  0x004c350a in destroy_modules () at sr_module.c:527
No locals.
#6  0x0043fd1a in cleanup (show_status=show_status@entry=1) at 
main.c:308
__FUNCTION__ = "cleanup"
#7  0x00440768 in handle_sigs () at main.c:503
chld = 0
chld_status = 139
overall_status = 139
i = 
do_exit = 
__FUNCTION__ = "handle_sigs"
#8  0x004192ea in main_loop () at main.c:746
startup_done = 0x0
chd_rank = 232
#9  main (argc=, argv=) at main.c:1250
cfg_log_stderr = 
---Type  to continue, or q  to quit---
cfg_stream = 
c = 
r = 
tmp = 0x7ffe0bca6e8b ""
tmp_len = 
port = 
proto = 
options = 0x5c0470 "f:cCm:M:b:l:n:N:rRvdDFETSVhw:t:u:g:P:G:W:o:"
seed = 1918274510
__FUNCTION__ = "main"

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/730___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel