Fwd: uac_auth() segfault

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: uac_auth() segfault

jrzondagh
Hi All,

I'm running a compiled version of openSIPS 1.10 on Ubuntu 12.04.

I'm getting a segfault in the uac_auth() function and not too sure why. I am setting the username, password and realm avps before I call it.

The 401 comes in back from the UAS and then hits the failure_route[1], does some stuff and then crashes in what seems like uac_auth()...

==== Extract from CFG ====


route[1] { 

xlog("L_INFO", "[$ci] Routing this Request");

# for INVITEs enable some additional helper routes
if (is_method("INVITE|SUBSCRIBE|PUBLISH|INFO|MESSAGE|NOTIFY")) {
t_on_branch("2");
t_on_reply("2");
t_on_failure("1");
}

if (!t_relay()) {
sl_reply_error();
}

exit; 

failure_route[1] { 


if (t_check_status("401")) {
xlog("L_INFO","[$ci] Got 401 from Porta \n");
                avp_db_query("select username from registrant_ip_map where external_ip = '$(avp(ext_si){s.escape.common})'","$avp(authuser)");

xlog("L_INFO","[$ci] Auth User [$avp(authuser)]");

avp_db_query("select password from registrant where username = '$(avp(authuser){s.escape.common})'","$avp(authpass)");
$avp(authrealm) = "";

$avp(www) = $(<reply>hdr(WWW-Authenticate));
avp_subst("$avp(www)", "/Digest\s//");
#Get the realm from the www-auth header
$var(numkvp) = $(avp(www){csv.count});
$var(i) = 0;
while($var(i) < $var(numkvp)) {
$var(temp) = $(avp(www){s.select,$var(i),,});
if ($var(temp) =~ "realm.*") {
$avp(authrealm) = $var(temp);
avp_subst("$avp(authrealm)","/(realm=\")(.*)(\")/\2/");
}

$var(i) = $var(i) + 1;
}
                xlog("L_INFO","[$ci] authrealm is [$avp(authrealm)], authuser is [$avp(authuser)], authpass is [$avp(authpass)]\n");

#No need for loop prevention as Porta sends 183 early media recording saying password is wrong, then sends 603
if (uac_auth()) {
xlog("L_INFO","[$ci] Built auth, sending back to Porta\n");

t_on_failure("1");
t_relay();
xlog("L_INFO","[$ci] Relay Auth in INVITE\n");
}
}
if (t_was_cancelled()) {
exit;
}



}


==== EXTRACT FROM syslog =====

Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: [NjMzOGYxMGJjMGI5NzQzNTE3OWQ1NDBhYzcxMjcxOGU] Auth User [27877009000]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:ops_dbquery_avps: query [select password from registrant where username = '27877009000']
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:mysql_raise_event: MySQL status has not changed: connected
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_new_result: allocate 28 bytes for result set at 0xb73d9a5c
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:db_mysql_get_columns: 1 columns returned from the query
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_allocate_columns: allocate 16 bytes for result columns at 0xb73d9a88
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0xb73d9a8c)[0]=[password]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_allocate_rows: allocate 28 bytes for result rows and values at 0xb73d9aa4
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:db_mysql_str2val: converting STRING [xxxxxxxx]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:db_query_avp: rows [1]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:db_query_avp: row [0]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:db_close_query: close avp query
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_columns: freeing result columns at 0xb73d9a88
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_rows: freeing 1 rows
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_row: freeing row values at 0xb73d9aac
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_rows: freeing rows at 0xb73d9aa4
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_result: freeing result set at 0xb73d9a5c
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:pv_get_spec_value: Found context function 0xb6fa4abd
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_headers: flags=ffffffffffffffff
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:get_hdr_field: content_length=0
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:get_hdr_field: found end of header
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:subst_run: running. r=0
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:subst_run: matched (0, 7): [Digest ]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:ops_subst: subst to 1 avps
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_csv: Parsing csv for : [realm="196.28.136.80",nonce="0a88ebc4eb91e7a1e2910f35e76191b6c66f"]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:comp_scriptvar: int 26 : 0 / 2
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:subst_run: running. r=0
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:subst_run: matched (0, 21): [realm="196.28.136.80"]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:ops_subst: subst to 1 avps
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:comp_scriptvar: int 26 : 1 / 2
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:comp_scriptvar: int 26 : 2 / 2
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: [NjMzOGYxMGJjMGI5NzQzNTE3OWQ1NDBhYzcxMjcxOGU] authrealm is [196.28.136.80], authuser is [27877009000], authpass is [xxxxxxxx]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:uac:uac_auth: picked reply is 0xb73ca714, code 401
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_authenticate_body: <realm>="196.28.136.80" state=2
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_authenticate_body: <nonce>="0a88ebc4eb91e7a1e2910f35e76191b6c66f" state=3
Jan 17 12:52:24 opensips4 kernel: [  249.123055] show_signal_msg: 15 callbacks suppressed
Jan 17 12:52:24 opensips4 kernel: [  249.123060] opensips[1939]: segfault at 0 ip   (null) sp bfde82ec error 14 in opensips[8048000+1a6000]
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1956]: DBG:tm:utimer_routine: timer routine:4,tl=0xb5003a5c next=(nil), timeout=4600000
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1968]: CRITICAL:core:receive_fd: EOF on 21
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1968]: DBG:core:handle_ser_child: dead child 10, pid 1939 (shutting down?)
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1968]: DBG:core:io_watch_del: io_watch_del op on index -1 21 (0x8213340, 21, -1, 0x0,0x1) fd_no=27 called
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1967]: INFO:core:sig_usr: signal 15 received
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1966]: INFO:core:sig_usr: signal 15 received
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1965]: INFO:core:sig_usr: signal 15 received

==== Back trace =====

available upon request



Any ideas?

Regards,

Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: <a href="tel:%2B27%2072%20598%204887" value="+27725984887" target="_blank">+27 72 598 4887 | f: <a href="tel:%2B27%2086%20546%201405" value="+27865461405" target="_blank">+27 86 546 1405
uk: <a href="tel:%2B44%2020%20328%2099610" value="+442032899610" target="_blank">+44 20 328 99610


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: uac_auth() segfault

Bogdan-Andrei Iancu-2
Hello,

Do you have still have the corefile ? Are you able to extract a backtrace from it . See:
        http://www.opensips.org/Documentation/TroubleShooting-Crash

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 21.01.2014 15:35, Justin Zondagh wrote:
Hi All,

I'm running a compiled version of openSIPS 1.10 on Ubuntu 12.04.

I'm getting a segfault in the uac_auth() function and not too sure why. I am setting the username, password and realm avps before I call it.

The 401 comes in back from the UAS and then hits the failure_route[1], does some stuff and then crashes in what seems like uac_auth()...

==== Extract from CFG ====


route[1] { 

xlog("L_INFO", "[$ci] Routing this Request");

# for INVITEs enable some additional helper routes
if (is_method("INVITE|SUBSCRIBE|PUBLISH|INFO|MESSAGE|NOTIFY")) {
t_on_branch("2");
t_on_reply("2");
t_on_failure("1");
}

if (!t_relay()) {
sl_reply_error();
}

exit; 

failure_route[1] { 


if (t_check_status("401")) {
xlog("L_INFO","[$ci] Got 401 from Porta \n");
                avp_db_query("select username from registrant_ip_map where external_ip = '$(avp(ext_si){s.escape.common})'","$avp(authuser)");

xlog("L_INFO","[$ci] Auth User [$avp(authuser)]");

avp_db_query("select password from registrant where username = '$(avp(authuser){s.escape.common})'","$avp(authpass)");
$avp(authrealm) = "";

$avp(www) = $(<reply>hdr(WWW-Authenticate));
avp_subst("$avp(www)", "/Digest\s//");
#Get the realm from the www-auth header
$var(numkvp) = $(avp(www){csv.count});
$var(i) = 0;
while($var(i) < $var(numkvp)) {
$var(temp) = $(avp(www){s.select,$var(i),,});
if ($var(temp) =~ "realm.*") {
$avp(authrealm) = $var(temp);
avp_subst("$avp(authrealm)","/(realm=\")(.*)(\")/\2/");
}

$var(i) = $var(i) + 1;
}
                xlog("L_INFO","[$ci] authrealm is [$avp(authrealm)], authuser is [$avp(authuser)], authpass is [$avp(authpass)]\n");

#No need for loop prevention as Porta sends 183 early media recording saying password is wrong, then sends 603
if (uac_auth()) {
xlog("L_INFO","[$ci] Built auth, sending back to Porta\n");

t_on_failure("1");
t_relay();
xlog("L_INFO","[$ci] Relay Auth in INVITE\n");
}
}
if (t_was_cancelled()) {
exit;
}



}


==== EXTRACT FROM syslog =====

Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: [NjMzOGYxMGJjMGI5NzQzNTE3OWQ1NDBhYzcxMjcxOGU] Auth User [27877009000]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:ops_dbquery_avps: query [select password from registrant where username = '27877009000']
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:mysql_raise_event: MySQL status has not changed: connected
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_new_result: allocate 28 bytes for result set at 0xb73d9a5c
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:db_mysql_get_columns: 1 columns returned from the query
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_allocate_columns: allocate 16 bytes for result columns at 0xb73d9a88
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0xb73d9a8c)[0]=[password]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_allocate_rows: allocate 28 bytes for result rows and values at 0xb73d9aa4
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:db_mysql_str2val: converting STRING [xxxxxxxx]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:db_query_avp: rows [1]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:db_query_avp: row [0]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:db_close_query: close avp query
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_columns: freeing result columns at 0xb73d9a88
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_rows: freeing 1 rows
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_row: freeing row values at 0xb73d9aac
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_rows: freeing rows at 0xb73d9aa4
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_result: freeing result set at 0xb73d9a5c
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:pv_get_spec_value: Found context function 0xb6fa4abd
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_headers: flags=ffffffffffffffff
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:get_hdr_field: content_length=0
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:get_hdr_field: found end of header
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:subst_run: running. r=0
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:subst_run: matched (0, 7): [Digest ]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:ops_subst: subst to 1 avps
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_csv: Parsing csv for : [realm="196.28.136.80",nonce="0a88ebc4eb91e7a1e2910f35e76191b6c66f"]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:comp_scriptvar: int 26 : 0 / 2
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:subst_run: running. r=0
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:subst_run: matched (0, 21): [realm="196.28.136.80"]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:ops_subst: subst to 1 avps
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:comp_scriptvar: int 26 : 1 / 2
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:comp_scriptvar: int 26 : 2 / 2
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: [NjMzOGYxMGJjMGI5NzQzNTE3OWQ1NDBhYzcxMjcxOGU] authrealm is [196.28.136.80], authuser is [27877009000], authpass is [xxxxxxxx]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:uac:uac_auth: picked reply is 0xb73ca714, code 401
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_authenticate_body: <realm>="196.28.136.80" state=2
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_authenticate_body: <nonce>="0a88ebc4eb91e7a1e2910f35e76191b6c66f" state=3
Jan 17 12:52:24 opensips4 kernel: [  249.123055] show_signal_msg: 15 callbacks suppressed
Jan 17 12:52:24 opensips4 kernel: [  249.123060] opensips[1939]: segfault at 0 ip   (null) sp bfde82ec error 14 in opensips[8048000+1a6000]
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1956]: DBG:tm:utimer_routine: timer routine:4,tl=0xb5003a5c next=(nil), timeout=4600000
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1968]: CRITICAL:core:receive_fd: EOF on 21
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1968]: DBG:core:handle_ser_child: dead child 10, pid 1939 (shutting down?)
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1968]: DBG:core:io_watch_del: io_watch_del op on index -1 21 (0x8213340, 21, -1, 0x0,0x1) fd_no=27 called
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1967]: <a class="moz-txt-link-freetext" href="INFO:core:sig_usr">INFO:core:sig_usr: signal 15 received
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1966]: <a class="moz-txt-link-freetext" href="INFO:core:sig_usr">INFO:core:sig_usr: signal 15 received
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1965]: <a class="moz-txt-link-freetext" href="INFO:core:sig_usr">INFO:core:sig_usr: signal 15 received

==== Back trace =====

available upon request



Any ideas?

Regards,

Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: <a moz-do-not-send="true" href="tel:%2B27%2072%20598%204887" value="+27725984887" target="_blank">+27 72 598 4887 | f: <a moz-do-not-send="true" href="tel:%2B27%2086%20546%201405" value="+27865461405" target="_blank">+27 86 546 1405
uk: <a moz-do-not-send="true" href="tel:%2B44%2020%20328%2099610" value="+442032899610" target="_blank">+44 20 328 99610



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: uac_auth() segfault

James Palic-2
Bogdan-Andrei Iancu <bogdan@...> writes:

>
>
>     Hello,
>         Do you have still have the corefile ? Are you able to extract a
>         backtrace from it . See:
>                
>         http://www.opensips.org/Documentation/TroubleShooting-Crash
>         Regards,
>       Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>       On 21.01.2014 15:35, Justin Zondagh wrote:
>
>    
>      
>        
>           Hi All,
>            
>             I'm running a compiled version of openSIPS 1.10 on
>               Ubuntu 12.04.
>            
>             I'm getting a segfault in the uac_auth() function and
>               not too sure why. I am setting the username, password and
>               realm avps before I call it.
>            
>             The 401 comes in back from the UAS and then hits the
>               failure_route[1], does some stuff and then crashes in what
>               seems like uac_auth()...
>            
>            
>             ==== Back trace =====
>            
>             available upon request
>            
>            
>            
>             Any ideas?
>            
>             Regards,
>            
>              
>                
>                  
>                   Justin Zondaghzondagh-
[hidden email]

