Module: kamailio
Branch: master
Commit: e017abac3e5cb08370b9fdc8991782a103980759
URL: https://github.com/kamailio/kamailio/commit/e017abac3e5cb08370b9fdc8991782a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-01-16T16:34:54+01:00
core: github issue template - sections for log messages and sip traffic
---
Modified: .github/ISSUE_TEMPLATE.md
---
Diff: https://github.com/kamailio/kamailio/commit/e017abac3e5cb08370b9fdc8991782a…
Patch: https://github.com/kamailio/kamailio/commit/e017abac3e5cb08370b9fdc8991782a…
---
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index bd6b5e0..4b2019e 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -17,6 +17,8 @@ developers to troubleshoot the issue.
If you submit a feature request (or enhancement), you can delete the text of
the template and only add the description of what you would like to be added.
+If there is no content to be filled in a section, the entire section can be removed.
+
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
@@ -30,14 +32,15 @@ Explain what you did, what you expected to happen, and what actually happened.
### Troubleshooting
-<!--
-
#### Reproduction
+<!--
If the issue can be reproduced, describe how it can be done.
+-->
-#### Backtrace
+#### Debugging Data
+<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
@@ -46,10 +49,34 @@ local variables and the list of the code at the issue location.
info locals
list
-If you are familiar with gdb, feel free to attach more of what you condier to
+If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
+```
+(paste your debugging data here)
+```
+
+#### Log Messages
+
+<!--
+Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
+-->
+
+```
+(paste your log messages here)
+```
+
+#### SIP Traffic
+
+<!--
+If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
+-->
+
+```
+(paste your sip traffic here)
+```
+
### Possible Solutions
<!--
Module: kamailio
Branch: master
Commit: 1c1d14c1a07babc5b8f3572d889ca980d9ae70d8
URL: https://github.com/kamailio/kamailio/commit/1c1d14c1a07babc5b8f3572d889ca98…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-01-16T16:17:53+01:00
core: added github new issue template
---
Added: .github/ISSUE_TEMPLATE.md
---
Diff: https://github.com/kamailio/kamailio/commit/1c1d14c1a07babc5b8f3572d889ca98…
Patch: https://github.com/kamailio/kamailio/commit/1c1d14c1a07babc5b8f3572d889ca98…
---
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..6118884
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,76 @@
+<!--
+Kamailio Project uses GitHub Issues only for bugs in the code or feature requests.
+
+If you have questions about using Kamailio or related to its configuration file,
+ask on sr-users mailing list:
+
+ * http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
+
+If you have questions about developing extensions to Kamailio or its existing
+C code, ask on sr-dev mailing list
+
+ * http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
+
+Please try to fill this template as much as possible for any issue. It helps the
+developers to troubleshoot the issue.
+
+If you submit a feature request (or enhancement), you can delete the text of
+the template and only add the description of what you would like to be added.
+
+You can delete the comments from the template sections when filling.
+
+You can delete next line and everything above before submitting (it is a comment).
+-->
+
+### Description
+
+<!--
+Explain what you did, what you expected to happen, and what actually happened.
+-->
+
+### Troubleshooting
+
+<!--
+
+#### Reproduction
+
+If the issue can be reproduced, describe how it can be done.
+
+#### Backtrace
+
+If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
+local variables and the list of the code at the issue location.
+
+ gdb /path/to/kamailio /path/to/corefile
+ bt full
+ info locals
+ list
+
+If you are familiar with gdb, feel free to attach more of what you condier to
+be relevant.
+-->
+
+### Possible Solutions
+
+<!--
+If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
+-->
+
+### Additional Information
+
+ * **Kamailio Version** - output of `kamailio -v`
+
+```
+(paste your output here)
+```
+
+* **Operating System**:
+
+<!--
+Details about the operating system, the type: tMacOS, Linux, xBSD, Solaris, ...;
+Kernel details (output of `uname -a`)
+-->
+
+```
+(paste your output here)
+```
Greetings all,
I'm currently investigating a crash in a Kamailio 4.1.3 deployment. The
backtrace is as follows:
(I've commented out phone numbers and IP addresses using X but have
retained the correct length for each)
(gdb) bt
#0 0x00007f017f2ac96e in memcpy () from /lib64/libc.so.6
#1 0x00007f0174e1bb50 in rc_avpair_assign () from
/usr/lib64/libradiusclient-ng.so.2
#2 0x00007f0174e1bc92 in rc_avpair_new () from
/usr/lib64/libradiusclient-ng.so.2
#3 0x00007f0174e1bdd1 in rc_avpair_add () from
/usr/lib64/libradiusclient-ng.so.2
#4 0x00007f0175026806 in acc_radius_send_request (req=0x7f0162b6c1f0,
inf=0x7fff113e9cc0) at acc_radius_mod.c:365
#5 0x00007f017522ff13 in acc_run_engines (msg=0x7f0162b6c1f0, type=0,
reset=0x0) at acc.c:957
#6 0x00007f0175239b49 in acc_onreply (t=0x7f0161a12f00,
req=0x7f0162b6c1f0, reply=0x7f017ca845c8, code=200) at acc_logic.c:485
#7 0x00007f017523a07d in tmcb_func (t=0x7f0161a12f00, type=512,
ps=0x7fff113e9ee0) at acc_logic.c:559
#8 0x00007f0177434478 in run_trans_callbacks_internal
(cb_lst=0x7f0161a12f70, type=512, trans=0x7f0161a12f00,
params=0x7fff113e9ee0) at t_hooks.c:290
#9 0x00007f017743468a in run_trans_callbacks_with_buf (type=512,
rbuf=0x7f0161a12fc0, req=0x7f0162b6c1f0, repl=0x7f017ca845c8, flags=200)
at t_hooks.c:336
#10 0x00007f0177466c06 in relay_reply (t=0x7f0161a12f00,
p_msg=0x7f017ca845c8, branch=0, msg_status=200,
cancel_data=0x7fff113ea240, do_put_on_wait=1)
at t_reply.c:2001
#11 0x00007f01774690b7 in reply_received (p_msg=0x7f017ca845c8) at
t_reply.c:2499
#12 0x000000000045d837 in do_forward_reply (msg=0x7f017ca845c8, mode=0)
at forward.c:777
#13 0x000000000045e0f8 in forward_reply (msg=0x7f017ca845c8) at
forward.c:860
#14 0x00000000004a5887 in receive_msg (
buf=0x9245e0 "SIP/2.0 200 OK\r\nVia: SIP/2.0/UDP
X.XX.XX.XX:5060;rport=5060;received=X.XX.XX.XX;branch=z9hG4bK9981.5d2e8535c8eb94d43283f83230b5011e.0\r\nVia:
SIP/2.0/UDP X.XX.XX.XX;rport=5060;branch=z9hG4bK9981.78d8b40"...,
len=1161, rcv_info=0x7fff113ea5c0) at receive.c:273
#15 0x000000000053c838 in udp_rcv_loop () at udp_server.c:536
#16 0x000000000046d42b in main_loop () at main.c:1617
#17 0x00000000004704d3 in main (argc=11, argv=0x7fff113ea8f8) at
main.c:2533
As you can see it's crashing when interacting with the radius client.
Looking at frame 4 we can examine what is being provided to radius:
(gdb) frame 4
#4 0x00007f0175026806 in acc_radius_send_request (req=0x7f0162b6c1f0,
inf=0x7fff113e9cc0) at acc_radius_mod.c:365
365 ADD_RAD_AVPAIR(offset+i, inf->varr[i].s,
inf->varr[i].len);
(gdb) print inf->varr[i].s
$12 = 0x0
(gdb) print inf->varr[i].len
$13 = 3
(gdb) print inf->tarr[i]
$14 = 2 '\002'
This is a TYPE_STR with a length of 3, but no actual string. Needless to
say this upsets radius. Based on the configuration of the system and the
value of 'i' this is actually for the Remote-Party-ID header:
(gdb) print i
$15 = 8
(gdb) print *rad_extra->next->next->next->next
$16 = {name = {s = 0x7f017b27fcf4 "Sip-RPid", len = 8}, spec = {type =
PVT_OTHER, getf = 0x7f0176b79883 <pv_get_rpid>, setf = 0, pvp = {pvn =
{type = 0,
nfree = 0, u = {isname = {type = 0, name = {n = 0, s = {s = 0x0,
len = 0}, re = 0x0}}, dname = 0x0}}, pvi = {type = 0, u = {ival
= 0, dval = 0x0}}},
trans = 0x0}, next = 0x7f017b3ae4b0}
Going up a frame and looking at the RPID URI on the message it matches
the bad TYPE_STR:
(gdb) frame 5
#5 0x00007f017522ff13 in acc_run_engines (msg=0x7f0162b6c1f0, type=0,
reset=0x0) at acc.c:957
957 e->acc_req(msg, &inf);
(gdb) print ((struct to_body*)(msg)->rpid->parsed)->uri
$17 = {s = 0x0, len = 3}
And digging into the full parsed information shows that it's not correct
at all:
(gdb) print *((struct to_body*)(msg)->rpid->parsed)
$30 = {error = 3, body = {s = 0x0, len = 11064280}, uri = {s = 0x0, len
= 3}, display = {s = 0x0, len = 11064313}, tag_value = {s = 0x0, len =
5},
parsed_uri = {user = {s = 0x0, len = 1484108237}, passwd = {s = 0x0,
len = 2}, host = {s = 0x0, len = 0}, port = {s = 0x0, len = 3}, params
= {s = 0x0,
len = 11064395}, sip_params = {s = 0x0, len = 0}, headers = {s =
0x0, len = 8619}, port_no = 0, proto = 0, type = ERROR_URI_T,
flags = 0, transport = {
s = 0x0, len = 0}, ttl = {s = 0x0, len = 0}, user_param = {s =
0x0, len = 192}, maddr = {s = 0x0, len = 3}, method = {s = 0x0,
len = 11064439}, lr = {
s = 0x0, len = 3}, r2 = {s = 0x0, len = 11064464}, gr = {s = 0x0,
len = 3}, transport_val = {s = 0x0, len = 2039735278}, ttl_val =
{s = 0x0, len = 3},
user_param_val = {s = 0x0, len = 11064487}, maddr_val = {s = 0x0,
len = 0}, method_val = {s = 0x0, len = 16367}, lr_val = {s = 0x0,
len = 5}, r2_val = {
s = 0x0, len = 1484104637}, gr_val = {s = 0x0, len = 3}},
param_lst = 0x0, last_param = 0xa8d4d6}
Looking at the actual Remote-Party-ID header on the other hand itself
shows nothing out of the ordinary:
(gdb) print *msg->rpid
$18 = {type = HDR_RPID_T, name = {
s = 0x7f0162b6cba0 "Remote-Party-ID:
<sip:XXXXXXXXXX@XXX.XX.XX.XX:5060>;privacy=off\r\nP-Charge-Info:
sip:XXXXXXXXXX@XXX.XX.XX.XX:5060\r\nSupported:
timer,replaces\r\nSession-Expires: 3600\r\nMin-SE:
90\r\nContent-Length: 260\r\nCo"..., len = 15}, body = {
s = 0x7f0162b6cbb1
"<sip:XXXXXXXXXX@XXX.XX.XX.XX:5060>;privacy=off\r\nP-Charge-Info:
sip:XXXXXXXXXX@XXX.XX.XX.XX:5060\r\nSupported:
timer,replaces\r\nSession-Expires: 3600\r\nMin-SE:
90\r\nContent-Length: 260\r\nContent-Disposition"..., len = 46},
len = 65, parsed = 0x7f017b33c710, next = 0x7f0162b6d720}
I should also add that the value before and after RPID appears to be
correct:
(gdb) print inf->varr[i-1].s
$24 = 0x7f0161ce8427 "sip:XXXXXXXXXX@X.XX.XX.XXX:5060
SIP/2.0\r\nRecord-Route:
<sip:X.XX.XX.XX;lr=on;ftag=gK0c7f2820;did=438.50e1>\r\nRecord-Route:
<sip:X.XX.XX.XX;lr=on;did=ee5.4da5ae1>\r\nVia: SIP/2.0/UDP
X.XX.XX.XX:5060;branc"...
(gdb) print inf->varr[i-1].len
$25 = 31
(gdb) print inf->varr[i+1].s
$26 = 0x7f0176dbe720 "X.XX.XX.XX"
(gdb) print inf->varr[i+1].len
$27 = 10
Has anyone seen anything like this before or have a suggestion on where
to look further? I've traced through the code in question and it all
seems to be correct.
Thanks a lot,
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
Fixes out-of-sequence version when subs_db_mode <> 3 and fast_notify is enabled.
Version is incremented only when copy is updated in memory. Therefore, currently:
On SUBSCRIBE, subscription is updated first, so NOTIFY body contains newly incremented version.
But on PUBLISH, aux_body_processing is called first, so NOTIFY body contains previously stored version.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/917
-- Commit Summary --
* presence: delay aux_body_processing until after subscription has been updated
-- File Changes --
M src/modules/presence/notify.c (42)
M src/modules/presence/notify.h (2)
M src/modules/presence/presence.c (2)
M src/modules/presence/subscribe.c (8)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/917.patchhttps://github.com/kamailio/kamailio/pull/917.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/917
Module: kamailio
Branch: master
Commit: e6654da5fe8c828945d53cc86f23c8d70b58bb99
URL: https://github.com/kamailio/kamailio/commit/e6654da5fe8c828945d53cc86f23c8d…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2017-01-16T11:18:01+01:00
ims_registrar_scscf: fix compiler warnings
> registrar_notify.c:1528:43: warning: 'param_3gpp_icsi_ref' is static but used in inline function 'supported_param' which is not static
> } else if (strncasecmp(param_name->s, param_3gpp_icsi_ref.s, param_name->len) == 0) {
> ^~~~~~~~~~~~~~~~~~~
> registrar_notify.c:1526:43: warning: 'param_3gpp_smsip' is static but used in inline function 'supported_param' which is not static
> } else if (strncasecmp(param_name->s, param_3gpp_smsip.s, param_name->len) == 0) {
> ^~~~~~~~~~~~~~~~
> registrar_notify.c:1524:43: warning: 'param_sip_instance' is static but used in inline function 'supported_param' which is not static
> } else if (strncasecmp(param_name->s, param_sip_instance.s, param_name->len) == 0) {
> ^~~~~~~~~~~~~~~~~~
> registrar_notify.c:1522:43: warning: 'param_expires' is static but used in inline function 'supported_param' which is not static
> } else if (strncasecmp(param_name->s, param_expires.s, param_name->len) == 0) {
> ^~~~~~~~~~~~~
> registrar_notify.c:1520:43: warning: 'param_video' is static but used in inline function 'supported_param' which is not static
> } else if (strncasecmp(param_name->s, param_video.s, param_name->len) == 0) {
> ^~~~~~~~~~~
> registrar_notify.c:1518:36: warning: 'param_q' is static but used in inline function 'supported_param' which is not static
> if (strncasecmp(param_name->s, param_q.s, param_name->len) == 0) {
> ^~~~~~~
---
Modified: src/modules/ims_registrar_scscf/registrar_notify.c
---
Diff: https://github.com/kamailio/kamailio/commit/e6654da5fe8c828945d53cc86f23c8d…
Patch: https://github.com/kamailio/kamailio/commit/e6654da5fe8c828945d53cc86f23c8d…
---
diff --git a/src/modules/ims_registrar_scscf/registrar_notify.c b/src/modules/ims_registrar_scscf/registrar_notify.c
index 61e1430..fb95bb9 100644
--- a/src/modules/ims_registrar_scscf/registrar_notify.c
+++ b/src/modules/ims_registrar_scscf/registrar_notify.c
@@ -1513,7 +1513,7 @@ static str param_sip_instance = {"+sip.instance", 13};
static str param_3gpp_smsip = {"+g.3gpp.smsip", 13};
static str param_3gpp_icsi_ref = {"+g.3gpp.icsi-ref", 16};
-int inline supported_param(str *param_name) {
+static int inline supported_param(str *param_name) {
if (strncasecmp(param_name->s, param_q.s, param_name->len) == 0) {
return 0;