i stored timeouts to local cfg variables and tried to set them with
t_set_fr:
xlog("about to set fr to $sel(cfg_get.local.invite_timeout)/$sel(cfg_get.local.gw_timeout)\n");
t_set_fr("$sel(cfg_get.local.invite_timeout)",
"$sel(cfg_get.local.gw_timeout)");
xlog("after setting fr\n");
unfortunately, the above t_set_fr results in syslog error:
Mar 30 21:05:10 localhost /usr/sbin/sip-proxy[31365]: ERROR: about to set fr to 75000/3000
Mar 30 21:05:10 localhost /usr/sbin/sip-proxy[31365]: ERROR: <core> [sr_module.c:1546]: Could not convert PV to int
Mar 30 21:05:10 localhost /usr/sbin/sip-proxy[31365]: ERROR: after setting fr
why is that? the two local cfg variables have been set to int values
and no conversion should be needed:
Mar 30 21:05:00 localhost /usr/sbin/sip-proxy[31367]: INFO: Handling XMLRPC POST from <127.0.0.1> with body <<?xml version="1.0" ?><methodCall><methodName>cfg.set_now_int</methodName><params><param><value><string>local</string></value></param><param><value><string>invite_timeout</string></value></param><param><value><int>75000</int></value></param></params></methodCall>>
Mar 30 21:05:00 localhost /usr/sbin/sip-proxy[31367]: INFO: <core> [cfg/cfg_ctx.c:411]: INFO: cfg_set_now(): local.invite_timeout has been changed to 75000
Mar 30 21:05:03 localhost /usr/sbin/sip-proxy[31363]: INFO: Handling XMLRPC POST from <127.0.0.1> with body <<?xml version="1.0" ?><methodCall><methodName>cfg.set_now_int</methodName><params><param><value><string>local</string></value></param><param><value><string>gw_timeout</string></value></param><param><value><int>3000</int></value></param></params></methodCall>>
Mar 30 21:05:03 localhost /usr/sbin/sip-proxy[31363]: INFO: <core> [cfg/cfg_ctx.c:411]: INFO: cfg_set_now(): local.gw_timeout has been changed to 3000
this is with current master branch.
-- juha
ps. it took a while before i found where the error comes from because
there is no script line number in the message.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Juha Heinanen (jh)
Attached to Project - sip-router
Summary - error message does not include cfg file line number
Task Type - Improvement
Category - Core
Status - Assigned
Assigned To - Andrei Pelinescu-Onciul
Operating System - All
Severity - Medium
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - cfg file statement
t_set_fr("$sel(cfg_get.local.invite_timeout)",
"$sel(cfg_get.local.gw_timeout)");
produced a single error message
Mar 30 21:05:10 localhost /usr/sbin/sip-proxy[31365]: ERROR: <core> [sr_module.c:1546]: Could not convert PV to int
which did not include cfg file line number.
it took me long time to find the function call from which the error was produced.
improvement request: include cfg file line number in errors like in the above.
-- juha
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=58
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A user has added themself to the list of users assigned to this task.
FS#58 - error message does not include cfg file line number
User who did this - Juha Heinanen (jh)
http://sip-router.org/tracker/index.php?do=details&task_id=58
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#54 - Received replies should get higher preference than locally generated ones
User who did this - Iñaki Baz Castillo (ibc)
----------
Regarding the invented response: I would always prefer a timeout over some 500 a downstream
proxy might have sent (the 408 says at least that there might be a working phone, but the
user didn't pick it up).
If gw1 doesn't send a reply (neither a provisional) then fr_timer expires and creates a local 408. Of course this 408 means nothing about "there might be a working phone, but the user didn't pick it up". So I'd strongly prefer the 500 received from gw2.
Please check also the report [[http://sip-router.org/tracker/index.php?do=details&task_id=55&project=1|rep… 55]] in which I suggest a solution for locally generated responses.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=54#comment71
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Iñaki Baz Castillo (ibc)
Attached to Project - sip-router
Summary - Improving logging (show at least the transaction branch)
Task Type - Improvement
Category - logging
Status - Assigned
Assigned To - Andrei Pelinescu-Onciul
Operating System - All
Severity - Low
Priority - Low
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - Sometimes I inspect the log of SR/Kamailio and find errors like:
ERROR:nathelper:force_rtp_proxy: incorrect port 0 in reply from rtp proxy
or:
WARNING:dialog:dlg_onroute: unable to find dialog for BYE with route param '7b4.36497575' [1207:1465357411]
Of course in a server with high traffic such logs help nothing (even if I'm capturing all the SIP flow via pcap or 'siptrace' module).
It would be great if the logging core system would log always "something" related to the request or transaction, perhaps the branch, something as:
ERROR[recv 183 z9hG4bK6887.92b352f.0]:nathelper:force_rtp_proxy: incorrect port 0 in reply from rtp proxy
WARNING[sent BYE z9hG4bK68612qwre1h3]:dialog:dlg_onroute: unable to find dialog for BYE with route param '7b4.36497575' [1207:1465357411]
It would help a lot when debugging occasional issues (perhaps more related to a specific client rather than the SR/Kamailio server).
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=57
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A user has added themself to the list of users assigned to this task.
FS#57 - Improving logging (show at least the transaction branch)
User who did this - Iñaki Baz Castillo (ibc)
http://sip-router.org/tracker/index.php?do=details&task_id=57
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Hello,
what version of kamailio do you use?
Can you grab a backtrace with gdb once you get this high cpu usage? Spot
one of the processes, take the pid and do:
gdb /path/to/kamailio _pid_
Then:
bt
You should see the bactrace of executed function getting to deadloc.
Make sure you get at least one SIP worker process backtrace (do kamctl
ps to see the type of kamailio process).
Cheers,
Daniel
On 3/24/10 4:29 PM, Zappasodi Daniele wrote:
>
> Hi,
> I have a big problem with fast lock mutex on arm CPU:
> sometimes I find one or more children that go in an infinite loop, in
> the while loop of get_lock function.
> They remain in Run for long time (sometimes hours) and openser keeps
> 100% CPU.
>
> Now I have changed the functions get_lock and tsl in order to obtain
> more info and
> I observe that (if and) when the process finish the cycle, it have
> done a big amount of cycles.
>
> This the log with my added info:
> Mar 26 20:29:08 SAM-IP openser[1645]: NOTICE:tm:_lock: ret 1 (cycle)
> Mar 26 20:29:51 SAM-IP openser[1645]: NOTICE:tm:_lock: ret 1 (cycle)
> Mar 26 20:29:55 SAM-IP openser[1645]: NOTICE:tm:_lock: ret 1 (cycle)
>
> Mar 26 20:29:55 SAM-IP openser[1645]: NOTICE:tm:t_retransmit_reply:
> MYTM lock
> [process in loop]
> Mar 26 20:33:46 SAM-IP openser[1645]: NOTICE:tm:_lock: ret 59374917
> (cycle)
> [after 4 minutes and 59374917 cycles, this is an example with a
> "short" loop]
> Mar 26 20:33:46 SAM-IP openser[1645]: NOTICE:tm:t_retransmit_reply:
> MYTM lock done
>
> I'm not able to recognize the call flow that generates the loop (I
> know only that it always happens when t_retransmit_reply calls
> LOCK_REPLIES),
>
> but I urgently need a work around to escape from the loop.
>
> This is the get_lock function with my counter j:
>
> inline static int get_lock(fl_lock_t* lock)
> {
> #ifdef ADAPTIVE_WAIT
> int i=ADAPTIVE_WAIT_LOOPS;
> int j=1; /***** my change ****/
> #endif
>
> while(tsl(lock)){
> #ifdef BUSY_WAIT
> #elif defined ADAPTIVE_WAIT
> j++; /***** my change ****/
> if (i>0) i--;
> else sched_yield();
> #else
> sched_yield();
> #endif
> }
> return(j);
> }
>
> Can I break the lock when my counter reaches a big value?
> Should I call the unlock function after the break?
> which value can be considered too big?
>
> Thanks,
> Daniele
>
>
>
> **********************************************************************
> The information in this message is confidential and may be legally
> privileged. It is intended solely for the addressee. Access to this
> message by anyone else is unauthorized. If you are not the intended
> recipient, any disclosure, copying, or distribution of the message, or
> any action or omission taken by you in reliance on it, is prohibited
> and may be unlawful. Please immediately contact the sender if you have
> received this message in error.
> **********************************************************************
>
>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users(a)lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
--
Daniel-Constantin Mierla * http://www.asipto.com/
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#54 - Received replies should get higher preference than locally generated ones
User who did this - Andrei Pelinescu-Onciul (andrei)
----------
Regarding the option, I'll add a local_repl_prio_adj option, but it's low priority and I have a long todo list (if you don't see it when the 3.1 freeze is announced, it means I forgot and you should bug me about it).
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=54#comment70
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.