>                   Cape Town | South Africa
>                  
>                     skype: jrzondagh
>                   m: +27 72 598
>                       4887 | f: +27 86 546
>                       1405
>
>                   uk: +44 20 328
>                       99610
>       _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

Hi Bogdan,

I'm am also experiencing a segfault with uac_auth() in OpenSIPS 1.10
(running on Debian). Following the Troubleshooting directions, bt full
shows:

#0 0x0000000000000000 in ?? ()
No symbol table info available.
#1 0x00007fa4987ee370 in ?? ()
No symbol table info available.
#2 0x00007fa4987ee370 in ?? ()
No symbol table info available.
#3 0x0000000000479383 in ?? ()
No symbol table info available.
#3 0x0000000000000000 in ?? ()
No symbol table info available.

Doesn't seem that useful for debugging.  What am I missing using gdb?

Jim






_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: uac_auth() segfault

Jayesh Nambiar
Hi,
This is how I do it on 1.11 dev version and it works absolutely as expected:

modparam("uac_auth","credential","username:domain:password")
modparam("uac_auth","auth_realm_avp","$avp(domain)")
modparam("uac_auth","auth_username_avp","$avp(username)")
modparam("uac_auth","auth_password_avp","$avp(password)")

route[uac_auth] {
                $avp(username) = "abc";
                $avp(password) = "12344556";
                $avp(domain) = "abc.com";

uac_replace_from("sip:$avp(username)@$avp(domain)");
                $rd = $avp(siptrunk_domain);
                $avp(outbound_proxy) = "1.2.3.4" # ---This is the destination IP---

                $var(duri) = "sip:"+$rU+"@"+$avp(outbound_proxy);
$du = $var(duri);

                t_on_failure("UAC_AUTH_FAIL");
if(!t_relay()) {
sl_reply_error();
exit;
}
exit;
}

failure_route[UAC_AUTH_FAIL] {
              if (t_check_status("40[17]")) {
xlog("got challenged \n");

uac_auth();
xlog("L_INFO", "Return code is $retcode");
$rd = $avp(outbound_proxy);
t_relay();
exit;
}
}


On Fri, Feb 21, 2014 at 4:28 AM, James Palic <[hidden email]> wrote:
Bogdan-Andrei Iancu <bogdan@...> writes:

>
>
>     Hello,
>         Do you have still have the corefile ? Are you able to extract a
>         backtrace from it . See:
>                
>         http://www.opensips.org/Documentation/TroubleShooting-Crash
>         Regards,
>       Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>       On 21.01.2014 15:35, Justin Zondagh wrote:
>
>
>
>
>           Hi All,
>
>             I'm running a compiled version of openSIPS 1.10 on
>               Ubuntu 12.04.
>
>             I'm getting a segfault in the uac_auth() function and
>               not too sure why. I am setting the username, password and
>               realm avps before I call it.
>
>             The 401 comes in back from the UAS and then hits the
>               failure_route[1], does some stuff and then crashes in what
>               seems like uac_auth()...
>
>
>             ==== Back trace =====
>
>             available upon request
>
>
>
>             Any ideas?
>
>             Regards,
>
>
>
>
>                   Justin Zondaghzondagh-
[hidden email]
>                   Cape Town | South Africa
>
>                     skype: jrzondagh
>                   m: +27 72 598
>                       4887 | f: +27 86 546
>                       1405
>
>                   uk: +44 20 328
>                       99610
>       _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

Hi Bogdan,

I'm am also experiencing a segfault with uac_auth() in OpenSIPS 1.10
(running on Debian). Following the Troubleshooting directions, bt full
shows:

#0 0x0000000000000000 in ?? ()
No symbol table info available.
#1 0x00007fa4987ee370 in ?? ()
No symbol table info available.
#2 0x00007fa4987ee370 in ?? ()
No symbol table info available.
#3 0x0000000000479383 in ?? ()
No symbol table info available.
#3 0x0000000000000000 in ?? ()
No symbol table info available.

Doesn't seem that useful for debugging.  What am I missing using gdb?

Jim






_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: uac_auth() segfault

Bogdan-Andrei Iancu-2
Hello,

In failure_route, when doing uac_auth() you should check the return code of the function - only if the functions successfully located the credentials and added the auth headers, only then you should relay out a new branch. Otherwise you should simply reply with error (if uac_auth() was not able to authenticate).

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 21.02.2014 10:04, Jayesh Nambiar wrote:
Hi,
This is how I do it on 1.11 dev version and it works absolutely as expected:

modparam("uac_auth","credential","username:domain:password")
modparam("uac_auth","auth_realm_avp","$avp(domain)")
modparam("uac_auth","auth_username_avp","$avp(username)")
modparam("uac_auth","auth_password_avp","$avp(password)")

route[uac_auth] {
                $avp(username) = "abc";
                $avp(password) = "12344556";
                $avp(domain) = "abc.com";

uac_replace_from("sip:$avp(username)@$avp(domain)");
                $rd = $avp(siptrunk_domain);
                $avp(outbound_proxy) = "1.2.3.4" # ---This is the destination IP---

                $var(duri) = "sip:"+$rU+"@"+$avp(outbound_proxy);
$du = $var(duri);

                t_on_failure("UAC_AUTH_FAIL");
if(!t_relay()) {
sl_reply_error();
exit;
}
exit;
}

failure_route[UAC_AUTH_FAIL] {
              if (t_check_status("40[17]")) {
xlog("got challenged \n");

uac_auth();
xlog("L_INFO", "Return code is $retcode");
$rd = $avp(outbound_proxy);
t_relay();
exit;
}
}


On Fri, Feb 21, 2014 at 4:28 AM, James Palic <[hidden email]> wrote:
Bogdan-Andrei Iancu [hidden email] writes:

>
>
>     Hello,
>         Do you have still have the corefile ? Are you able to extract a
>         backtrace from it . See:
>                
>         http://www.opensips.org/Documentation/TroubleShooting-Crash
>         Regards,
>       Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>       On 21.01.2014 15:35, Justin Zondagh wrote:
>
>
>
>
>           Hi All,
>
>             I'm running a compiled version of openSIPS 1.10 on
>               Ubuntu 12.04.
>
>             I'm getting a segfault in the uac_auth() function and
>               not too sure why. I am setting the username, password and
>               realm avps before I call it.
>
>             The 401 comes in back from the UAS and then hits the
>               failure_route[1], does some stuff and then crashes in what
>               seems like uac_auth()...
>
>
>             ==== Back trace =====
>
>             available upon request
>
>
>
>             Any ideas?
>
>             Regards,
>
>
>
>
>                   Justin Zondaghzondagh-
[hidden email]
>                   Cape Town | South Africa
>
>                     skype: jrzondagh
>                   m: +27 72 598
>                       4887 | f: +27 86 546
>                       1405
>
>                   uk: +44 20 328
>                       99610
>       _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

Hi Bogdan,

I'm am also experiencing a segfault with uac_auth() in OpenSIPS 1.10
(running on Debian). Following the Troubleshooting directions, bt full
shows:

#0 0x0000000000000000 in ?? ()
No symbol table info available.
#1 0x00007fa4987ee370 in ?? ()
No symbol table info available.
#2 0x00007fa4987ee370 in ?? ()
No symbol table info available.
#3 0x0000000000479383 in ?? ()
No symbol table info available.
#3 0x0000000000000000 in ?? ()
No symbol table info available.

Doesn't seem that useful for debugging.  What am I missing using gdb?

Jim






_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: uac_auth() segfault

Bogdan-Andrei Iancu-2
In reply to this post by James Palic-2
Hello,

The bt looks completely corrupted -  try to see if you have a single
core dump in OpenSIPS (check for how many times the core dumping was
reported in OpenSIPS logs).
Also see what gdb has to report when loading the core file...maybe
something useful to see why the BT is not valid.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 21.02.2014 00:58, James Palic wrote:

> Bogdan-Andrei Iancu <bogdan@...> writes:
>
>>
>>      Hello,
>>          Do you have still have the corefile ? Are you able to extract a
>>          backtrace from it . See:
>>                
>>          http://www.opensips.org/Documentation/TroubleShooting-Crash
>>          Regards,
>>        Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>        On 21.01.2014 15:35, Justin Zondagh wrote:
>>
>>      
>>        
>>          
>>            Hi All,
>>              
>>              I'm running a compiled version of openSIPS 1.10 on
>>                Ubuntu 12.04.
>>              
>>              I'm getting a segfault in the uac_auth() function and
>>                not too sure why. I am setting the username, password and
>>                realm avps before I call it.
>>              
>>              The 401 comes in back from the UAS and then hits the
>>                failure_route[1], does some stuff and then crashes in what
>>                seems like uac_auth()...
>>              
>>              
>>              ==== Back trace =====
>>              
>>              available upon request
>>              
>>              
>>              
>>              Any ideas?
>>              
>>              Regards,
>>              
>>                
>>                  
>>                    
>>                    Justin Zondaghzondagh-
> [hidden email]
>>                    Cape Town | South Africa
>>                    
>>                      skype: jrzondagh
>>                    m: +27 72 598
>>                        4887 | f: +27 86 546
>>                        1405
>>
>>                    uk: +44 20 328
>>                        99610
>>        _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> Hi Bogdan,
>
> I'm am also experiencing a segfault with uac_auth() in OpenSIPS 1.10
> (running on Debian). Following the Troubleshooting directions, bt full
> shows:
>
> #0 0x0000000000000000 in ?? ()
> No symbol table info available.
> #1 0x00007fa4987ee370 in ?? ()
> No symbol table info available.
> #2 0x00007fa4987ee370 in ?? ()
> No symbol table info available.
> #3 0x0000000000479383 in ?? ()
> No symbol table info available.
> #3 0x0000000000000000 in ?? ()
> No symbol table info available.
>
> Doesn't seem that useful for debugging.  What am I missing using gdb?
>
> Jim
>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: uac_auth() segfault

jrzondagh
In reply to this post by Bogdan-Andrei Iancu-2
Hi Bogdan,

Bt below:

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/src/opensips_1_10/opensips -w /tmp/'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000 in ?? ()
(gdb) bt full
#0  0x00000000 in ?? ()
No symbol table info available.
#1  0xb6e8770f in uac_auth (msg=0xb6fced80) at auth.c:156
        auth = <optimized out>
        auth_nc_cnonce = {nc = 0x0, cnonce = 0x0}
        crd = <optimized out>
        code = 401
        branch = 0
        rpl = <optimized out>
        t = 0xb5003910
        response = "\000\060Y\034\b\000\000\000\000\377\377\377\377\001\001\001\001P\215q\267\000\001\001\001\001\001\001\001\206\377\377\377"
        new_hdr = <optimized out>
        __FUNCTION__ = "uac_auth"
