THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Guillaume Bour (gbour)
Attached to Project - sip-router
Summary - Kamailio crash when module topoh module is loaded and removing Via headers in reply route with remov
Task Type - Bug Report
Category - Module
Status - Unconfirmed
Assigned To -
Operating System - Linux
Severity - Low
Priority - Normal
Reported Version - 4.0
Due in Version - Undecided
Due Date - Undecided
Details - Reproduceable on kamailio 4.0.0 and 4.0.1.
Kamailio crash when module topoh module is loaded and removing Via headers in reply route with remove_hf("Via"); command.
Here is the backtrace:
Program received signal SIGSEGV, Segmentation fault.
th_del_via_cookie (msg=0x7fffffffd620, via=0x0) at th_msg.c:970
970 for(p=via->param_lst; p; p=p->next)
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.107.el6.x86_64 pcre-7.8-6.el6.x86_64
(gdb)
(gdb) bt
#0 th_del_via_cookie (msg=0x7fffffffd620, via=0x0) at th_msg.c:970
#1 0x00007ffff32b70c4 in th_del_cookie (msg=0x7fffffffd620) at th_msg.c:991
#2 0x00007ffff32bea7e in th_msg_sent (data=0x7fffffffdd70) at topoh_mod.c:347
#3 0x00007ffff60f93c6 in msg_send (rb=0x7ffff15240d0, buf=0x7ffff7283a20, len=<value optimized out>) at ../../forward.h:141
#4 send_pr_buffer (rb=0x7ffff15240d0, buf=0x7ffff7283a20, len=<value optimized out>) at t_funcs.c:102
#5 0x00007ffff6130d90 in relay_reply (t=<value optimized out>, p_msg=<value optimized out>, branch=0, msg_status=200, cancel_data=0x7fffffffe110, do_put_on_wait=1) at t_reply.c:1877
#6 0x00007ffff61333e6 in reply_received (p_msg=0x7ffff7296270) at t_reply.c:2370
#7 0x00000000004547f5 in do_forward_reply (msg=0x7ffff7296270, mode=<value optimized out>) at forward.c:799
#8 0x000000000049a5ba in receive_msg (buf=<value optimized out>, len=1251, rcv_info=0x7fffffffe3a0) at receive.c:270
#9 0x00000000005281a6 in udp_rcv_loop () at udp_server.c:544
#10 0x0000000000464d3a in main_loop () at main.c:1638
#11 0x0000000000467a6c in main (argc=<value optimized out>, argv=<value optimized out>) at main.c:2566
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=300
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#299 - modules/debugger: be able to log assign actions
User who did this - Daniel-Constantin Mierla (miconda)
----------
The third patch iterates only on the first items of pv cache slots. There has to be a loop (while/for) inside the exiting FOR to go through all items in a cache slot (via ->next).
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299#comment907
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#299 - modules/debugger: be able to log assign actions
User who did this - Daniel-Constantin Mierla (miconda)
----------
This one in first patch is still wrong:
@@ -2636,7 +2634,8 @@ avp_pvar: AVP_OR_PVAR {
}
memset(lval_tmp, 0, sizeof(*lval_tmp));
s_tmp.s=$1; s_tmp.len=strlen(s_tmp.s);
- if (pv_parse_spec2(&s_tmp, &lval_tmp->lv.pvs, 1)==0){
+ lval_tmp->lv.pvs = pv_cache_get(&s_tmp);
+ if (pv_parse_spec2(&s_tmp, lval_tmp->lv.pvs, 1)==0){
/* not a pvar, try avps */
No need for:
+ if (pv_parse_spec2(&s_tmp, lval_tmp->lv.pvs, 1)==0){
The condition should be:
if(lval_tmp->lv.pvs == NULL) {
So, if pv not found in cache, then try avp.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299#comment906
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#299 - modules/debugger: be able to log assign actions
User who did this - Víctor Seva (linuxmaniac)
----------
Patches refreshed. I merged the previous two first ones.
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299#comment905
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#299 - modules/debugger: be able to log assign actions
User who did this - Daniel-Constantin Mierla (miconda)
----------
Looks like it is that one. Maybe you can generate a new set of clean patches, because patches to patches are hard to track.
If it is avp, the result from pv cache should be NULL, nothing to free. Anyhow, never free a the result from cache, it is there with a purpose -- allocated once, used by many -- if you free it, you screw the many others.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299#comment904
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#299 - modules/debugger: be able to log assign actions
User who did this - Víctor Seva (linuxmaniac)
----------
Is this what you are talking about? (Changes on the attached file)
If it's an avp. Should I pgk_free the result from the previous pv_cache_get() call?
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299#comment903
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#299 - modules/debugger: be able to log assign actions
User who did this - Daniel-Constantin Mierla (miconda)
----------
I could spot some mallocs for pv_spec_t in the core as well as writing over a pointer returned from cache (which is really broken if happens like that, maybe I misunderstood).
The interpreter should just get the pointer from cache, if no result, try AVP (if enabled in this way). But no alloc or overwriting the content returned from cache query.
----------
More information can be found at the following URL:
https://sip-router.org/tracker/index.php?do=details&task_id=299#comment902
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.
Víctor Seva has taken ownership of the following task:
FS#299 - modules/debugger: be able to log assign actions
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299
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 - Víctor Seva (linuxmaniac)
Attached to Project - sip-router
Summary - modules/debugger: be able to log assign actions
Task Type - Feature Request
Category - Module
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Low
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - Implementing the idea:
"From what Andreas suggesting, printing the value of variables as they
are assigned is missing, probably can be added by hooking in the
interpreter when doing the assignment operation." [0]
[0] http://lists.sip-router.org/pipermail/sr-users/2013-April/077628.html
I had to change some things on core to be able to get this working:
- lvalue.[c/h]: from pv_spec_t to pv_spec_t* ( in order to be able to search for the name of a var with the pointer)
- cfg.y: use pv_cache_get() to get the pv_spec_t*
- lvalue.[c/h]: add callback to log_assign
- pvapi.c|pvar.h: add helper function pv_cache_get_name(pv_spec_t*) to get the name of a pvar on cache
Please, review if these changes are the right thing to do in this case.
On module debugger there is a cache of logged vars in order to not call pv_cache_get_name() over a over again.
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=299
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.