[OpenSIPS-Users] SIPTRACE module behavior in 2.2
Yuri Ritvin
yuri.ritvin at gmail.com
Wed Apr 13 00:29:43 CEST 2016
It looks like some information is missing in the SIPTRACE module
documentation for OpenSIPS 2.2, or apparently it bears a bug. With the
given example of the configuration the log file displays these messages:
ERROR:siptrace:save_siptrace: invalid trace info
ERROR:siptrace:trace_msg_out: failed to save siptrace
And this is the config snippet:
#### SIPTRACE module
loadmodule "siptrace.so"
modparam("siptrace", "trace_id",
"[tid]uri=mysql://opensips:opensipsrw@dbserver/opensips;table=sip_trace;")
modparam("siptrace", "trace_on", 1)
....
if (method==INVITE && !has_totag()) {
$var(user)="osips at thisnetwork.com";
$var(trace_id) = "tid";
sip_trace("$var(trace_id)", "d", "$var(user)");
}
Then at some particular scenario SIPTRACE module crashes the OpenSIPS 2.2
application:
#0 save_siptrace (info=0x7f6878bf6b58, msg=<value optimized out>,
vals=0x7f68722bcf80, keys=0x7f68722bd180) at siptrace.c:878
hash = <value optimized out>
it = <value optimized out>
#1 0x00007f68720b5415 in trace_onreply_out (t=<value optimized out>,
type=<value optimized out>, ps=0x7fff0548a820) at siptrace.c:1982
faked = <value optimized out>
fromip_buff = "udp1XX.2X.XXX.185", '\000' <repeats 34 times>
toip_buff = "udp1XX.2X.XXX.78", '\000' <repeats 35 times>
msg = 0x7f6878c00740
to_ip = {af = 2, len = 4, u = {addrl = {1310254956, 0}, addr32 =
{1310254956, 0, 0, 0}, addr16 = {59244, 19992, 0, 0, 0, 0, 0, 0}, addr =
"l\347\030N", '\000' <repeats 11 times>}}
len = 3
statusbuf = "408\000\001\000\000"
sbuf = <value optimized out>
dst = <value optimized out>
__FUNCTION__ = "trace_onreply_out"
#2 0x00007f68748789a1 in run_trans_callbacks (type=128,
trans=0x7f6878bfecc8, req=<value optimized out>, rpl=<value optimized out>,
code=<value optimized out>) at t_hooks.c:209
params = {req = 0x7f6878c00740, rpl = 0xffffffffffffffff, code =
408, param = 0x7f6878bfeb28, extra1 = 0x7fff0548a9a0, extra2 =
0x7f6878bfede0}
cbp = 0x7f6878bfeb18
backup = 0x7816c0
trans_backup = 0x7f6878bfecc8
__FUNCTION__ = "run_trans_callbacks"
#3 0x00007f6874878b00 in run_trans_callbacks_locked (type=<value optimized
out>, trans=0x7f6878bfecc8, req=<value optimized out>, rpl=<value optimized
out>, code=<value optimized out>)
at t_hooks.c:262
No locals.
#4 0x00007f68748851b1 in relay_reply (t=0x7f6878bfecc8, p_msg=<value
optimized out>, branch=<value optimized out>, msg_status=<value optimized
out>, cancel_bitmap=0x7fff0548aa7c)
at t_reply.c:1255
relay = 0
save_clone = 0
buf = 0x7f6888aa78a8 "SIP/2.0 408 Request Timeout\r\nVia:
SIP/2.0/UDP
1XX.2X.XXX.78:8408;received=1XX.2X.XXX.78;branch=z9hG4bK-524287-1---af6608797b55630d;rport=8408\r\nTo:
<sip:TestingSubscriber1002 at sip.thisnetwork.com>;tag=3b8d"...
res_len = 412
relayed_code = 408
relayed_msg = 0xffffffffffffffff
bm = {to_tag_val = {
s = 0x7f6888aa796c
"3b8d6d10a54b0752c937c18d274bef37-402e\r\nFrom: \"TestingSubscriber1001\"<
sip:TestingSubscriber1001 at sip.thisnetwork.com>;tag=735c442d\r\nCall-ID:
PKSLf7Smdwyk-hULVsGkKg..\r\nCSeq: 2 INVITE\r\nServer: SBC-185\r\nConte"...,
len = 37}}
totag_retr = 0
reply_status = RPS_COMPLETED
uas_rb = 0x7f6878bfedc8
cb_s = {
s = 0x7f6888aa78a8 "SIP/2.0 408 Request Timeout\r\nVia:
SIP/2.0/UDP
1XX.2X.XXX.78:8408;received=1XX.2X.XXX.78;branch=z9hG4bK-524287-1---af6608797b55630d;rport=8408\r\nTo:
<sip:TestingSubscriber1002 at sip.thisnetwork.com>;tag=3b8d"..., len = 412}
text = {s = 0x50daf3 "Request Timeout", len = 15}
__FUNCTION__ = "relay_reply"
#5 0x00007f687488886e in fake_reply (ticks=70, set=<value optimized out>)
at timer.c:260
cancel_bitmap = 0
do_cancel_branch = <value optimized out>
reply_status = <value optimized out>
#6 final_response_handler (ticks=70, set=<value optimized out>) at
timer.c:391
old_ctx = 0x0
my_ctx = 0x7f6888aa7f08
r_buf = 0x7f6878bfeea0
---Type <return> to continue, or q <return> to quit---
t = 0x7f6878bfecc8
#7 timer_routine (ticks=70, set=<value optimized out>) at timer.c:1066
tl = 0x7f6878bfef18
tmp_tl = 0x0
id = <value optimized out>
__FUNCTION__ = "timer_routine"
#8 0x000000000047e28b in handle_timer_job () at timer.c:632
t = 0x7f687890d760
l = <value optimized out>
__FUNCTION__ = "handle_timer_job"
#9 0x00000000004ed64d in handle_io (fm=0x7f6888a9c388, idx=1,
event_type=<value optimized out>) at net/net_tcp_proc.c:117
ret = 0
n = <value optimized out>
con = <value optimized out>
s = <value optimized out>
rw = <value optimized out>
resp = <value optimized out>
response = {140733282036968, 140086962256117}
__FUNCTION__ = "handle_io"
#10 0x00000000004ee140 in io_wait_loop_epoll (repeat=0, t=2, h=<value
optimized out>) at ./io_wait_loop.h:221
n = 1
r = 1
e = 0x7f6888a9c388
ret = 1
#11 0x00000000004ef407 in tcp_worker_proc (unix_sock=<value optimized out>)
at net/net_tcp_proc.c:312
__FUNCTION__ = "tcp_worker_proc"
#12 0x00000000004eb31d in tcp_start_processes (chd_rank=0x7653c8,
startup_done=0x0) at net/net_tcp.c:1758
r = <value optimized out>
reader_fd = {92, 94}
pid = 0
si = <value optimized out>
load_p = 0x7f6878bc58c8
__FUNCTION__ = "tcp_start_processes"
#13 0x000000000042f4af in main_loop (argc=<value optimized out>,
argv=<value optimized out>) at main.c:677
startup_done = 0x0
chd_rank = 44
#14 main (argc=<value optimized out>, argv=<value optimized out>) at
main.c:1252
cfg_stream = <value optimized out>
c = <value optimized out>
r = <value optimized out>
tmp = 0x7fff0548bf70 ""
tmp_len = <value optimized out>
port = 0
proto = 5282149
options = 0x510b48 "f:cCm:M:b:l:n:N:rRvdDFETSVhw:t:u:g:P:G:W:o:"
ret = -1
seed = 221183166
rfd = <value optimized out>
__FUNCTION__ = "main"
This is the version print (installed via RPMs):
opensips -V
version: opensips 2.2.0-beta (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, F_MALLOC,
DBG_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.
main.c compiled on 14:59:48 Mar 31 2016 with gcc 4.4.7
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160412/e21987ec/attachment-0001.htm>
More information about the Users
mailing list