#2  0xb6e8d6ad in w_uac_auth (msg=0xb6fced80, str=0x0, str2=0x0) at uac.c:451
No locals.
#3  0x0805d531 in do_action (a=0xb73c3c1c, msg=0xb6fced80) at action.c:1715
        val_s = {s = 0xa1f650d "2", len = 169829645}
        aux_counter = <optimized out>
        i = <optimized out>
        j = <optimized out>
        key_number = <optimized out>
        adv_addr = {s = 0x0, len = 0}
        increment = <optimized out>
        decrement = <optimized out>
        avp_type = <optimized out>
        aux = {s = 0xa1f650d "2", len = 169829645}
        cdb_reply = <optimized out>
        val_number = <optimized out>
        it = <optimized out>
        avp_name = {n = 169829646, s = {s = 0xa1f650e "", len = 0}}
        ret = -5
        v = <optimized out>
        sec = <optimized out>
        usec = <optimized out>
        to = <optimized out>
        p = <optimized out>
        tmp = <optimized out>
        new_uri = <optimized out>
        end = <optimized out>
        crt = <optimized out>
        len = <optimized out>
        i = <optimized out>
        user = 0
        expires = 0
        vals = {{s = 0x0, len = 0}, {s = 0xb7601ff1 "\201\303\003\220\025", len = -1217024012}, {s = 0xbfde8640 "\001\200\255\373\016e\037\n\016e\037\n\re\037\n\re\037\n\re\037\n\re\037\n\re\037\n\016e\037\n",
            len = -1217016928}, {s = 0xbfde8798 "\021\t", len = -1218325731}, {s = 0xbfde8640 "\001\200\255\373\016e\037\n\016e\037\n\re\037\n\re\037\n\re\037\n\re\037\n\re\037\n\016e\037\n", len = -1217297506}}
        result = {s = 0x64 <Address 0x64 out of bounds>, len = 16384}
        uri = {user = {s = 0xbfde8640 "\001\200\255\373\016e\037\n\016e\037\n\re\037\n\re\037\n\re\037\n\re\037\n\re\037\n\016e\037\n", len = -1217024012}, passwd = {
            s = 0xbfde8420 "\001\200\255\373\016e\037\n\016e\037\n", len = -1217016928}, host = {s = 0xbfde8578 "\021\t", len = -1218325731}, port = {s = 0xbfde8420 "\001\200\255\373\016e\037\n\016e\037\n",
            len = -1217297547}, params = {s = 0x1 <Address 0x1 out of bounds>, len = 0}, headers = {s = 0x0, len = -1217028928}, port_no = 0, proto = 0, type = SIP_URI_T, transport = {
            s = 0xfbad8001 <Address 0xfbad8001 out of bounds>, len = 169829646}, ttl = {s = 0xa1f650e "", len = 0}, user_param = {s = 0xb7718b6a ".", len = 0}, maddr = {s = 0x5 <Address 0x5 out of bounds>, len = 0},
          method = {s = 0xbfde8720 "|\207\336\277p\207\336\277~\207\336\277p\207\336\277SAST", len = 0}, lr = {s = 0x0, len = -1075936288}, r2 = {s = 0x1 <Address 0x1 out of bounds>, len = 0}, gr = {
            s = 0xb775b8c0 "\300\234u\267\300\241u\267@\236u\267\340\243u\267\340\240u\267\240\240u\267", len = -1217297500}, transport_val = {s = 0x0, len = 0}, ttl_val = {
            s = 0xb75b46c0 "\300F[\267\210K[\267\300F[\267\001", len = 0}, user_param_val = {s = 0x0, len = 0}, maddr_val = {s = 0x100 <Address 0x100 out of bounds>, len = -1075936544}, method_val = {
            s = 0xffffffff <Address 0xffffffff out of bounds>, len = -1217297502}, lr_val = {s = 0x1 <Address 0x1 out of bounds>, len = -1}, r2_val = {s = 0xa22b0c8 "\005", len = 7}, gr_val = {s = 0xb73d9bf0 "\030",
            len = 135441932}, u_name = {{s = 0x0, len = 8}, {s = 0x2 <Address 0x2 out of bounds>, len = 2}, {s = 0x1ff4 <Address 0x1ff4 out of bounds>, len = 0}, {s = 0x0, len = 0}, {
              s = 0xc <Address 0xc out of bounds>, len = -1217028544}}, u_val = {{s = 0xa1f6360 "SAST", len = -1218057258}, {s = 0xa1f6360 "SAST", len = -1217297506}, {
              s = 0xbfde84f8 "Z\205\336\277P\205\336\277\\\205\336\277P\205\336\277^\205\336\277P\205\336\277SAST", len = -1218267671}, {s = 0xb775aff4 "|]\032", len = 169829646}, {s = 0xb775cba0 "\025\377\001",
              len = -1218056603}}, u_params_no = 2}
---Type <return> to continue, or q <return> to quit---
        next_hop = {user = {s = 0xb771839e "%hu%n:%hu%n:%hu%n", len = -1075935910}, passwd = {s = 0xbfde8550 "\001", len = -1075935908}, host = {s = 0xbfde8550 "\001", len = -1075935906}, port = {s = 0xbfde8550 "\001",
            len = 1414742355}, params = {s = 0xb7003200 "\377\377\307\204$\304", len = -1217022912}, headers = {s = 0x3432c22f <Address 0x3432c22f out of bounds>, len = 44}, port_no = 1, proto = 0, type = ERROR_URI_T,
          transport = {s = 0xb775aff4 "|]\032", len = -1217295029}, ttl = {
            s = 0xa22f6fc "12:52:24 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_authenticate_body: <nonce>=\"0a88ebc4eb91e7a1e2910f35e76191b6c66f\" state=3\n", len = -1217303794}, user_param = {
            s = 0xb775aff4 "|]\032", len = 170063592}, maddr = {s = 0xb775b440 "", len = 0}, method = {s = 0xb762d93c "\215n\b\211\350\213\\$<\213t$@\213|$D\213l$H\203\304L\303\215v", len = 1}, lr = {
            s = 0xb765d825 "\201\303\317\327\017", len = -1217024012}, r2 = {s = 0xb76278d0 "\201\303$7\023", len = 842200828}, gr = {s = 0x10 <Address 0x10 out of bounds>, len = 8}, transport_val = {
            s = 0x2008 <Address 0x2008 out of bounds>, len = 959658289}, ttl_val = {s = 0xb7716b0e "%H:%M:%S", len = 2321}, user_param_val = {s = 0x910 <Address 0x910 out of bounds>, len = 12}, maddr_val = {
            s = 0xb7759e40 "\335\203q\267", len = 169829216}, method_val = {s = 0xb762b5e9 "\201\303\v\372\022", len = 170063224}, lr_val = {s = 0xbfde86c8 "\002", len = -1218754880}, r2_val = {
            s = 0xb76289d3 "\203\304\024[^\303\215\264&", len = 170063224}, gr_val = {s = 0x70 <Address 0x70 out of bounds>, len = 0}, u_name = {{s = 0x1 <Address 0x1 out of bounds>, len = 0}, {
              s = 0xb760b5f0 "\213D$\004\213PH\213B\004\203\350\001\205\300\211B\004u\027\307B\b", len = -1075935680}, {s = 0x0, len = 0}, {s = 0x0, len = -1217022912}, {s = 0xb775aff4 "|]\032", len = 170063224}},
          u_val = {{s = 0x0, len = 0}, {s = 0xb762993e "\205\355\213D$\034\211~\020\211~\f\211~\004t9\211n\024\211F\030\211n\b\307\206\230", len = -1075935680}, {s = 0xa1f650d "2", len = 169829646}, {s = 0x0,
              len = -1075935680}, {s = 0x8000 <Address 0x8000 out of bounds>, len = -1217022912}}, u_params_no = 33505}
        u = <optimized out>
        port = <optimized out>
        cmatch = <optimized out>
        aitem = <optimized out>
        adefault = <optimized out>
        spec = <optimized out>
        model = <optimized out>
        val = {rs = {s = 0xbfde8718 "z\207\336\277p\207\336\277|\207\336\277p\207\336\277~\207\336\277p\207\336\277SAST", len = 0}, ri = 0, flags = 170063600}
        pve = <optimized out>
        name_s = {s = 0xfbad8001 <Address 0xfbad8001 out of bounds>, len = 169829646}
        start = {tv_sec = 169829646, tv_usec = 169829645}
        route_params_bak = <optimized out>
        route_params_number_bak = <optimized out>
        __FUNCTION__ = "do_action"
#4  0x08062db4 in run_action_list (a=0xb73c3c1c, msg=0xb6fced80) at action.c:171
        ret = <optimized out>
        t = 0xb73c3c1c
#5  0x080c7b30 in eval_elem (e=0xb73c3c88, msg=0xb6fced80, val=0x0) at route.c:1499
        uri = {user = {s = 0x3122b24c <Address 0x3122b24c out of bounds>, len = 1}, passwd = {s = 0x0, len = -1217024012}, host = {s = 0xb7718d4b "T ", len = 170063612}, port = {s = 0xb7716b0e "%H:%M:%S",
            len = -1217024012}, params = {s = 0xa22f6e8 "x\001", len = -1217022912}, headers = {s = 0x0, len = -1218258628}, port_no = 1, proto = 0, type = 3076904997, transport = {s = 0xb775aff4 "|]\032",
            len = -1218283312}, ttl = {s = 0xa22f6fc "12:52:24 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_authenticate_body: <nonce>=\"0a88ebc4eb91e7a1e2910f35e76191b6c66f\" state=3\n", len = 16},
          user_param = {s = 0x8 <Address 0x8 out of bounds>, len = 8200}, maddr = {s = 0x39333931 <Address 0x39333931 out of bounds>, len = -1217303794}, method = {s = 0x911 <Address 0x911 out of bounds>, len = 2320},
          lr = {s = 0xc <Address 0xc out of bounds>, len = -1217028544}, r2 = {s = 0xa1f6360 "SAST", len = -1218267671}, gr = {
            s = 0xa22f578 "p\264u\267p\264u\267\360\366\"\n\360\366\"\n\360\366\"\n\205\367\"\n\360\026#\n", len = -1075935000}, transport_val = {s = 0xb75b46c0 "\300F[\267\210K[\267\300F[\267\001", len = -1218278957},
          ttl_val = {s = 0xa22f578 "p\264u\267p\264u\267\360\366\"\n\360\366\"\n\360\366\"\n\205\367\"\n\360\026#\n", len = 192}, user_param_val = {s = 0x0, len = 1}, maddr_val = {s = 0x0, len = -1217024012},
          method_val = {s = 0xa22f578 "p\264u\267p\264u\267\360\366\"\n\360\366\"\n\360\366\"\n\205\367\"\n\360\026#\n", len = -1218267671}, lr_val = {
            s = 0xa22f578 "p\264u\267p\264u\267\360\366\"\n\360\366\"\n\360\366\"\n\205\367\"\n\360\026#\n", len = 0}, r2_val = {s = 0xb775b440 "", len = -1217024012}, gr_val = {
            s = 0xa22f578 "p\264u\267p\264u\267\360\366\"\n\360\366\"\n\360\366\"\n\205\367\"\n\360\026#\n", len = 0}, u_name = {{s = 0x1 <Address 0x1 out of bounds>, len = -1218319912}, {
              s = 0xa22f578 "p\264u\267p\264u\267\360\366\"\n\360\366\"\n\360\366\"\n\205\367\"\n\360\026#\n", len = 0}, {s = 0xb75f7ac1 "\201\303\063\065\026", len = -1217024012}, {
              s = 0xa22f578 "p\264u\267p\264u\267\360\366\"\n\360\366\"\n\360\366\"\n\205\367\"\n\360\026#\n", len = 0}, {s = 0xb775b440 "", len = -1218337756}}, u_val = {{s = 0x0, len = 0}, {
              s = 0x1 <Address 0x1 out of bounds>, len = -1218437441}, {s = 0xa22f578 "p\264u\267p\264u\267\360\366\"\n\360\366\"\n\360\366\"\n\205\367\"\n\360\026#\n", len = -1217714071}, {
              s = 0xb6 <Address 0xb6 out of bounds>, len = -1217024012}, {
              s = 0xa22f6f0 "<135>Jan 17 12:52:24 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_authenticate_body: <nonce>=\"0a88ebc4eb91e7a1e2910f35e76191b6c66f\" state=3\n", len = 21}}, u_params_no = 18112}
        ret = -5
        ival = <optimized out>
        lval = {rs = {s = 0xb76a07e0 "\201\304\254", len = 0}, ri = 170063600, flags = 182}
        rval = {rs = {s = 0x4000 <Address 0x4000 out of bounds>, len = -1217028064}, ri = -1220774960, flags = -1075934980}
        p = <optimized out>
        i = <optimized out>
        n = <optimized out>
        __FUNCTION__ = "eval_elem"
#6  0x080c7499 in eval_expr (e=0xb73c3c88, msg=0xb6fced80, val=0x0) at route.c:1844
        rec_lev = 2
        ret = <optimized out>
        __FUNCTION__ = "eval_expr"
#7  0x080c7485 in eval_expr (e=0xb73c3cb4, msg=0xb6fced80, val=0x0) at route.c:1865
        rec_lev = 2
---Type <return> to continue, or q <return> to quit---
        ret = <optimized out>
        __FUNCTION__ = "eval_expr"
