Hello,
I'm runnig kamailio 4.2.0 and using the lookup_branches function from the register module to lookup all branches after a alias_db_lookup. The function seems to work fine but i see the following error in the log file just after the lookup:
INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fe110/0x7fad277fe148) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fcd38/0x7fad277fcd70) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fcd88/0x7fad277fcdc0) - ignore
Code:
alias_db_lookup("dbaliases");
if (!lookup_branches("location")) {
This only happens when i have multiple branches, could this be a error in my script?
Thanks,
Jan
On Monday, November 10, 2014 06:56:08 PM J Hazenberg wrote:
Hello,
I'm runnig kamailio 4.2.0 and using the lookup_branches function from the register module to lookup all branches after a alias_db_lookup. The function seems to work fine but i see the following error in the log file just after the lookup:
INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fe110/0x7fad277fe148) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fcd38/0x7fad277fcd70) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fcd88/0x7fad277fcdc0) - ignore
Code:
alias_db_lookup("dbaliases");
if (!lookup_branches("location")) {
This only happens when i have multiple branches, could this be a error in my script?
Jan, I'm seeing the same error (with Kamailio build from the git master def8d26) when I have multiple branches, though mine is proceeded with a uri2dst2() error:
ERROR: tm [ut.h:272]: uri2dst2(): ERROR: uri2dst: bad_uri: INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7f6717cb7a88/0x7f6717cb7ac0) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7f6717d133a0/0x7f6717d133d8) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7f6717ccb6b0/0x7f6717ccb6e8) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7f6717d11bb0/0x7f6717d11be8) - ignore
Unfortunately, I'm learning Kamailio and trying to work with branch routing and I can't figure out if my script is wrong, or if there's a bug.
My script is as follows:
route[LOCATION] { #!ifdef WITH_SPEEDDIAL # search for short dialing - 2-digit extension if($rU=~"^[0-9][0-9]$") if(sd_lookup("speed_dial")) route(SIPOUT); #!endif
#!ifdef WITH_ALIASDB # search in DB-based aliases if(alias_db_lookup("dbaliases")) { $avp(oexten) = $oU; route(SIPOUT);
} #!endif
if($avp(oexten)==$null) $avp(oexten) = $rU; if(!lookup_branches("location")) { # Save the return code from the lookup function $var(rc_lookup) = $rc;
if(is_method("MESSAGE")) { route(IMC); route(MESSAGEGW); route(MSILO); send_reply("404", "Not Found"); exit; }
# Route to Asterisk if(is_method("INVITE") && !is_subscriber("$ru", "subscriber", "1")) { route(TOASTERISK); exit; }
# Route to VoiceMail route(TOVOICEMAIL); t_newtran(); switch ($var(rc_lookup)) { case -1: case -3: send_reply("404", "Not Found"); exit; case -2: send_reply("405", "Method Not Allowed"); exit; } }
# when routing via usrloc, log the missed calls also if(is_method("INVITE")) { setflag(FLT_ACCMISSED); } }
route[SIPOUT] { if(uri==myself) return;
append_hf("P-hint: outbound\r\n"); route(RELAY); exit; }
On Monday, November 10, 2014 11:35:11 PM Anthony Messina wrote:
On Monday, November 10, 2014 06:56:08 PM J Hazenberg wrote:
Hello,
I'm runnig kamailio 4.2.0 and using the lookup_branches function from the register module to lookup all branches after a alias_db_lookup. The function seems to work fine but i see the following error in the log
file just after the lookup:
INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fe110/0x7fad277fe148) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fcd38/0x7fad277fcd70) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fcd88/0x7fad277fcdc0) - ignore
Code:
alias_db_lookup("dbaliases");
if (!lookup_branches("location")) {
This only happens when i have multiple branches, could this be a error in my script?
Jan, I'm seeing the same error (with Kamailio build from the git master def8d26) when I have multiple branches, though mine is proceeded with a uri2dst2() error:
ERROR: tm [ut.h:272]: uri2dst2(): ERROR: uri2dst: bad_uri: INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7f6717cb7a88/0x7f6717cb7ac0) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7f6717d133a0/0x7f6717d133d8) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7f6717ccb6b0/0x7f6717ccb6e8) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7f6717d11bb0/0x7f6717d11be8) - ignore
And DEBUG output reveals only: kamailio[20384]: 13(20400) DEBUG: <core> [parser/parse_uri.c:1300]: parse_uri(): parse_uri: bad uri, state 0 parsed: < kamailio[20384]: > (4) / < kamailio[20384]: > (36) kamailio[20384]: 13(20400) ERROR: tm [ut.h:272]: uri2dst2(): ERROR: uri2dst: bad_uri:
On Monday, November 10, 2014 11:36:17 PM Anthony Messina wrote:
On Monday, November 10, 2014 11:35:11 PM Anthony Messina wrote:
On Monday, November 10, 2014 06:56:08 PM J Hazenberg wrote:
Hello,
I'm runnig kamailio 4.2.0 and using the lookup_branches function from the register module to lookup all branches after a alias_db_lookup. The function seems to work fine but i see the following error in the log
file just after the lookup:
INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fe110/0x7fad277fe148) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fcd38/0x7fad277fcd70) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fcd88/0x7fad277fcdc0) - ignore
Code:
alias_db_lookup("dbaliases");
if (!lookup_branches("location")) {
This only happens when i have multiple branches, could this be a error in my script?
Jan, I'm seeing the same error (with Kamailio build from the git master def8d26) when I have multiple branches, though mine is proceeded with a
uri2dst2() error:
ERROR: tm [ut.h:272]: uri2dst2(): ERROR: uri2dst: bad_uri: INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7f6717cb7a88/0x7f6717cb7ac0) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7f6717d133a0/0x7f6717d133d8) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7f6717ccb6b0/0x7f6717ccb6e8) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7f6717d11bb0/0x7f6717d11be8) - ignore
And DEBUG output reveals only: kamailio[20384]: 13(20400) DEBUG: <core> [parser/parse_uri.c:1300]: parse_uri(): parse_uri: bad uri, state 0 parsed: < kamailio[20384]: > (4) / < kamailio[20384]: > (36) kamailio[20384]: 13(20400) ERROR: tm [ut.h:272]: uri2dst2(): ERROR: uri2dst: bad_uri:
Here is the debug log from the call. -A
Hello,
looks like there is a double free, which, although is good to find and fix, is normally safe for runtime.
Can you set debug=3 and send all the log messages here?
Cheers, Daniel
On 10/11/14 18:56, J Hazenberg wrote:
Hello,
I'm runnig kamailio 4.2.0 and using the lookup_branches function from the register module to lookup all branches after a alias_db_lookup. The function seems to work fine but i see the following error in the log file just after the lookup:
INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fe110/0x7fad277fe148) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fcd38/0x7fad277fcd70) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fcd88/0x7fad277fcdc0) - ignore
Code:
alias_db_lookup("dbaliases");
if (!lookup_branches("location")) {
This only happens when i have multiple branches, could this be a error in my script?
Thanks,
Jan
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Daniel-Constantin,
Here is the requested debug log.
Cheers,
Jan
Daniel-Constantin Mierla schreef op 2014-11-11 09:29:
Hello,
looks like there is a double free, which, although is good to find and fix, is normally safe for runtime.
Can you set debug=3 and send all the log messages here?
Cheers, Daniel
On 10/11/14 18:56, J Hazenberg wrote:
Hello,
I'm runnig kamailio 4.2.0 and using the lookup_branches function from the register module to lookup all branches after a alias_db_lookup. The function seems to work fine but i see the following error in the log file just after the lookup:
INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fe110/0x7fad277fe148) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fcd38/0x7fad277fcd70) - ignore INFO: <core> [mem/f_malloc.c:599]: fm_free(): freeing a free fragment (0x7fad277fcd88/0x7fad277fcdc0) - ignore
Code:
alias_db_lookup("dbaliases");
if (!lookup_branches("location")) {
This only happens when i have multiple branches, could this be a error in my script?
Thanks,
Jan
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Tuesday, November 11, 2014 09:29:26 AM Daniel-Constantin Mierla wrote:
looks like there is a double free, which, although is good to find and fix, is normally safe for runtime.
Can you set debug=3 and send all the log messages here?
Cheers, Daniel
Daniel, were the logs that we posted of any use?
Unfortunately I didn't have time to analyze -- it may still take a bit, being traveling with a broken laptop.
Cheers, Daniel
On 17/11/14 22:49, Anthony Messina wrote:
On Tuesday, November 11, 2014 09:29:26 AM Daniel-Constantin Mierla wrote:
looks like there is a double free, which, although is good to find and fix, is normally safe for runtime.
Can you set debug=3 and send all the log messages here?
Cheers, Daniel
Daniel, were the logs that we posted of any use?
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
No problem, Daniel. Thanks again for hekping us out. -A
Quoting Daniel-Constantin Mierla miconda@gmail.com:
Unfortunately I didn't have time to analyze -- it may still take a bit, being traveling with a broken laptop.
Cheers, Daniel
On 17/11/14 22:49, Anthony Messina wrote:
On Tuesday, November 11, 2014 09:29:26 AM Daniel-Constantin Mierla wrote:
looks like there is a double free, which, although is good to find and fix, is normally safe for runtime.
Can you set debug=3 and send all the log messages here?
Cheers, Daniel
Daniel, were the logs that we posted of any use?
Hello,
finally got to it -- the double free message is printed when destroying the sip message. Quickly looking at the code, the r-uri, ruid, user-agen and dst-uri (and some other attributes of the first branch, but perhaps not available in that case) are very likely to be freed twice -- I will try to get a fix to it by tomorrow.
Cheers, Daniel
On 18/11/14 15:37, Anthony Messina wrote:
No problem, Daniel. Thanks again for hekping us out. -A
Quoting Daniel-Constantin Mierla miconda@gmail.com:
Unfortunately I didn't have time to analyze -- it may still take a bit, being traveling with a broken laptop.
Cheers, Daniel
On 17/11/14 22:49, Anthony Messina wrote:
On Tuesday, November 11, 2014 09:29:26 AM Daniel-Constantin Mierla wrote:
looks like there is a double free, which, although is good to find and fix, is normally safe for runtime.
Can you set debug=3 and send all the log messages here?
Cheers, Daniel
Daniel, were the logs that we posted of any use?
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Tuesday, November 25, 2014 11:43:36 PM Daniel-Constantin Mierla wrote:
Hello,
finally got to it -- the double free message is printed when destroying the sip message. Quickly looking at the code, the r-uri, ruid, user-agen and dst-uri (and some other attributes of the first branch, but perhaps not available in that case) are very likely to be freed twice -- I will try to get a fix to it by tomorrow.
Cheers, Daniel
Thanks again, Daniel. -A
Hello,
can you give it a try to the patch from next commit?
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9a46223c...
Let me know if all works fine in order to backport.
Cheers, Daniel
On 26/11/14 00:54, Anthony Messina wrote:
On Tuesday, November 25, 2014 11:43:36 PM Daniel-Constantin Mierla wrote:
Hello,
finally got to it -- the double free message is printed when destroying the sip message. Quickly looking at the code, the r-uri, ruid, user-agen and dst-uri (and some other attributes of the first branch, but perhaps not available in that case) are very likely to be freed twice -- I will try to get a fix to it by tomorrow.
Cheers, Daniel
Thanks again, Daniel. -A
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
You fix does seem to resolve the issue. Thank you. -A
On Wednesday, November 26, 2014 04:42:29 PM Daniel-Constantin Mierla wrote:
Hello,
can you give it a try to the patch from next commit?
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9a46223c 077c8d058cdc633563b0d9f14af332ae
Let me know if all works fine in order to backport.
Cheers, Daniel
On 26/11/14 00:54, Anthony Messina wrote: On Tuesday, November 25, 2014 11:43:36 PM Daniel-Constantin Mierla wrote: Hello,
finally got to it -- the double free message is printed when destroying the sip message. Quickly looking at the code, the r-uri, ruid, user-agen and dst-uri (and some other attributes of the first branch, but perhaps not available in that case) are very likely to be freed twice -- I will try to get a fix to it by tomorrow.
Cheers, Daniel
Yes indeed seems to fix the problem. Thanks.
Jan
Anthony Messina schreef op 2014-11-29 19:08:
You fix does seem to resolve the issue. Thank you. -A
On Wednesday, November 26, 2014 04:42:29 PM Daniel-Constantin Mierla wrote:
Hello,
can you give it a try to the patch from next commit?
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9a46223c 077c8d058cdc633563b0d9f14af332ae
Let me know if all works fine in order to backport.
Cheers, Daniel
On 26/11/14 00:54, Anthony Messina wrote: On Tuesday, November 25, 2014 11:43:36 PM Daniel-Constantin Mierla wrote: Hello,
finally got to it -- the double free message is printed when destroying the sip message. Quickly looking at the code, the r-uri, ruid, user-agen and dst-uri (and some other attributes of the first branch, but perhaps not available in that case) are very likely to be freed twice -- I will try to get a fix to it by tomorrow.
Cheers, Daniel
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users