#8  0x0805d422 in do_action (a=0xb73c4264, msg=0xb6fced80) at action.c:993
        val_s = {s = 0xc <Address 0xc out of bounds>, len = -1217028544}
        aux_counter = <optimized out>
        i = <optimized out>
        j = <optimized out>
        key_number = <optimized out>
        adv_addr = {s = 0xb75b46c0 "\300F[\267\210K[\267\300F[\267\001", len = -1218278957}
        increment = <optimized out>
        decrement = <optimized out>
        avp_type = <optimized out>
        aux = {s = 0xa1f6360 "SAST", len = -1218267671}
        cdb_reply = <optimized out>
        val_number = <optimized out>
        it = <optimized out>
        avp_name = {n = 170033360, s = {s = 0xa2280d0 "", len = -1075933832}}
        ret = -5
        v = <optimized out>
        sec = <optimized out>
        usec = <optimized out>
        to = <optimized out>
        p = <optimized out>
        tmp = <optimized out>
        new_uri = <optimized out>
        end = <optimized out>
        crt = <optimized out>
        len = <optimized out>
        i = <optimized out>
        user = 0
        expires = 0
        vals = {{s = 0xb7718d4b "T ", len = 170033748}, {s = 0xb7716b0e "%H:%M:%S", len = -1217024012}, {s = 0xa228240 "", len = -1217022912}, {s = 0x0, len = -1218258628}, {s = 0x1 <Address 0x1 out of bounds>,
            len = -1218062299}}
        result = {s = 0x8 <Address 0x8 out of bounds>, len = -1220798220}
        uri = {user = {s = 0x1c <Address 0x1c out of bounds>, len = 0}, passwd = {s = 0xb7718b6a ".", len = -1218398736}, host = {s = 0xbfde8a60 "\001\200\255\373", len = 0}, port = {s = 0x0, len = 7707840}, params = {
            s = 0x0, len = -1075934848}, headers = {s = 0x1 <Address 0x1 out of bounds>, len = 0}, port_no = 0, proto = 0, type = 3076692286, transport = {s = 0xbfde8a60 "\001\200\255\373", len = 169829645}, ttl = {
            s = 0xa1f650e "", len = -1220798328}, user_param = {s = 0xb6fced80 "\002", len = -1224938112}, maddr = {s = 0x0, len = 134622644}, method = {s = 0xb73c1888 "\017", len = -1224938112}, lr = {
            s = 0xb7601ff1 "\201\303\003\220\025", len = -1217024012}, r2 = {s = 0xbfde8a60 "\001\200\255\373", len = -1217016928}, gr = {s = 0xbfde8bb8 "\016\214\336\277", len = -1218325731}, transport_val = {
            s = 0xbfde8a60 "\001\200\255\373", len = -1218398736}, ttl_val = {s = 0xbfde8ad0 "\001\200\255\373\016e\037\n\016e\037\n\re\037\n\re\037\n\re\037\n\re\037\n\re\037\n\016e\037\n", len = 0}, user_param_val = {
            s = 0x0, len = -1217297502}, maddr_val = {s = 0x1 <Address 0x1 out of bounds>, len = -1}, method_val = {s = 0xfbad8001 <Address 0xfbad8001 out of bounds>, len = 0}, lr_val = {s = 0x0, len = -1220798220},
          r2_val = {s = 0xb6fced80 "\002", len = 13}, gr_val = {s = 0x0, len = 135035696}, u_name = {{s = 0xb73c1888 "\017", len = -1224938112}, {s = 0x0, len = -1075935375}, {s = 0x0, len = 0}, {
              s = 0xb7601ff1 "\201\303\003\220\025", len = -1217024012}, {s = 0xbfde8ad0 "\001\200\255\373\016e\037\n\016e\037\n\re\037\n\re\037\n\re\037\n\re\037\n\re\037\n\016e\037\n", len = -1217016928}}, u_val = {{
              s = 0xbfde8c28 "\002", len = -1218325731}, {s = 0xbfde8ad0 "\001\200\255\373\016e\037\n\016e\037\n\re\037\n\re\037\n\re\037\n\re\037\n\re\037\n\016e\037\n", len = -1217297506}, {
              s = 0xbfde8ba8 "\n\214\336\277", len = 0}, {s = 0x0, len = -1075934370}, {s = 0x2 <Address 0x2 out of bounds>, len = 169865584}}, u_params_no = 32769}
        next_hop = {user = {s = 0xa1f650e "", len = 169829646}, passwd = {s = 0xa1f650d "2", len = 169829645}, host = {s = 0xa1f650d "2", len = 169829645}, port = {s = 0xa1f650d "2", len = 169829646}, params = {
            s = 0x0, len = 0}, headers = {s = 0x0, len = 0}, port_no = 0, proto = 0, type = 3076530161, transport = {s = 0x0, len = -1075934400}, ttl = {s = 0xb7000000 "\034\276\002", len = 0}, user_param = {
            s = 0xb761d31d "\201\304\304", len = -1075934400}, maddr = {s = 0xb771839e "%hu%n:%hu%n:%hu%n", len = -1075934184}, method = {s = 0xb7665f54 "\351\343\355\377\377\215\264&", len = 170033754}, lr = {
            s = 0xbfde8bce "24\364\037", len = 2}, r2 = {s = 0xbfde8b90 "\364\257u\267\016e\037\n\240\313u\267e\356e\267\002", len = -72515583}, gr = {s = 0xa1f650e "", len = 169829646}, transport_val = {
            s = 0xa1f650d "2", len = 169829645}, ttl_val = {s = 0x8 <Address 0x8 out of bounds>, len = 2}, user_param_val = {s = 0x2 <Address 0x2 out of bounds>, len = 8180}, maddr_val = {s = 0x0, len = 0},
          method_val = {s = 0x0, len = 12}, lr_val = {s = 0xb7759e40 "\335\203q\267", len = 169829216}, r2_val = {s = 0xb765ebd6 "\213\223\030\070", len = 169829216}, gr_val = {s = 0xb771839e "%hu%n:%hu%n:%hu%n",
            len = -1075934296}, u_name = {{s = 0xb762b5e9 "\201\303\v\372\022", len = -1217024012}, {s = 0xa1f650e "", len = -1217016928}, {s = 0xb765ee65 "\215e\364[^_]\303\215v", len = 2}, {
              s = 0xb771839e "%hu%n:%hu%n:%hu%n", len = -1075934198}, {s = 0xbfde8c00 "\001", len = -1075934196}}, u_val = {{s = 0xbfde8c00 "\001", len = -1075934194}, {s = 0xbfde8c00 "\001", len = 1414742355}, {
              s = 0x3200 <Address 0x3200 out of bounds>, len = -1217022912}, {s = 0x3432c0b1 <Address 0x3432c0b1 out of bounds>, len = 8180}, {s = 0x1 <Address 0x1 out of bounds>, len = 0}}, u_params_no = 45044}
        u = <optimized out>
        port = <optimized out>
        cmatch = <optimized out>
        aitem = <optimized out>
        adefault = <optimized out>
        spec = <optimized out>
---Type <return> to continue, or q <return> to quit---
        model = <optimized out>
        val = {rs = {s = 0xb775aff4 "|]\032", len = -1218283312}, ri = 824345172, flags = 16}
        pve = <optimized out>
        name_s = {s = 0xb6fced80 "\002", len = 2}
        start = {tv_sec = 2, tv_usec = 135034009}
        route_params_bak = <optimized out>
        route_params_number_bak = <optimized out>
        __FUNCTION__ = "do_action"
#9  0x08062db4 in run_action_list (a=0xb73c1a64, msg=0xb6fced80) at action.c:171
        ret = <optimized out>
        t = 0xb73c4264
#10 0x08060b1d in do_action (a=0xb73c42d0, msg=0xb6fced80) at action.c:1010
        val_s = {s = 0x0, len = 114}
        aux_counter = <optimized out>
        i = <optimized out>
        j = <optimized out>
        key_number = <optimized out>
        adv_addr = {s = 0xa1f6360 "SAST", len = -1218437441}
        increment = <optimized out>
        decrement = <optimized out>
        avp_type = <optimized out>
        aux = {s = 0x5 <Address 0x5 out of bounds>, len = 16}
        cdb_reply = <optimized out>
        val_number = <optimized out>
        it = <optimized out>
        avp_name = {n = 0, s = {s = 0x0, len = 7200}}
        ret = 1
        v = 1
        sec = <optimized out>
        usec = <optimized out>
        to = <optimized out>
        p = <optimized out>
        tmp = <optimized out>
        new_uri = <optimized out>
        end = <optimized out>
        crt = <optimized out>
        len = <optimized out>
        i = <optimized out>
        user = 0
        expires = 0
        vals = {{s = 0xa21c1a0 "", len = 136248452}, {s = 0xb75b46c0 "\300F[\267\210K[\267\300F[\267\001", len = -1225868384}, {s = 0x0, len = 169984416}, {s = 0x89 <Address 0x89 out of bounds>, len = 16384}, {
            s = 0xb775a020 "\300\234u\267\300\241u\267@\236u\267\340\243u\267\340\240u\267\240\240u\267", len = 0}}
        result = {s = 0xb6fced80 "\002", len = -1225978340}
        uri = {user = {s = 0xa1f6360 "SAST", len = -1217024012}, passwd = {s = 0xa228248 "", len = 21}, host = {s = 0xb75b46c0 "\300F[\267\210K[\267\300F[\267\001", len = -1217787936}, port = {s = 0x0,
            len = -1260175360}, params = {s = 0xd8 <Address 0xd8 out of bounds>, len = 135441257}, headers = {s = 0xb775a020 "\300\234u\267\300\241u\267@\236u\267\340\243u\267\340\240u\267\240\240u\267",
            len = -1220701256}, port_no = 0, proto = 0, type = 170033736, transport = {s = 0x0, len = 1389955944}, ttl = {s = 0xa228248 "", len = 123}, user_param = {s = 0x18 <Address 0x18 out of bounds>, len = 52},
          maddr = {s = 0xb76a0520 "\201\303\324\252\v", len = 1}, method = {s = 0xb5005dcc "missed_calls\364]", len = 12}, lr = {s = 0xb5005d60 "\354_", len = -1217787177}, r2 = {s = 0x87 <Address 0x87 out of bounds>,
            len = 1}, gr = {s = 0x81c5054 "DBG:core:%s: query for table [%.*s] has %d rows\n", len = -1075933748}, transport_val = {s = 0x0, len = 0}, ttl_val = {
            s = 0xb765e676 "\207\313\205\322t\002\211\002\363\303\211\332\213L$\b\213\\$\004\270N", len = 135754948}, user_param_val = {s = 0x87 <Address 0x87 out of bounds>, len = 1}, maddr_val = {
            s = 0x81c5054 "DBG:core:%s: query for table [%.*s] has %d rows\n", len = 136074403}, method_val = {s = 0xc <Address 0xc out of bounds>, len = -1258267188}, lr_val = {s = 0x1 <Address 0x1 out of bounds>,
            len = 170033736}, r2_val = {s = 0x0, len = 1389955944}, gr_val = {s = 0xa228248 "", len = 166}, u_name = {{
              s = 0xb5005ccc "To: 111 <sip:111@192.168.56.5>\r\nCSeq: 1 ACK\r\nMax-Forwards: 70\r\nUser-Agent: OpenSIPS (1.10.0-notls (i386/linux))\r\nContent-Length: 0\r\n\r\n", len = -1258267444}, {
              s = 0xc <Address 0xc out of bounds>, len = -1258267656}, {s = 0xb73cc094 "\224o=\267\230o=\267", len = 136248444}, {s = 0xb739eb4f "db_mysql_do_prepared_query", len = -1217787177}, {
              s = 0x87 <Address 0x87 out of bounds>, len = 1}}, u_val = {{s = 0xb739e3d8 "DBG:db_mysql:%s: new statement(%p) on connection: (%p) %p\n", len = -1220927500}, {s = 0xb73cc094 "\224o=\267\230o=\267",
              len = -1075933512}, {s = 0xb73ca2d8 "\230\334\357\266", len = -1220988251}, {s = 0xb5005d60 "\354_", len = -1225802368}, {s = 0xbfde8eb8 "", len = -1220940977}}, u_params_no = 49268}
        next_hop = {user = {s = 0xb73ca2d8 "\230\334\357\266", len = -1220773968}, passwd = {s = 0xb73ca2d8 "\230\334\357\266", len = 99}, host = {s = 0x68a <Address 0x68a out of bounds>, len = -1221000587}, port = {
            s = 0x817a26f "\205\300\017\211\031\376\377\377\213\035\204\374\036\b\203;\377\017\214\221\002", len = -1220762920}, params = {s = 0x82444a0 "\240D#\b\230\006", len = 63862}, headers = {
            s = 0xb6efbd80 "\004", len = 7}, port_no = 48512, proto = 46831, type = 3069018650, transport = {s = 0x2bc <Address 0x2bc out of bounds>, len = 0}, ttl = {s = 0xb73ca2d8 "\230\334\357\266",
            len = -1220704908}, user_param = {s = 0xb73d9390 "\210\307\037\n\254\223=\267\f", len = -1220755340}, maddr = {s = 0x8234474 "d", len = 700}, method = {s = 0x63 <Address 0x63 out of bounds>,
---Type <return> to continue, or q <return> to quit---
            len = -1225802368}, lr = {s = 0xb73ca2d8 "\230\334\357\266", len = -1225802752}, r2 = {s = 0xb76a0ad7 "\203\304\034\303\220\215t&", len = 135}, gr = {s = 0x1 <Address 0x1 out of bounds>, len = 0},
          transport_val = {s = 0xb6efdba0 "`]", len = 0}, ttl_val = {s = 0xb73ca2d8 "\230\334\357\266", len = -1225802752}, user_param_val = {s = 0xb73a1ff4 "\274>\001", len = -1220762920}, maddr_val = {
            s = 0x7 <Address 0x7 out of bounds>, len = -1225802368}, method_val = {s = 0xb7399546 "\307F\004", len = 7}, lr_val = {s = 0x0, len = 0}, r2_val = {s = 0x7 <Address 0x7 out of bounds>, len = -1220949262},
          gr_val = {s = 0xb7390270 "\350", len = -1225794432}, u_name = {{s = 0xb7399d6a "\203\304\030[\303\220UWVS\203\354L\350", len = -1220762920}, {s = 0xb6efdc98 "\032\202\355\266\f", len = -1225954504}, {
              s = 0xb6edaff4 "\020\336\001", len = -1225802752}, {s = 0xb6efdbe8 "", len = -1225802816}, {s = 0xb6ec316e "\205\300yv\213\273(\377\377\377\213\a\203\070\377\017\214\355", len = -1220762920}}, u_val = {{
              s = 0xb6efbc00 "\240\262\355\266\230\262\355\266\220\262\355\266\210\262\355\266\200\262\355\266x\262\355\266p\262\355\266", len = -1225802368}, {s = 0x7 <Address 0x7 out of bounds>, len = 7}, {
              s = 0xb6efbb9e "", len = 1}, {s = 0xb7601ebf "\203\304\034\303\220\220\220\220\220\220\220\220\220\220\220\220\220S\203\354\030\350z\356\r", len = 169854856}, {s = 0x6 <Address 0x6 out of bounds>,
              len = 7}}, u_params_no = 45044}
        u = <optimized out>
        port = <optimized out>
        cmatch = <optimized out>
        aitem = <optimized out>
        adefault = <optimized out>
        spec = <optimized out>
        model = <optimized out>
        val = {rs = {s = 0xb775b440 "", len = -1225936908}, ri = 4, flags = -1225936424}
        pve = <optimized out>
        name_s = {s = 0xb6fced80 "\002", len = -1220761836}
        start = {tv_sec = -1225794656, tv_usec = 17}
        route_params_bak = <optimized out>
        route_params_number_bak = <optimized out>
        __FUNCTION__ = "do_action"
#11 0x08062db4 in run_action_list (a=0xb73c42d0, msg=0xb6fced80) at action.c:171
        ret = <optimized out>
        t = 0xb73c42d0
#12 0x0806336e in run_actions (msg=0xb6fced80, a=0xb73c42d0) at action.c:136
No locals.
#13 run_actions (msg=0xb6fced80, a=0xb73c42d0) at action.c:190
No locals.
#14 run_top_route (a=0xb73c42d0, msg=0xb6fced80) at action.c:211
        bl_last_msg_id = 2
        bk_action_flags = 0
        bk_rec_lev = 0
#15 0xb6f9dcde in run_failure_handlers (t=0xb5003910) at t_reply.c:657
        uac = <optimized out>
        on_failure = <optimized out>
        shmem_msg = 0xb5004910
        faked_req = {id = 2, first_line = {type = 1, len = 51, u = {request = {method = {
                  s = 0xb5004d38 "INVITE sip:111@192.168.56.5;transport=udp SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.56.1:27912;branch=z9hG4bK-d8754z-35c6b674bb13d963-1---d8754z-;rport\r\nMax-Forwards: 69\r\nContact: <sip:27877009000@192.168.56."..., len = 6}, uri = {
                  s = 0xb5004d3f "sip:111@192.168.56.5;transport=udp SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.56.1:27912;branch=z9hG4bK-d8754z-35c6b674bb13d963-1---d8754z-;rport\r\nMax-Forwards: 69\r\nContact: <sip:27877009000@192.168.56.1:27912"..., len = 34}, version = {
                  s = 0xb5004d62 "SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.56.1:27912;branch=z9hG4bK-d8754z-35c6b674bb13d963-1---d8754z-;rport\r\nMax-Forwards: 69\r\nContact: <sip:27877009000@192.168.56.1:27912;transport=udp>\r\nTo: \"111\"<sip:111@"..., len = 7}, method_value = 1}, reply = {version = {
                  s = 0xb5004d38 "INVITE sip:111@192.168.56.5;transport=udp SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.56.1:27912;branch=z9hG4bK-d8754z-35c6b674bb13d963-1---d8754z-;rport\r\nMax-Forwards: 69\r\nContact: <sip:27877009000@192.168.56."..., len = 6}, status = {
                  s = 0xb5004d3f "sip:111@192.168.56.5;transport=udp SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.56.1:27912;branch=z9hG4bK-d8754z-35c6b674bb13d963-1---d8754z-;rport\r\nMax-Forwards: 69\r\nContact: <sip:27877009000@192.168.56.1:27912"..., len = 34}, reason = {
                  s = 0xb5004d62 "SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.56.1:27912;branch=z9hG4bK-d8754z-35c6b674bb13d963-1---d8754z-;rport\r\nMax-Forwards: 69\r\nContact: <sip:27877009000@192.168.56.1:27912;transport=udp>\r\nTo: \"111\"<sip:111@"..., len = 7}, statuscode = 1}}}, via1 = 0xb50050b4, via2 = 0x0, headers = 0xb5005090, last_header = 0xb5005574, parsed_flag = 18446744073709551615, h_via1 = 0xb5005090, h_via2 = 0x0,
          callid = 0xb5005484, to = 0xb50051b4, cseq = 0xb50054a8, from = 0xb5005310, contact = 0xb5005190, maxforwards = 0xb500516c, route = 0x0, record_route = 0x0, path = 0x0, content_type = 0xb5005508,
          content_length = 0xb5005574, authorization = 0x0, expires = 0x0, proxy_auth = 0x0, supported = 0xb500552c, proxy_require = 0x0, unsupported = 0x0, allow = 0xb50054e4, event = 0x0, accept = 0x0,
          accept_language = 0x0, organization = 0x0, priority = 0x0, subject = 0x0, user_agent = 0xb5005550, content_disposition = 0x0, accept_disposition = 0x0, diversion = 0x0, rpid = 0x0, refer_to = 0x0,
          session_expires = 0x0, min_se = 0x0, ppi = 0x0, pai = 0x0, privacy = 0x0, call_info = 0x0, www_authenticate = 0x0, proxy_authenticate = 0x0, min_expires = 0x0, sdp = 0x0, multi = 0x0,
          eoh = 0xb5004f89 "\r\nv=0\r\no=- 1389955952217014 1 IN IP4 192.168.56.1\r\ns=Bria 3 release 3.5.5 stamp 71243\r\nc=IN IP4 192.168.56.1\r\nt=0 0\r\nm=audio 57686 RTP/AVP 0 8 18 101\r\na=rtpmap:18 G729/8000\r\na=fmtp:18 annexb=yes\r\na=rt"...,
          unparsed = 0xb5004f89 "\r\nv=0\r\no=- 1389955952217014 1 IN IP4 192.168.56.1\r\ns=Bria 3 release 3.5.5 stamp 71243\r\nc=IN IP4 192.168.56.1\r\nt=0 0\r\nm=audio 57686 RTP/AVP 0 8 18 101\r\na=rtpmap:18 G729/8000\r\na=fmtp:18 annexb=yes\r\na=rt"..., rcv = {src_ip = {af = 2, len = 4, u = {addrl = {20490432, 135932928, 3219035164, 0}, addr32 = {20490432, 135932928, 3219035164, 0}, addr16 = {43200, 312, 11264, 2074, 37916, 49118,
                  0, 0}, addr = "\300\250\070\001\000,\032\b\034\224\336\277\000\000\000"}}, dst_ip = {af = 2, len = 4, u = {addrl = {87599296, 0, 0, 0}, addr32 = {87599296, 0, 0, 0}, addr16 = {43200, 1336, 0, 0, 0, 0,
---Type <return> to continue, or q <return> to quit---
                  0, 0}, addr = "\300\250\070\005", '\000' <repeats 11 times>}}, src_port = 27912, dst_port = 5060, proto = 1, proto_reserved1 = 0, proto_reserved2 = 0, src_su = {s = {sa_family = 2,
                sa_data = "m\b\300\250\070\001\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 2157, sin_addr = {s_addr = 20490432}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2,
                sin6_port = 2157, sin6_flowinfo = 20490432, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}},
            bind_address = 0xb73c46f4},
          buf = 0xb5004d38 "INVITE sip:111@192.168.56.5;transport=udp SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.56.1:27912;branch=z9hG4bK-d8754z-35c6b674bb13d963-1---d8754z-;rport\r\nMax-Forwards: 69\r\nContact: <sip:27877009000@192.168.56."..., len = 853, new_uri = {s = 0xb73cb00c "sip:111@196.28.136.80;transport=udp", len = 35}, dst_uri = {s = 0x0, len = 0}, parsed_uri_ok = 0, parsed_uri = {user = {
              s = 0xb5004d18 "111@196.28.136.80;transport=udp", len = 3}, passwd = {s = 0x0, len = 0}, host = {s = 0xb5004d1c "196.28.136.80;transport=udp", len = 13}, port = {s = 0x0, len = 0}, params = {
              s = 0xb5004d2a "transport=udp", len = 13}, headers = {s = 0x0, len = 0}, port_no = 0, proto = 1, type = SIP_URI_T, transport = {s = 0xb5004d2a "transport=udp", len = 13}, ttl = {s = 0x0, len = 0},
            user_param = {s = 0x0, len = 0}, maddr = {s = 0x0, len = 0}, method = {s = 0x0, len = 0}, lr = {s = 0x0, len = 0}, r2 = {s = 0x0, len = 0}, gr = {s = 0x0, len = 0}, transport_val = {s = 0xb5004d34 "udp",
              len = 3}, ttl_val = {s = 0x0, len = 0}, user_param_val = {s = 0x0, len = 0}, maddr_val = {s = 0x0, len = 0}, method_val = {s = 0x0, len = 0}, lr_val = {s = 0x0, len = 0}, r2_val = {s = 0x0, len = 0},
            gr_val = {s = 0x0, len = 0}, u_name = {{s = 0x0, len = 0}, {s = 0x0, len = 0}, {s = 0x0, len = 0}, {s = 0x0, len = 0}, {s = 0x0, len = 0}}, u_val = {{s = 0x0, len = 0}, {s = 0x0, len = 0}, {s = 0x0,
                len = 0}, {s = 0x0, len = 0}, {s = 0x0, len = 0}}, u_params_no = 0}, parsed_orig_ruri_ok = 0, parsed_orig_ruri = {user = {s = 0x0, len = 0}, passwd = {s = 0x0, len = 0}, host = {s = 0x0, len = 0},
            port = {s = 0x0, len = 0}, params = {s = 0x0, len = 0}, headers = {s = 0x0, len = 0}, port_no = 0, proto = 0, type = ERROR_URI_T, transport = {s = 0x0, len = 0}, ttl = {s = 0x0, len = 0}, user_param = {
              s = 0x0, len = 0}, maddr = {s = 0x0, len = 0}, method = {s = 0x0, len = 0}, lr = {s = 0x0, len = 0}, r2 = {s = 0x0, len = 0}, gr = {s = 0x0, len = 0}, transport_val = {s = 0x0, len = 0}, ttl_val = {
              s = 0x0, len = 0}, user_param_val = {s = 0x0, len = 0}, maddr_val = {s = 0x0, len = 0}, method_val = {s = 0x0, len = 0}, lr_val = {s = 0x0, len = 0}, r2_val = {s = 0x0, len = 0}, gr_val = {s = 0x0,
              len = 0}, u_name = {{s = 0x0, len = 0}, {s = 0x0, len = 0}, {s = 0x0, len = 0}, {s = 0x0, len = 0}, {s = 0x0, len = 0}}, u_val = {{s = 0x0, len = 0}, {s = 0x0, len = 0}, {s = 0x0, len = 0}, {s = 0x0,
                len = 0}, {s = 0x0, len = 0}}, u_params_no = 0}, add_rm = 0x0, body_lumps = 0x0, reply_lump = 0x0, add_to_branch_s = '\000' <repeats 57 times>, add_to_branch_len = 0, hash_index = 35059, flags = 75,
          msg_flags = 32, set_global_address = {s = 0x0, len = 0}, set_global_port = {s = 0x0, len = 0}, force_send_socket = 0x0, path_vec = {s = 0x0, len = 0}, msg_cb = 0x0}
#16 t_should_relay_response (Trans=<optimized out>, new_code=<optimized out>, branch=0, should_store=0xbfde91b4, should_relay=0xbfde91b0, cancel_bitmap=0xbfde9264, reply=0xb73ca714) at t_reply.c:956
        branch_cnt = 1
        inv_through = <optimized out>
        do_cancel = <optimized out>
        __FUNCTION__ = "t_should_relay_response"
#17 0xb6f9ddbd in relay_reply (t=0xb5003910, p_msg=0xb73ca714, branch=0, msg_status=401, cancel_bitmap=0xbfde9264) at t_reply.c:1170
        relay = -1258276592
        save_clone = <optimized out>
        buf = 0x0
        res_len = 0
        relayed_code = 0
        relayed_msg = 0x0
        bm = {to_tag_val = {s = 0x18 <Address 0x18 out of bounds>, len = 0}}
        totag_retr = 0
        reply_status = <optimized out>
        uas_rb = <optimized out>
        cb_s = {s = 0x8224216 "", len = 31646356}
        text = {s = 0xb5005bd8 "\b", len = 1677720}
        __FUNCTION__ = "relay_reply"
#18 0xb6f9f632 in reply_received (p_msg=0xb73ca714) at t_reply.c:1549
        msg_status = 401
        last_uac_status = 0
        branch = 0
        reply_status = <optimized out>
        timer = <optimized out>
        cancel_bitmap = 0
        uac = 0xb5003a28
        t = 0xb5003910
        backup_list = <optimized out>
        has_reply_route = <optimized out>
        __FUNCTION__ = "reply_received"
#19 0x08077e7e in forward_reply (msg=0xb73ca714) at forward.c:575
        new_buf = 0x0
        to = 0x0
        new_len = <optimized out>
        mod = 0xb73b7ad0
        proto = <optimized out>
        id = 0
        send_sock = <optimized out>
        s = <optimized out>
        len = <optimized out>
---Type <return> to continue, or q <return> to quit---
        __FUNCTION__ = "forward_reply"
#20 0x080b1e16 in receive_msg (
    buf=0x8223fc0 "SIP/2.0 401 Unauthorized\r\nVia: SIP/2.0/UDP 192.168.56.5:5060;received=196.2.61.11;branch=z9hG4bK3f88.45c77526.0;rport=62074\r\nVia: SIP/2.0/UDP 192.168.56.1:27912;received=192.168.56.1;branch=z9hG4bK-d8"..., len=598, rcv_info=0xbfde93ec) at receive.c:209
        msg = 0xb73ca714
        start = {tv_sec = 2059, tv_usec = -1218714632}
        tmp = 0x256 <Address 0x256 out of bounds>
        __FUNCTION__ = "receive_msg"
#21 0x08123ddc in udp_rcv_loop () at udp_server.c:424
        len = -1075932180
        buf = "SIP/2.0 401 Unauthorized\r\nVia: SIP/2.0/UDP 192.168.56.5:5060;received=196.2.61.11;branch=z9hG4bK3f88.45c77526.0;rport=62074\r\nVia: SIP/2.0/UDP 192.168.56.1:27912;received=192.168.56.1;branch=z9hG4bK-d8"...
        tmp = 0xbfde93ec "\002"
        from = 0xb73ca6e8
        fromlen = 16
        ri = {src_ip = {af = 2, len = 4, u = {addrl = {1351097540, 135932928, 3219035164, 0}, addr32 = {1351097540, 135932928, 3219035164, 0}, addr16 = {7364, 20616, 11264, 2074, 37916, 49118, 0, 0},
              addr = "\304\034\210P\000,\032\b\034\224\336\277\000\000\000"}}, dst_ip = {af = 2, len = 4, u = {addrl = {87599296, 0, 0, 0}, addr32 = {87599296, 0, 0, 0}, addr16 = {43200, 1336, 0, 0, 0, 0, 0, 0},
              addr = "\300\250\070\005", '\000' <repeats 11 times>}}, src_port = 5060, dst_port = 5060, proto = 1, proto_reserved1 = 0, proto_reserved2 = 0, src_su = {s = {sa_family = 2,
              sa_data = "\023\304\304\034\210P\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 50195, sin_addr = {s_addr = 1351097540}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {
              sin6_family = 2, sin6_port = 50195, sin6_flowinfo = 1351097540, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}},
              sin6_scope_id = 0}}, bind_address = 0xb73c46f4}
        p = <optimized out>
        msg = {
          s = 0x8223fc0 "SIP/2.0 401 Unauthorized\r\nVia: SIP/2.0/UDP 192.168.56.5:5060;received=196.2.61.11;branch=z9hG4bK3f88.45c77526.0;rport=62074\r\nVia: SIP/2.0/UDP 192.168.56.1:27912;received=192.168.56.1;branch=z9hG4bK-d8"..., len = 598}
        __FUNCTION__ = "udp_rcv_loop"
#22 0x08059893 in main_loop () at main.c:917
        i = <optimized out>
        pid = <optimized out>
        si = <optimized out>
        startup_done = <optimized out>
        chd_rank = 9
        rc = <optimized out>
        load_p = 0xb500101c
#23 main (argc=3, argv=0xbfde9574) at main.c:1598
        cfg_log_stderr = <optimized out>
        cfg_stream = 0xa1f0008
        c = <optimized out>
        r = <optimized out>
        tmp = 0xb75e8196 "\201\303^.\027"
        tmp_len = <optimized out>
        port = <optimized out>
        proto = <optimized out>
        options = 0x81a651c "f:cCm:M:b:l:n:N:rRvdDFETSVhw:t:u:g:P:G:W:o:"
        ret = -1
        seed = 238003336
        rfd = 0
        __FUNCTION__ = "main"
(gdb)
(gdb)
(gdb)
(gdb)

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: uac_auth() segfault

Bogdan-Andrei Iancu-2
In reply to this post by Bogdan-Andrei Iancu-2
Hello Justin,

Thank you for the backtrace. In gdb, in frame 1, could you do:
    p uac_auth_api
    p auth

Thanks and Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 20.03.2014 22:32, Justin Zondagh wrote:
Hi Bogdan, 

Bt below: 

warning: Can't read pathname for load map: Input/output error. 
[Thread debugging using libthread_db enabled] 
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". 
Core was generated by `/usr/src/opensips_1_10/opensips -w /tmp/'. 
Program terminated with signal 11, Segmentation fault. 
#0  0x00000000 in ?? () 
(gdb) bt full 
#0  0x00000000 in ?? () 
No symbol table info available. 
#1  0xb6e8770f in uac_auth (msg=0xb6fced80) at auth.c:156 
        auth = <optimized out>
        auth_nc_cnonce = {nc = 0x0, cnonce = 0x0} 
        crd = <optimized out>
        code = 401 
        branch = 0 
        rpl = <optimized out>
        t = 0xb5003910 
        response = "\000\060Y\034\b\000\000\000\000\377\377\377\377\001\001\001\001P\215q\267\000\001\001\001\001\001\001\001\206\377\377\377" 
        new_hdr = <optimized out>
        __FUNCTION__ = "uac_auth" 
#2  0xb6e8d6ad in w_uac_auth (msg=0xb6fced80, str=0x0, str2=0x0) at uac.c:451 
No locals.
[....]


Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: +27 72 598 4887 | f: +27 86 546 1405
uk: +44 20 328 99610


On Sun, Feb 9, 2014 at 7:55 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hello,

Do you have still have the corefile ? Are you able to extract a backtrace from it . See:
        http://www.opensips.org/Documentation/TroubleShooting-Crash

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 21.01.2014 15:35, Justin Zondagh wrote:
Hi All,

I'm running a compiled version of openSIPS 1.10 on Ubuntu 12.04.

I'm getting a segfault in the uac_auth() function and not too sure why. I am setting the username, password and realm avps before I call it.

The 401 comes in back from the UAS and then hits the failure_route[1], does some stuff and then crashes in what seems like uac_auth()...

==== Extract from CFG ====


route[1] { 

xlog("L_INFO", "[$ci] Routing this Request");

# for INVITEs enable some additional helper routes
if (is_method("INVITE|SUBSCRIBE|PUBLISH|INFO|MESSAGE|NOTIFY")) {
t_on_branch("2");
t_on_reply("2");
t_on_failure("1");
}

if (!t_relay()) {
sl_reply_error();
}

exit; 

failure_route[1] { 


if (t_check_status("401")) {
xlog("L_INFO","[$ci] Got 401 from Porta \n");
                avp_db_query("select username from registrant_ip_map where external_ip = '$(avp(ext_si){s.escape.common})'","$avp(authuser)");

xlog("L_INFO","[$ci] Auth User [$avp(authuser)]");

avp_db_query("select password from registrant where username = '$(avp(authuser){s.escape.common})'","$avp(authpass)");
$avp(authrealm) = "";

$avp(www) = $(<reply>hdr(WWW-Authenticate));
avp_subst("$avp(www)", "/Digest\s//");
#Get the realm from the www-auth header
$var(numkvp) = $(avp(www){csv.count});
$var(i) = 0;
while($var(i) < $var(numkvp)) {
$var(temp) = $(avp(www){s.select,$var(i),,});
if ($var(temp) =~ "realm.*") {
$avp(authrealm) = $var(temp);
avp_subst("$avp(authrealm)","/(realm=\")(.*)(\")/\2/");
}

$var(i) = $var(i) + 1;
}
                xlog("L_INFO","[$ci] authrealm is [$avp(authrealm)], authuser is [$avp(authuser)], authpass is [$avp(authpass)]\n");

#No need for loop prevention as Porta sends 183 early media recording saying password is wrong, then sends 603
if (uac_auth()) {
xlog("L_INFO","[$ci] Built auth, sending back to Porta\n");

t_on_failure("1");
t_relay();
xlog("L_INFO","[$ci] Relay Auth in INVITE\n");
}
}
if (t_was_cancelled()) {
exit;
}



}


==== EXTRACT FROM syslog =====

Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: [NjMzOGYxMGJjMGI5NzQzNTE3OWQ1NDBhYzcxMjcxOGU] Auth User [27877009000]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:ops_dbquery_avps: query [select password from registrant where username = '<a moz-do-not-send="true" href="tel:27877009000" value="+27877009000" target="_blank">27877009000']
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:mysql_raise_event: MySQL status has not changed: connected
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_new_result: allocate 28 bytes for result set at 0xb73d9a5c
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:db_mysql_get_columns: 1 columns returned from the query
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_allocate_columns: allocate 16 bytes for result columns at 0xb73d9a88
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0xb73d9a8c)[0]=[password]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_allocate_rows: allocate 28 bytes for result rows and values at 0xb73d9aa4
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:db_mysql:db_mysql_str2val: converting STRING [xxxxxxxx]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:db_query_avp: rows [1]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:db_query_avp: row [0]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:db_close_query: close avp query
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_columns: freeing result columns at 0xb73d9a88
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_rows: freeing 1 rows
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_row: freeing row values at 0xb73d9aac
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_rows: freeing rows at 0xb73d9aa4
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:db_free_result: freeing result set at 0xb73d9a5c
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:pv_get_spec_value: Found context function 0xb6fa4abd
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_headers: flags=ffffffffffffffff
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:get_hdr_field: content_length=0
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:get_hdr_field: found end of header
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:subst_run: running. r=0
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:subst_run: matched (0, 7): [Digest ]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:ops_subst: subst to 1 avps
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_csv: Parsing csv for : [realm="196.28.136.80",nonce="0a88ebc4eb91e7a1e2910f35e76191b6c66f"]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:comp_scriptvar: int 26 : 0 / 2
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:subst_run: running. r=0
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:subst_run: matched (0, 21): [realm="196.28.136.80"]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:avpops:ops_subst: subst to 1 avps
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:comp_scriptvar: int 26 : 1 / 2
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:comp_scriptvar: int 26 : 2 / 2
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: [NjMzOGYxMGJjMGI5NzQzNTE3OWQ1NDBhYzcxMjcxOGU] authrealm is [196.28.136.80], authuser is [27877009000], authpass is [xxxxxxxx]
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:uac:uac_auth: picked reply is 0xb73ca714, code 401
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_authenticate_body: <realm>="196.28.136.80" state=2
Jan 17 12:52:24 opensips4 /usr/src/opensips_1_10/opensips[1939]: DBG:core:parse_authenticate_body: <nonce>="0a88ebc4eb91e7a1e2910f35e76191b6c66f" state=3
Jan 17 12:52:24 opensips4 kernel: [  249.123055] show_signal_msg: 15 callbacks suppressed
Jan 17 12:52:24 opensips4 kernel: [  249.123060] opensips[1939]: segfault at 0 ip   (null) sp bfde82ec error 14 in opensips[8048000+1a6000]
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1956]: DBG:tm:utimer_routine: timer routine:4,tl=0xb5003a5c next=(nil), timeout=4600000
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1968]: CRITICAL:core:receive_fd: EOF on 21
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1968]: DBG:core:handle_ser_child: dead child 10, pid 1939 (shutting down?)
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1968]: DBG:core:io_watch_del: io_watch_del op on index -1 21 (0x8213340, 21, -1, 0x0,0x1) fd_no=27 called
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1967]: INFO:core:sig_usr: signal 15 received
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1966]: INFO:core:sig_usr: signal 15 received
Jan 17 12:52:25 opensips4 /usr/src/opensips_1_10/opensips[1965]: INFO:core:sig_usr: signal 15 received

==== Back trace =====

available upon request



Any ideas?

Regards,

Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: <a moz-do-not-send="true" href="tel:%2B27%2072%20598%204887" value="+27725984887" target="_blank">+27 72 598 4887 | f: <a moz-do-not-send="true" href="tel:%2B27%2086%20546%201405" value="+27865461405" target="_blank">+27 86 546 1405
uk: <a moz-do-not-send="true" href="tel:%2B44%2020%20328%2099610" value="+442032899610" target="_blank">+44 20 328 99610



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: uac_auth() segfault

Bogdan-Andrei Iancu-2
In reply to this post by Bogdan-Andrei Iancu-2
Hello Justin,

In the 1.10 code, in the UAC module, in the mod_init function, the binding to UAC AUTH module is to be done. See line 171 in modules/uac/uac.c


    if ( is_script_func_used("uac_auth", -1) ) {
        /* load the UAC_AUTH API as uac_auth() is invoked from script */
        if(load_uac_auth_api(&uac_auth_api)<0){
            LM_ERR("can't load UAC_AUTH API, needed for uac_auth()\n");
            goto error;
        }
    }


Maybe the is_script_func_used() doesn't trigger properly there - in what kind of route are you using the uac_auth() function ? Could you place a LM_DBG() in that 'if' statement to see if it goes in there ?

Thank and regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 25.03.2014 14:28, Justin Zondagh wrote:
Hi Bogdan,

I have found and fixed the bug. The uac_auth_api wasn't being loaded before being called as you suspected.

I added this code

        if(load_uac_auth_api(&uac_auth_api) < 0){
                LM_INFO("Error loading uac_auth_api");
                goto error;
        }


before calling the API on the next line:

        crd = uac_auth_api._lookup_realm( &auth->realm );


Seems to work now...

How do we commit this to code base?

Regards,
Justin



Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: +27 72 598 4887 | f: +27 86 546 1405
uk: +44 20 328 99610


On Tue, Mar 25, 2014 at 10:18 AM, Justin Zondagh <[hidden email]> wrote:
They were the wrong way round, but swapped them and seems to have the same issue:


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: uac_auth() segfault

jrzondagh
Hi Bogdan,

I placed the LM_DBG as follows

        if ( is_script_func_used("uac_auth", -1) ) {
                /* load the UAC_AUTH API as uac_auth() is invoked from script */
                if(load_uac_auth_api(&uac_auth_api)<0){
                        LM_ERR("can't load UAC_AUTH API, needed for uac_auth()\n");
                        goto error;
                }

                LM_DBG("Loaded uac_auth api as found in script");
        }

But nothing appears in the log on init.



I'm using the uac_auth() in a failure route



failure_route[ip_auth_fail]
{

        if (t_check_status("401")) {
                xlog("L_INFO","[$ci] Got 401 from Proxy\n");

                avp_db_query("select password from registrant where username = '$(avp(authuser){s.escape.common})'","$avp(authpass)");

                $avp(authrealm) = "";

                $avp(www) = $(<reply>hdr(WWW-Authenticate));
                avp_subst("$avp(www)", "/Digest\s//");

                #Get the realm from the www-auth header
                $var(numkvp) = $(avp(www){csv.count});
                $var(i) = 0;
                while($var(i) < $var(numkvp)) {

                        $var(temp) = $(avp(www){s.select,$var(i),,});

                        if ($var(temp) =~ "realm.*") {
                                $avp(authrealm) = $var(temp);
                                avp_subst("$avp(authrealm)","/(realm=\")(.*)(\")/\2/");
                                #$avp(authrealm) := "asterisk";
                        }

                        $var(i) = $var(i) + 1;
                }

                xlog("L_INFO","[$ci] authrealm is [$avp(authrealm)], authuser is [$avp(authuser)], authpass is [$avp(authpass)]\n");

                #No need for loop prevention as Proxy sends 183 early media recording saying password is wrong, then sends 603

                if (uac_auth()) {
                        xlog("L_INFO","[$ci] Built auth, sending back to Proxy\n");

                        t_on_failure("ip_auth_fail");

                        # the $du should really be uri as specified in Record-Route in 401, but using reply's source IP for now
                        $du = "sip:" + $(<reply>si) + ":5060";

                        xlog("L_INFO", "[$ci] Sending request with Auth header to [$du]\n");
                        t_relay();

                }
        }

        if (t_was_cancelled()) {
                exit;
        }

}




Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: +27 72 598 4887 | f: +27 86 546 1405
uk: +44 20 328 99610


On Tue, Mar 25, 2014 at 7:28 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hello Justin,

In the 1.10 code, in the UAC module, in the mod_init function, the binding to UAC AUTH module is to be done. See line 171 in modules/uac/uac.c


    if ( is_script_func_used("uac_auth", -1) ) {
        /* load the UAC_AUTH API as uac_auth() is invoked from script */
        if(load_uac_auth_api(&uac_auth_api)<0){
            LM_ERR("can't load UAC_AUTH API, needed for uac_auth()\n");
            goto error;
        }
    }


Maybe the is_script_func_used() doesn't trigger properly there - in what kind of route are you using the uac_auth() function ? Could you place a LM_DBG() in that 'if' statement to see if it goes in there ?

Thank and regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 25.03.2014 14:28, Justin Zondagh wrote:
Hi Bogdan,

I have found and fixed the bug. The uac_auth_api wasn't being loaded before being called as you suspected.

I added this code

        if(load_uac_auth_api(&uac_auth_api) < 0){
                LM_INFO("Error loading uac_auth_api");
                goto error;
        }


before calling the API on the next line:

        crd = uac_auth_api._lookup_realm( &auth->realm );


Seems to work now...

How do we commit this to code base?

Regards,
Justin



Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: <a href="tel:%2B27%2072%20598%204887" value="+27725984887" target="_blank">+27 72 598 4887 | f: <a href="tel:%2B27%2086%20546%201405" value="+27865461405" target="_blank">+27 86 546 1405
uk: <a href="tel:%2B44%2020%20328%2099610" value="+442032899610" target="_blank">+44 20 328 99610


On Tue, Mar 25, 2014 at 10:18 AM, Justin Zondagh <[hidden email]> wrote:
They were the wrong way round, but swapped them and seems to have the same issue:



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: uac_auth() segfault

Bogdan-Andrei Iancu-2
Hello Justin,

Thanks for all your help - I managed to find and fix the bug - please update from GIT and try again.

Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 25.03.2014 21:31, Justin Zondagh wrote:
Hi Bogdan,

I placed the LM_DBG as follows

        if ( is_script_func_used("uac_auth", -1) ) {
                /* load the UAC_AUTH API as uac_auth() is invoked from script */
                if(load_uac_auth_api(&uac_auth_api)<0){
                        LM_ERR("can't load UAC_AUTH API, needed for uac_auth()\n");
                        goto error;
                }

                LM_DBG("Loaded uac_auth api as found in script");
        }

But nothing appears in the log on init.



I'm using the uac_auth() in a failure route



failure_route[ip_auth_fail]
{

        if (t_check_status("401")) {
                xlog("L_INFO","[$ci] Got 401 from Proxy\n");

                avp_db_query("select password from registrant where username = '$(avp(authuser){s.escape.common})'","$avp(authpass)");

                $avp(authrealm) = "";

                $avp(www) = $(<reply>hdr(WWW-Authenticate));
                avp_subst("$avp(www)", "/Digest\s//");

                #Get the realm from the www-auth header
                $var(numkvp) = $(avp(www){csv.count});
                $var(i) = 0;
                while($var(i) < $var(numkvp)) {

                        $var(temp) = $(avp(www){s.select,$var(i),,});

                        if ($var(temp) =~ "realm.*") {
                                $avp(authrealm) = $var(temp);
                                avp_subst("$avp(authrealm)","/(realm=\")(.*)(\")/\2/");
                                #$avp(authrealm) := "asterisk";
                        }

                        $var(i) = $var(i) + 1;
                }

                xlog("L_INFO","[$ci] authrealm is [$avp(authrealm)], authuser is [$avp(authuser)], authpass is [$avp(authpass)]\n");

                #No need for loop prevention as Proxy sends 183 early media recording saying password is wrong, then sends 603

                if (uac_auth()) {
                        xlog("L_INFO","[$ci] Built auth, sending back to Proxy\n");

                        t_on_failure("ip_auth_fail");

                        # the $du should really be uri as specified in Record-Route in 401, but using reply's source IP for now
                        $du = "sip:" + $(<reply>si) + ":5060";

                        xlog("L_INFO", "[$ci] Sending request with Auth header to [$du]\n");
                        t_relay();

                }
        }

        if (t_was_cancelled()) {
                exit;
        }

}




Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: +27 72 598 4887 | f: +27 86 546 1405
uk: +44 20 328 99610


On Tue, Mar 25, 2014 at 7:28 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hello Justin,

In the 1.10 code, in the UAC module, in the mod_init function, the binding to UAC AUTH module is to be done. See line 171 in modules/uac/uac.c


    if ( is_script_func_used("uac_auth", -1) ) {
        /* load the UAC_AUTH API as uac_auth() is invoked from script */
        if(load_uac_auth_api(&uac_auth_api)<0){
            LM_ERR("can't load UAC_AUTH API, needed for uac_auth()\n");
            goto error;
        }
    }


Maybe the is_script_func_used() doesn't trigger properly there - in what kind of route are you using the uac_auth() function ? Could you place a LM_DBG() in that 'if' statement to see if it goes in there ?

Thank and regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 25.03.2014 14:28, Justin Zondagh wrote:
Hi Bogdan,

I have found and fixed the bug. The uac_auth_api wasn't being loaded before being called as you suspected.

I added this code

        if(load_uac_auth_api(&uac_auth_api) < 0){
                LM_INFO("Error loading uac_auth_api");
                goto error;
        }


before calling the API on the next line:

        crd = uac_auth_api._lookup_realm( &auth->realm );


Seems to work now...

How do we commit this to code base?

Regards,
Justin



Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: <a moz-do-not-send="true" href="tel:%2B27%2072%20598%204887" value="+27725984887" target="_blank">+27 72 598 4887 | f: <a moz-do-not-send="true" href="tel:%2B27%2086%20546%201405" value="+27865461405" target="_blank">+27 86 546 1405
uk: <a moz-do-not-send="true" href="tel:%2B44%2020%20328%2099610" value="+442032899610" target="_blank">+44 20 328 99610


On Tue, Mar 25, 2014 at 10:18 AM, Justin Zondagh <[hidden email]> wrote:
They were the wrong way round, but swapped them and seems to have the same issue:




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: uac_auth() segfault

jrzondagh
Thanks Bogdan, glad we could fix it.

Regards,
Justin


Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: +27 72 598 4887 | f: +27 86 546 1405
uk: +44 20 328 99610


On Wed, Mar 26, 2014 at 7:57 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hello Justin,

Thanks for all your help - I managed to find and fix the bug - please update from GIT and try again.

Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 25.03.2014 21:31, Justin Zondagh wrote:
Hi Bogdan,

I placed the LM_DBG as follows

        if ( is_script_func_used("uac_auth", -1) ) {
                /* load the UAC_AUTH API as uac_auth() is invoked from script */
                if(load_uac_auth_api(&uac_auth_api)<0){
                        LM_ERR("can't load UAC_AUTH API, needed for uac_auth()\n");
                        goto error;
                }

                LM_DBG("Loaded uac_auth api as found in script");
        }

But nothing appears in the log on init.



I'm using the uac_auth() in a failure route



failure_route[ip_auth_fail]
{

        if (t_check_status("401")) {
                xlog("L_INFO","[$ci] Got 401 from Proxy\n");

                avp_db_query("select password from registrant where username = '$(avp(authuser){s.escape.common})'","$avp(authpass)");

                $avp(authrealm) = "";

                $avp(www) = $(<reply>hdr(WWW-Authenticate));
                avp_subst("$avp(www)", "/Digest\s//");

                #Get the realm from the www-auth header
                $var(numkvp) = $(avp(www){csv.count});
                $var(i) = 0;
                while($var(i) < $var(numkvp)) {

                        $var(temp) = $(avp(www){s.select,$var(i),,});

                        if ($var(temp) =~ "realm.*") {
                                $avp(authrealm) = $var(temp);
                                avp_subst("$avp(authrealm)","/(realm=\")(.*)(\")/\2/");
                                #$avp(authrealm) := "asterisk";
                        }

                        $var(i) = $var(i) + 1;
                }

                xlog("L_INFO","[$ci] authrealm is [$avp(authrealm)], authuser is [$avp(authuser)], authpass is [$avp(authpass)]\n");

                #No need for loop prevention as Proxy sends 183 early media recording saying password is wrong, then sends 603

                if (uac_auth()) {
                        xlog("L_INFO","[$ci] Built auth, sending back to Proxy\n");

                        t_on_failure("ip_auth_fail");

                        # the $du should really be uri as specified in Record-Route in 401, but using reply's source IP for now
                        $du = "sip:" + $(<reply>si) + ":5060";

                        xlog("L_INFO", "[$ci] Sending request with Auth header to [$du]\n");
                        t_relay();

                }
        }

        if (t_was_cancelled()) {
                exit;
        }

}




Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: <a href="tel:%2B27%2072%20598%204887" value="+27725984887" target="_blank">+27 72 598 4887 | f: <a href="tel:%2B27%2086%20546%201405" value="+27865461405" target="_blank">+27 86 546 1405
uk: <a href="tel:%2B44%2020%20328%2099610" value="+442032899610" target="_blank">+44 20 328 99610


On Tue, Mar 25, 2014 at 7:28 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hello Justin,

In the 1.10 code, in the UAC module, in the mod_init function, the binding to UAC AUTH module is to be done. See line 171 in modules/uac/uac.c


    if ( is_script_func_used("uac_auth", -1) ) {
        /* load the UAC_AUTH API as uac_auth() is invoked from script */
        if(load_uac_auth_api(&uac_auth_api)<0){
            LM_ERR("can't load UAC_AUTH API, needed for uac_auth()\n");
            goto error;
        }
    }


Maybe the is_script_func_used() doesn't trigger properly there - in what kind of route are you using the uac_auth() function ? Could you place a LM_DBG() in that 'if' statement to see if it goes in there ?

Thank and regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 25.03.2014 14:28, Justin Zondagh wrote:
Hi Bogdan,

I have found and fixed the bug. The uac_auth_api wasn't being loaded before being called as you suspected.

I added this code

        if(load_uac_auth_api(&uac_auth_api) < 0){
                LM_INFO("Error loading uac_auth_api");
                goto error;
        }


before calling the API on the next line:

        crd = uac_auth_api._lookup_realm( &auth->realm );


Seems to work now...

How do we commit this to code base?

Regards,
Justin



Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: <a href="tel:%2B27%2072%20598%204887" value="+27725984887" target="_blank">+27 72 598 4887 | f: <a href="tel:%2B27%2086%20546%201405" value="+27865461405" target="_blank">+27 86 546 1405
uk: <a href="tel:%2B44%2020%20328%2099610" value="+442032899610" target="_blank">+44 20 328 99610


On Tue, Mar 25, 2014 at 10:18 AM, Justin Zondagh <[hidden email]> wrote:
They were the wrong way round, but swapped them and seems to have the same issue:





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: uac_auth() segfault

Alexander Mustafin
Hello!

I can’t find commit in git for this problem. 

Maybe, my problem related:

opensips[4065]: segfault at 0 ip (null) sp 00007fff64ade248 error 14 in opensips[400000+14c000]


Best regards,
Alexander Mustafin




27 марта 2014 г., в 2:08, Justin Zondagh <[hidden email]> написал(а):

Thanks Bogdan, glad we could fix it.

Regards,
Justin


Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: +27 72 598 4887 | f: +27 86 546 1405
uk: +44 20 328 99610


On Wed, Mar 26, 2014 at 7:57 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hello Justin,

Thanks for all your help - I managed to find and fix the bug - please update from GIT and try again.

Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 25.03.2014 21:31, Justin Zondagh wrote:
Hi Bogdan,

I placed the LM_DBG as follows

        if ( is_script_func_used("uac_auth", -1) ) {
                /* load the UAC_AUTH API as uac_auth() is invoked from script */
                if(load_uac_auth_api(&uac_auth_api)<0){
                        LM_ERR("can't load UAC_AUTH API, needed for uac_auth()\n");
                        goto error;
                }

                LM_DBG("Loaded uac_auth api as found in script");
        }

But nothing appears in the log on init.



I'm using the uac_auth() in a failure route



failure_route[ip_auth_fail]
{

        if (t_check_status("401")) {
                xlog("L_INFO","[$ci] Got 401 from Proxy\n");

                avp_db_query("select password from registrant where username = '$(avp(authuser){s.escape.common})'","$avp(authpass)");

                $avp(authrealm) = "";

                $avp(www) = $(<reply>hdr(WWW-Authenticate));
                avp_subst("$avp(www)", "/Digest\s//");

                #Get the realm from the www-auth header
                $var(numkvp) = $(avp(www){csv.count});
                $var(i) = 0;
                while($var(i) < $var(numkvp)) {

                        $var(temp) = $(avp(www){s.select,$var(i),,});

                        if ($var(temp) =~ "realm.*") {
                                $avp(authrealm) = $var(temp);
                                avp_subst("$avp(authrealm)","/(realm=\")(.*)(\")/\2/");
                                #$avp(authrealm) := "asterisk";
                        }

                        $var(i) = $var(i) + 1;
                }

                xlog("L_INFO","[$ci] authrealm is [$avp(authrealm)], authuser is [$avp(authuser)], authpass is [$avp(authpass)]\n");

                #No need for loop prevention as Proxy sends 183 early media recording saying password is wrong, then sends 603

                if (uac_auth()) {
                        xlog("L_INFO","[$ci] Built auth, sending back to Proxy\n");

                        t_on_failure("ip_auth_fail");

                        # the $du should really be uri as specified in Record-Route in 401, but using reply's source IP for now
                        $du = "sip:" + $(<reply>si) + ":5060";

                        xlog("L_INFO", "[$ci] Sending request with Auth header to [$du]\n");
                        t_relay();

                }
        }

        if (t_was_cancelled()) {
                exit;
        }

}




Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: <a href="tel:%2B27%2072%20598%204887" value="+27725984887" target="_blank">+27 72 598 4887 | f: <a href="tel:%2B27%2086%20546%201405" value="+27865461405" target="_blank">+27 86 546 1405
uk: <a href="tel:%2B44%2020%20328%2099610" value="+442032899610" target="_blank">+44 20 328 99610


On Tue, Mar 25, 2014 at 7:28 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hello Justin,

In the 1.10 code, in the UAC module, in the mod_init function, the binding to UAC AUTH module is to be done. See line 171 in modules/uac/uac.c


    if ( is_script_func_used("uac_auth", -1) ) {
        /* load the UAC_AUTH API as uac_auth() is invoked from script */
        if(load_uac_auth_api(&uac_auth_api)<0){
            LM_ERR("can't load UAC_AUTH API, needed for uac_auth()\n");
            goto error;
        }
    }


Maybe the is_script_func_used() doesn't trigger properly there - in what kind of route are you using the uac_auth() function ? Could you place a LM_DBG() in that 'if' statement to see if it goes in there ?

Thank and regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 25.03.2014 14:28, Justin Zondagh wrote:
Hi Bogdan,

I have found and fixed the bug. The uac_auth_api wasn't being loaded before being called as you suspected.

I added this code

        if(load_uac_auth_api(&uac_auth_api) < 0){
                LM_INFO("Error loading uac_auth_api");
                goto error;
        }


before calling the API on the next line:

        crd = uac_auth_api._lookup_realm( &auth->realm );


Seems to work now...

How do we commit this to code base?

Regards,
Justin



Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: <a href="tel:%2B27%2072%20598%204887" value="+27725984887" target="_blank">+27 72 598 4887 | f: <a href="tel:%2B27%2086%20546%201405" value="+27865461405" target="_blank">+27 86 546 1405
uk: <a href="tel:%2B44%2020%20328%2099610" value="+442032899610" target="_blank">+44 20 328 99610


On Tue, Mar 25, 2014 at 10:18 AM, Justin Zondagh <[hidden email]> wrote:
They were the wrong way round, but swapped them and seems to have the same issue:




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

signature.asc (507 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: uac_auth() segfault

Bogdan-Andrei Iancu-2
Maybe, maybe not...

Follow http://www.opensips.org/Documentation/TroubleShooting-Crash  and post the backtrace for your crash.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 04.04.2014 14:19, Alexander Mustafin wrote:
Hello!

I can’t find commit in git for this problem. 

Maybe, my problem related:

opensips[4065]: segfault at 0 ip (null) sp 00007fff64ade248 error 14 in opensips[400000+14c000]


Best regards,
Alexander Mustafin




27 марта 2014 г., в 2:08, Justin Zondagh <[hidden email]> написал(а):

Thanks Bogdan, glad we could fix it.

Regards,
Justin


Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: +27 72 598 4887 | f: +27 86 546 1405
uk: +44 20 328 99610


On Wed, Mar 26, 2014 at 7:57 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hello Justin,

Thanks for all your help - I managed to find and fix the bug - please update from GIT and try again.

Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 25.03.2014 21:31, Justin Zondagh wrote:
Hi Bogdan,

I placed the LM_DBG as follows

        if ( is_script_func_used("uac_auth", -1) ) {
                /* load the UAC_AUTH API as uac_auth() is invoked from script */
                if(load_uac_auth_api(&uac_auth_api)<0){
                        LM_ERR("can't load UAC_AUTH API, needed for uac_auth()\n");
                        goto error;
                }

                LM_DBG("Loaded uac_auth api as found in script");
        }

But nothing appears in the log on init.



I'm using the uac_auth() in a failure route



failure_route[ip_auth_fail]
{

        if (t_check_status("401")) {
                xlog("L_INFO","[$ci] Got 401 from Proxy\n");

                avp_db_query("select password from registrant where username = '$(avp(authuser){s.escape.common})'","$avp(authpass)");

                $avp(authrealm) = "";

                $avp(www) = $(<reply>hdr(WWW-Authenticate));
                avp_subst("$avp(www)", "/Digest\s//");

                #Get the realm from the www-auth header
                $var(numkvp) = $(avp(www){csv.count});
                $var(i) = 0;
                while($var(i) < $var(numkvp)) {

                        $var(temp) = $(avp(www){s.select,$var(i),,});

                        if ($var(temp) =~ "realm.*") {
                                $avp(authrealm) = $var(temp);
                                avp_subst("$avp(authrealm)","/(realm=\")(.*)(\")/\2/");
                                #$avp(authrealm) := "asterisk";
                        }

                        $var(i) = $var(i) + 1;
                }

                xlog("L_INFO","[$ci] authrealm is [$avp(authrealm)], authuser is [$avp(authuser)], authpass is [$avp(authpass)]\n");

                #No need for loop prevention as Proxy sends 183 early media recording saying password is wrong, then sends 603

                if (uac_auth()) {
                        xlog("L_INFO","[$ci] Built auth, sending back to Proxy\n");

                        t_on_failure("ip_auth_fail");

                        # the $du should really be uri as specified in Record-Route in 401, but using reply's source IP for now
                        $du = "sip:" + $(<reply>si) + ":5060";

                        xlog("L_INFO", "[$ci] Sending request with Auth header to [$du]\n");
                        t_relay();

                }
        }

        if (t_was_cancelled()) {
                exit;
        }

}




Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: <a moz-do-not-send="true" href="tel:%2B27%2072%20598%204887" value="+27725984887" target="_blank">+27 72 598 4887 | f: <a moz-do-not-send="true" href="tel:%2B27%2086%20546%201405" value="+27865461405" target="_blank">+27 86 546 1405
uk: <a moz-do-not-send="true" href="tel:%2B44%2020%20328%2099610" value="+442032899610" target="_blank">+44 20 328 99610


On Tue, Mar 25, 2014 at 7:28 PM, Bogdan-Andrei Iancu <[hidden email]> wrote:
Hello Justin,

In the 1.10 code, in the UAC module, in the mod_init function, the binding to UAC AUTH module is to be done. See line 171 in modules/uac/uac.c


    if ( is_script_func_used("uac_auth", -1) ) {
        /* load the UAC_AUTH API as uac_auth() is invoked from script */
        if(load_uac_auth_api(&uac_auth_api)<0){
            LM_ERR("can't load UAC_AUTH API, needed for uac_auth()\n");
            goto error;
        }
    }


Maybe the is_script_func_used() doesn't trigger properly there - in what kind of route are you using the uac_auth() function ? Could you place a LM_DBG() in that 'if' statement to see if it goes in there ?

Thank and regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 25.03.2014 14:28, Justin Zondagh wrote:
Hi Bogdan,

I have found and fixed the bug. The uac_auth_api wasn't being loaded before being called as you suspected.

I added this code

        if(load_uac_auth_api(&uac_auth_api) < 0){
                LM_INFO("Error loading uac_auth_api");
                goto error;
        }


before calling the API on the next line:

        crd = uac_auth_api._lookup_realm( &auth->realm );


Seems to work now...

How do we commit this to code base?

Regards,
Justin



Justin Zondagh
[hidden email]

Cape Town | South Africa
skype: jrzondagh
m: <a moz-do-not-send="true" href="tel:%2B27%2072%20598%204887" value="+27725984887" target="_blank">+27 72 598 4887 | f: <a moz-do-not-send="true" href="tel:%2B27%2086%20546%201405" value="+27865461405" target="_blank">+27 86 546 1405
uk: <a moz-do-not-send="true" href="tel:%2B44%2020%20328%2099610" value="+442032899610" target="_blank">+44 20 328 99610


On Tue, Mar 25, 2014 at 10:18 AM, Justin Zondagh <[hidden email]> wrote:
They were the wrong way round, but swapped them and seems to have the same issue:




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: uac_auth() segfault

Bogdan-Andrei Iancu-2
Hi,

Looks like it's the same crash - are you sure you updated your code from GIT ?

This was the fix on GIT for 1.10 version:
    https://github.com/OpenSIPS/opensips/commit/932e7d5ccd7e5499c68634c05b6ea24d55d66225

Please check if your copy has the fixed code.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 05.04.2014 08:15, Alexander Mustafin wrote:
Hi, Bogdan.

I’ve put backtrace to pastebin: http://pastebin.com/nvQPmY36. I hope this help you to solve the problem.

My system version: opensips 1.10.1-tls (x86_64/linux)
flags: STATS: On, USE_IPV6, USE_TCP, USE_TLS, DISABLE_NAGLE, USE_MCAST, SHM_MEM, 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.
@(#) $Id$
main.c compiled on 00:30:27 Mar 13 2014 with gcc 4.4.7


Best regards,
Alexander Mustafin




04 апр. 2014 г., в 18:41, Bogdan-Andrei Iancu <[hidden email]> написал(а):

Maybe, maybe not...

Follow http://www.opensips.org/Documentation/TroubleShooting-Crash  and post the backtrace for your crash.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 04.04.2014 14:19, Alexander Mustafin wrote:
Hello!

I can’t find commit in git for this problem. 

Maybe, my problem related:

opensips[4065]: segfault at 0 ip (null) sp 00007fff64ade248 error 14 in opensips[400000+14c000]




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: uac_auth() segfault

Bogdan-Andrei Iancu-2
OK, perfect !
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 08.04.2014 19:23, Alexander Mustafin wrote:
Hi, Bogdan.

I’d updated from yum-daily and now all works fine.

Thanks!

Best regards,
Alexander Mustafin




06 апр. 2014 г., в 18:56, Bogdan-Andrei Iancu <[hidden email]> написал(а):

Hi,

Looks like it's the same crash - are you sure you updated your code from GIT ?

This was the fix on GIT for 1.10 version:
    https://github.com/OpenSIPS/opensips/commit/932e7d5ccd7e5499c68634c05b6ea24d55d66225

Please check if your copy has the fixed code.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 05.04.2014 08:15, Alexander Mustafin wrote:
Hi, Bogdan.

I’ve put backtrace to pastebin: http://pastebin.com/nvQPmY36. I hope this help you to solve the problem.

My system version: opensips 1.10.1-tls (x86_64/linux)
flags: STATS: On, USE_IPV6, USE_TCP, USE_TLS, DISABLE_NAGLE, USE_MCAST, SHM_MEM, 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.
@(#) $Id$
main.c compiled on 00:30:27 Mar 13 2014 with gcc 4.4.7


Best regards,
Alexander Mustafin




04 апр. 2014 г., в 18:41, Bogdan-Andrei Iancu <[hidden email]> написал(а):

Maybe, maybe not...

Follow http://www.opensips.org/Documentation/TroubleShooting-Crash  and post the backtrace for your crash.

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 04.04.2014 14:19, Alexander Mustafin wrote:
Hello!

I can’t find commit in git for this problem. 

Maybe, my problem related:

opensips[4065]: segfault at 0 ip (null) sp 00007fff64ade248 error 14 in opensips[400000+14c000]






_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users