Module: kamailio
Branch: master
Commit: 1ec6964249dc5db4bd69c612b626466cae896c41
URL: https://github.com/kamailio/kamailio/commit/1ec6964249dc5db4bd69c612b626466…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-11T15:37:33+02:00
core: main.c - updates for shm unlock in shutdown cleanup
- test if shm was initialized before global unlock
---
Modified: src/main.c
---
Diff: https://github.com/kamailio/kamailio/commit/1ec6964249dc5db4bd69c612b626466…
Patch: https://github.com/kamailio/kamailio/commit/1ec6964249dc5db4bd69c612b626466…
---
diff --git a/src/main.c b/src/main.c
index a98a35693f..b65b0020ca 100644
--- a/src/main.c
+++ b/src/main.c
@@ -518,10 +518,11 @@ void cleanup(int show_status)
/*clean-up*/
#ifndef SHM_SAFE_MALLOC
- if (_shm_lock)
- shm_unlock(); /* hack: force-unlock the shared memory lock in case
- some process crashed and let it locked; this will
- allow an almost gracious shutdown */
+ if(shm_initialized()) {
+ /* force-unlock the shared memory lock in case some process crashed
+ * and let it locked; this will allow an almost gracious shutdown */
+ shm_global_unlock();
+ }
#endif
destroy_rpcs();
destroy_modules();
### Description
Kamailio suddenly stops working (this is a production server so debug logging is disabled), when we restart it a core is generated and a segfault is logged.
### Troubleshooting
The only thing I have seen is some reference to IPv6 in the backtrace. But no idea where to start looking. I'm pretty sure we will need more information, but I don't know how to read or understand backtraces, please let me know what you see in it so I can dig deeper into this problem.
#### Reproduction
I don't know how to reproduce yet, first I have to understand the cause.
#### Debugging Data
Backtrace:
```
[New LWP 12052]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f /etc/kamailio/sbc.cfg -'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007efcf3b5df69 in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
#0 0x00007efcf3b5df69 in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
No symbol table info available.
#1 0x00007efcf3b5e234 in OPENSSL_cleanup () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
No symbol table info available.
#2 0x00007efcf7721910 in __run_exit_handlers (status=0, listp=0x7efcf7a855d8 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:83
atfct = <optimized out>
onfct = <optimized out>
cxafct = <optimized out>
f = <optimized out>
#3 0x00007efcf772196a in __GI_exit (status=<optimized out>) at exit.c:105
No locals.
#4 0x000055f0a9483d54 in handle_sigs () at main.c:699
chld = 845005216
chld_status = 845005248
any_chld_stopped = 32766
memlog = 0
__func__ = "handle_sigs"
#5 0x000055f0a948ea43 in main_loop () at main.c:1758
i = 8
pid = 12091
si = 0x0
si_desc = "udp receiver child=7 sock=[2602:FF37:0:1:0:0:C601:377A]:5060\000\367v\215\200\262+\363\372~\000\000\025\067\236\003\000\000\000\000\300\017H\251\360U\000\000\340\305]2\376\177", '\000' <repeats 18 times>, "\020\303]2\376\177\000\000a\202g\251\360U\000"
nrprocs = 8
woneinit = 1
__func__ = "main_loop"
#6 0x000055f0a9494fb9 in main (argc=13, argv=0x7ffe325dc5e8) at main.c:2646
cfg_stream = 0x55f0aa7fb010
c = -1
r = 0
tmp = 0x7ffe325dceb6 ""
tmp_len = -133383536
port = 32508
proto = 845006016
options = 0x55f0a97d80e8 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 3679304743
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0x0
p = 0xffffffff <error: Cannot access memory at address 0xffffffff>
st = {st_dev = 19, st_ino = 14769, st_nlink = 2, st_mode = 16832, st_uid = 109, st_gid = 113, __pad0 = 0, st_rdev = 0, st_size = 40, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1498523393, tv_nsec = 731915583}, st_mtim = {tv_sec = 1498533865, tv_nsec = 274210743}, st_ctim = {tv_sec = 1498533865, tv_nsec = 274210743}, __glibc_reserved = {0, 0, 0}}
__func__ = "main"
```
Info locals:
```
[New LWP 12052]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f /etc/kamailio/sbc.cfg -'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007efcf3b5df69 in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
No symbol table info available.
```
List:
```
[New LWP 12052]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -f /etc/kamailio/sbc.cfg -'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007efcf3b5df69 in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
```
#### Log Messages
We have regular logging with no issues, then suddenly we get:
```
Jun 28 01:57:51 kam-1 sbc[12075]: WARNING: <script>: [DISPATCHER] - Destination down: OPTIONS sip:A.A.A.A:5060 (<null>)
Jun 28 01:57:51 kam-1 sbc[12075]: WARNING: <script>: [DISPATCHER] - Destination down: OPTIONS sip:B.B.B.B:5060 (<null>)
Jun 28 01:58:40 kam-1 sbc[12076]: NOTICE: <script>: Node unavailable, trying next sip:A.A.A.A:5060 - M=INVITE R=sip:+12345678900@A.A.A.A:5060 ID=334f3vqDtj
Jun 28 01:58:40 kam-1 sbc[12076]: NOTICE: <script>: Forwarding request - M=INVITE R=sip:+12345678900@A.A.A.A:5060 ID=334f3vqDtj
Jun 28 01:58:55 kam-1 sbc[12075]: WARNING: dialog [dlg_handlers.c:1574]: dlg_ontimeout(): timeout for dlg with CallID '00g4gNy5KZ' and tags 'FHmrD-CM3' 'SZ3a5Sg58c5pB'
Jun 28 01:58:55 kam-1 sbc[12075]: WARNING: dialog [dlg_handlers.c:1574]: dlg_ontimeout(): timeout for dlg with CallID 'Kj7uLRzJfd' and tags 'wRSVjfGaT' 'yQHvjNaZ5Z3rc'
Jun 28 01:58:55 kam-1 sbc[12075]: WARNING: dialog [dlg_handlers.c:1574]: dlg_ontimeout(): timeout for dlg with CallID 'S5QUIXtS6-' and tags 'FV4ySEouz' 'eS7F910ycNg8H'
Jun 28 01:59:10 kam-1 sbc[12075]: ERROR: <script>: No available gateways - M=INVITE R=sip:+12345678900@B.B.B.B:5060 ID=334f3vqDtj
Jun 28 02:01:45 kam-1 sbc[12080]: NOTICE: dialog [dlg_hash.c:248]: dlg_clean_run(): dialog in delete state is too old (0x7efaf3904008 ref 1)
Jun 28 02:03:15 kam-1 sbc[12080]: NOTICE: dialog [dlg_hash.c:248]: dlg_clean_run(): dialog in delete state is too old (0x7efaf40f0f50 ref 1)
Jun 28 02:04:45 kam-1 sbc[12080]: NOTICE: dialog [dlg_hash.c:248]: dlg_clean_run(): dialog in delete state is too old (0x7efaf4d92108 ref 1)
Jun 28 02:55:59 kam-1 sbc[12071]: INFO: <core> [main.c:823]: sig_usr(): signal 15 received
Jun 28 02:55:59 kam-1 sbc[12052]: NOTICE: <core> [main.c:696]: handle_sigs(): Thank you for flying kamailio!!!
```
NOTE: The process stops logging at 02:04:45, then at 02:55:59 we manually restart kamailio and a core is generated.
Also, in `dmesg` we have:
```
[138953.744199] kamailio[12052]: segfault at 7efaf32f51b8 ip 00007efcf3b5df69 sp 00007ffe325dc0c0 error 4 in libcrypto.so.1.1[7efcf39f6000+265000]
```
#### SIP Traffic
I don't have sip traffic, If required I can start capturing it.
### Additional Information
```
# kamailio -v
version: kamailio 5.0.2 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 6.3.0
#
```
```
# dpkg -l | grep kamailio
ii kamailio 5.0.2+stretch amd64 very fast, dynamic and configurable SIP server
ii kamailio-dbg:amd64 5.0.2+stretch amd64 very fast and configurable SIP server [debug symbols]
ii kamailio-extra-modules:amd64 5.0.2+stretch amd64 Extra modules for the Kamailio SIP Server
ii kamailio-tls-modules:amd64 5.0.2+stretch amd64 TLS support for the Kamailio SIP server (authentication, transport)
#
```
```
# dpkg -l |grep libssl
ii libssl1.0.2:amd64 1.0.2l-2 amd64 Secure Sockets Layer toolkit - shared libraries
ii libssl1.1:amd64 1.1.0f-3 amd64 Secure Sockets Layer toolkit - shared libraries#
```
* **Operating System**:
```
# uname -a
Linux kam-1 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u1 (2017-06-18) x86_64 GNU/Linux
```
```
# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.0 (stretch)
Release: 9.0
Codename: stretch
#
```
--
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/issues/1172
Module: kamailio
Branch: master
Commit: 10be086500d37d19674235b04cb302a0f34983fc
URL: https://github.com/kamailio/kamailio/commit/10be086500d37d19674235b04cb302a…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-08-10T13:01:57+02:00
modules: readme files regenerated - carrierroute ... [skip ci]
---
Modified: src/modules/carrierroute/README
---
Diff: https://github.com/kamailio/kamailio/commit/10be086500d37d19674235b04cb302a…
Patch: https://github.com/kamailio/kamailio/commit/10be086500d37d19674235b04cb302a…
---
diff --git a/src/modules/carrierroute/README b/src/modules/carrierroute/README
index b766dac0fb..633c63e0d6 100644
--- a/src/modules/carrierroute/README
+++ b/src/modules/carrierroute/README
@@ -578,8 +578,8 @@ descavp)
contiguous range starting at 1, limited by the configuration
parameter max_targets. Possible values for hash_source are:
call_id, from_uri, from_user, to_uri, to_user and rand
- * decsavp - Name of the AVP where to store the description. This
- parameter is optional.
+ * decsavp - AVP where to store the description. This parameter is
+ optional.
4.3. cr_nofallback_route(carrier, domain, prefix_matching, rewrite_user,
hash_source, descavp)
Module: kamailio
Branch: master
Commit: bc3666ba9ff46fbaafa97483d5c9ee2f574a2d2c
URL: https://github.com/kamailio/kamailio/commit/bc3666ba9ff46fbaafa97483d5c9ee2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2017-08-10T13:00:57+02:00
Merge pull request #1211 from dunst0/fix/carrierroute-README
carrierroute: update to readme to precise that decsavp need to be an avp
---
Modified: src/modules/carrierroute/doc/carrierroute_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/bc3666ba9ff46fbaafa97483d5c9ee2…
Patch: https://github.com/kamailio/kamailio/commit/bc3666ba9ff46fbaafa97483d5c9ee2…
---
diff --git a/src/modules/carrierroute/doc/carrierroute_admin.xml b/src/modules/carrierroute/doc/carrierroute_admin.xml
index 7d11d5365b..ecebcee57a 100644
--- a/src/modules/carrierroute/doc/carrierroute_admin.xml
+++ b/src/modules/carrierroute/doc/carrierroute_admin.xml
@@ -514,7 +514,7 @@ cr_tree_rewrite_uri(tree, domain)
</para>
</listitem>
<listitem>
- <para><emphasis>decsavp</emphasis> - Name of the AVP where to store the description.
+ <para><emphasis>decsavp</emphasis> - AVP where to store the description.
This parameter is optional.
</para>
</listitem>
Module: kamailio
Branch: master
Commit: 5328dc6d511a57ef47600f2724813124e082e53e
URL: https://github.com/kamailio/kamailio/commit/5328dc6d511a57ef47600f272481312…
Author: Rick Barenthin <dunst0(a)gmail.com>
Committer: Rick Barenthin <dunst0(a)gmail.com>
Date: 2017-08-10T11:31:30+02:00
carrierroute: update to readme to precise that decsavp need to be an avp
---
Modified: src/modules/carrierroute/doc/carrierroute_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/5328dc6d511a57ef47600f272481312…
Patch: https://github.com/kamailio/kamailio/commit/5328dc6d511a57ef47600f272481312…
---
diff --git a/src/modules/carrierroute/doc/carrierroute_admin.xml b/src/modules/carrierroute/doc/carrierroute_admin.xml
index 7d11d5365b..ecebcee57a 100644
--- a/src/modules/carrierroute/doc/carrierroute_admin.xml
+++ b/src/modules/carrierroute/doc/carrierroute_admin.xml
@@ -514,7 +514,7 @@ cr_tree_rewrite_uri(tree, domain)
</para>
</listitem>
<listitem>
- <para><emphasis>decsavp</emphasis> - Name of the AVP where to store the description.
+ <para><emphasis>decsavp</emphasis> - AVP where to store the description.
This parameter is optional.
</para>
</listitem>
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [x] Related to issue #1210 (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Make documentation of parameters description more clear that it has to be an avp not just the name.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1211
-- Commit Summary --
* carrierroute: update to readme to precise that decsavp need to be an avp
-- File Changes --
M src/modules/carrierroute/doc/carrierroute_admin.xml (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1211.patchhttps://github.com/kamailio/kamailio/pull/1211.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/1211
<!--
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.
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).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
I tried to configure the carrierroute module with the description loaded from the database into an avp. But it crashes with a segfault while startup.
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
```
/* ----- carrierroute params ----------------------------------------------- */
modparam("carrierroute", "config_source", "db")
modparam("carrierroute", "db_url", ....)
modparam("carrierroute", "fetch_rows", 2000)
modparam("carrierroute", "db_load_description", 1)
modparam("carrierroute", "match_mode", 10)
modparam("carrierroute", "avoid_failed_destinations", 1)
```
```
if (cr_route("default", "default", "$(rU{s.strip,1})", "$rU", "call_id", "destination")) {
....
}
```
#### 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.
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 consider to
be relevant.
-->
```
#0 avp_name_fixup (param=0x8018d1330) at cr_fixup.c:187
187 if (((gparam_p)(*param))->v.pve->spec->type == PVT_AVP &&
[New Thread 80165a600 (LWP 100186/<unknown>)]
(gdb) bt full
#0 avp_name_fixup (param=0x8018d1330) at cr_fixup.c:187
No locals.
#1 0x00000008072f0256 in cr_route_fixup (param=0x8018d1330, param_no=6) at cr_fixup.c:242
my_hash_source = shs_call_id
#2 0x000000000073238e in fix_actions (a=0x8018d1258) at core/route.c:919
t = (struct action *) 0x8018d1258
p = (struct proxy_l *) 0xffffffff00000048
tmp = 0x0
tmp_p = (void *) 0x8018d1660
ret = 0
i = 5
cmd = (sr31_cmd_export_t *) 0x80186dcd0
s = {s = 0xffffffff00000000 <Address 0xffffffff00000000 out of bounds>, len = 0}
he = (struct hostent *) 0x4
ip = {af = 4859304, len = 0, u = {addrl = 0x7fffffff9be0, addr32 = 0x7fffffff9be0, addr16 = 0x7fffffff9be0, addr = 0x7fffffff9be0 "?"}}
si = (struct socket_info *) 0x7fffffff9c10
lval = (struct lvalue *) 0xffffffff00000001
rve = (struct rval_expr *) 0x0
err_rve = (struct rval_expr *) 0x1
rve_type = RV_NONE
err_type = 48625432
expected_type = RV_NONE
rv = (struct rvalue *) 0x9b6cf7
rve_param_no = 0
#3 0x000000000068a1c4 in fix_rval (rv=0x8018d36c8, rve=0x8018d36c0) at core/rvalue.c:2873
No locals.
#4 0x000000000068843e in fix_rval_expr (p=0x8018d36c0) at core/rvalue.c:3797
rve = (struct rval_expr *) 0x8018d36c0
ret = 32767
#5 0x000000000072aa08 in fix_actions (a=0x8018c94d0) at core/route.c:706
t = (struct action *) 0x8018d1d18
p = (struct proxy_l *) 0x68341cdd25
tmp = 0x3 <Address 0x3 out of bounds>
tmp_p = (void *) 0x8018cc9c0
ret = 0
i = 1
cmd = (sr31_cmd_export_t *) 0x801869de0
s = {s = 0x8018cc9c0 "", len = 5}
he = (struct hostent *) 0x9b6cf7
ip = {af = 6302080, len = 0, u = {addrl = 0x7fffffffcfc0, addr32 = 0x7fffffffcfc0, addr16 = 0x7fffffffcfc0, addr = 0x7fffffffcfc0 ""}}
si = (struct socket_info *) 0x7fffffffd0a0
lval = (struct lvalue *) 0x800f42023
rve = (struct rval_expr *) 0x8018d36c0
err_rve = (struct rval_expr *) 0x0
rve_type = RV_INT
err_type = 9938251
expected_type = 32767
rv = (struct rvalue *) 0x8018ccf20
rve_param_no = 0
#6 0x000000000073fd6d in fix_rl (rt=0xce3830) at core/route.c:2088
i = 0
ret = -12096
#7 0x000000000073fc37 in fix_rls () at core/route.c:2104
ret = 4
#8 0x000000000043b0ae in main (argc=4, argv=0x7fffffffeb30) at main.c:2635
cfg_stream = (FILE *) 0x8011fdc90
c = -1
r = 1
tmp = 0x800f84aa2 "H\213\vH;M?u\aH\203?([]??\225!??f\017\037\204"
tmp_len = 32767
port = -5424
proto = 0
options = 0x979297 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 2763663412
rfd = 4
debug_save = 3
debug_flag = 1
dont_fork_cnt = 1
n_lst = (struct name_lst *) 0x7fffffffeaa0
p = 0x4 <Address 0x4 out of bounds>
st = {st_dev = 93, st_ino = 160517, st_mode = 16832, st_nlink = 2, st_uid = 986, st_gid = 986, st_rdev = 332063, st_atim = {tv_sec = 1459764184, tv_nsec = 513386000},
st_mtim = {tv_sec = 1502352532, tv_nsec = 990638000}, st_ctim = {tv_sec = 1502352532, tv_nsec = 990638000}, st_size = 512, st_blocks = 8, st_blksize = 32768, st_flags = 0,
st_gen = 3958570559, st_lspare = 0, st_birthtim = {tv_sec = 1459764184, tv_nsec = 513356000}}
Current language: auto; currently minimal
```
#### 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).
-->
```
0(45720) DEBUG: <core> [core/route.c:872]: fix_actions(): fixing cr_route()
0(45720) DEBUG: <core> [core/pvapi.c:419]: pv_spec_lookup(): PV <$(rU{s.strip,1})> is not in cache
0(45720) DEBUG: <core> [core/pvapi.c:293]: pv_cache_add(): pvar [$(rU{s.strip,1})] added in cache
0(45720) DEBUG: <core> [core/pvapi.c:321]: pv_cache_lookup(): pvar [$rU] found in cache
Segmentation fault (core dumped)
```
#### 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).
-->
```
none
```
### 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`
```
# kamailio -v
version: kamailio 5.1.0-dev5 (x86_64/freebsd)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, select, kqueue.
id: unknown
compiled on 16:54:24 Aug 9 2017 with clang 3.8
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
# uname -a
FreeBSD hostname.com 11.0-RELEASE-p9 FreeBSD 11.0-RELEASE-p9 #0: Tue Apr 11 08:48:40 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
```
--
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/issues/1210
Hello,
I just pushed a bit of clean up to acc module, therefore be aware of
following changes:
1) the define conditions on SQL_ACC were removed -- this was enabled for
more than 10 years and only made the code look complex and hard to
follow up its logic.
2) the code related to DIAMETER accounting was relocated to acc_diameter
(new) module. It was a consistent size of code that was not enabled for
sooo... long. It is now a dedicated module, similar to acc_radius. The
diameter accounting code, even a new module now, is in the same stage,
compiling but not tested, in pair with auth_diameter module, it may
work, but very likely not.
In summary, what's important for those using the acc module -- it offers
the same functionality as it was enabled by default in the past 10 years
or more, only the unused code was relocated. It offers the functionality
of writing accounting records to syslog and sql databases.
The acc module is now slimmer, only with the code that it needs,
therefore easier to maintain and enhance for the future.
Hopefully, there was no side effect with this update -- anyhow, if you
find any issue, just open a bug report on github project.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com
Hello,
trying to make the git repository a bit slimmer and avoid unuseful
indexing of unused modules, I am considering to move misc/obsolete to
its own github repository (planned to be named kamailio-obsolete). The
initial idea was to keep there modules that were duplicated or no longer
maintained, just in case someone will come later and wants to revive it.
However, iirc, it is more than 4 years and nobody touched them, so very
likely it requires a bit of work to revive any of them, so a fresh
re-import will be the same from an external repository.
If anyone still wants to keep them in the main kamailio repository,
respond on the mailing list and present the benefits. If not, I will do
the operation in the next several days.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com
Module: kamailio
Branch: master
Commit: 8deecb1aef4ee33d12ee0da68bf3585162284820
URL: https://github.com/kamailio/kamailio/commit/8deecb1aef4ee33d12ee0da68bf3585…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-08-09T09:16:30+02:00
modules: readme files regenerated - acc ... [skip ci]
---
Modified: src/modules/acc/README
---
Diff: https://github.com/kamailio/kamailio/commit/8deecb1aef4ee33d12ee0da68bf3585…
Patch: https://github.com/kamailio/kamailio/commit/8deecb1aef4ee33d12ee0da68bf3585…
---
diff --git a/src/modules/acc/README b/src/modules/acc/README
index 07362dd852..581aaca80a 100644
--- a/src/modules/acc/README
+++ b/src/modules/acc/README
@@ -134,7 +134,8 @@ Sven Knoblich
7.1. acc_log_request(comment)
7.2. acc_db_request(comment, table)
- 7.3. acc_diam_request(comment)
+ 7.3. acc_request(comment, table)
+ 7.4. acc_diam_request(comment)
2. Frequently Asked Questions
@@ -192,7 +193,8 @@ Sven Knoblich
1.50. cdr_on_failed
1.51. acc_log_request usage
1.52. acc_db_request usage
- 1.53. acc_diam_request usage
+ 1.53. acc_db_request usage
+ 1.54. acc_diam_request usage
Chapter 1. Admin Guide
@@ -292,7 +294,8 @@ Chapter 1. Admin Guide
7.1. acc_log_request(comment)
7.2. acc_db_request(comment, table)
- 7.3. acc_diam_request(comment)
+ 7.3. acc_request(comment, table)
+ 7.4. acc_diam_request(comment)
1. Overview
@@ -1342,7 +1345,8 @@ modparam("acc", "cdr_on_failed", 0)
7.1. acc_log_request(comment)
7.2. acc_db_request(comment, table)
- 7.3. acc_diam_request(comment)
+ 7.3. acc_request(comment, table)
+ 7.4. acc_diam_request(comment)
7.1. acc_log_request(comment)
@@ -1386,7 +1390,31 @@ acc_db_request("Some comment", "acc_$time(year)_$time(mon)");
acc_db_request("$var(code) Error: $avp(reason)", "SomeTable");
...
-7.3. acc_diam_request(comment)
+7.3. acc_request(comment, table)
+
+ Warapper around acc_log_request and acc_db_request functions, writing
+ the accounting record to LOG and DATABASE backends. If “db_url”
+ parameter is not set, the acc record is written only to LOG backend.
+
+ Meaning of the parameters is as follows:
+ * comment - Comment to be used for generating the SIP response code
+ and text fields, if in the format “CODE TEXT”. The CODE should be a
+ valid SIP response code (100..699). The TEXT can be one or many
+ words. If CODE is missing, then 0 is used. The parameter can
+ contain pseudo-variables.
+ * table - Database table to be used. It can contain config variables
+ that are evaluated at runtime.
+
+ This function can be used from ANY_ROUTE.
+
+ Example 1.53. acc_db_request usage
+...
+acc_request("100 Received", "acc");
+acc_request("100 Received", "acc_$time(year)_$time(mon)");
+acc_db_request("$var(code) $avp(reason)", "acc");
+...
+
+7.4. acc_diam_request(comment)
Like acc_log_request, acc_diam_request reports on a request. It reports
to the configured Diameter server.
@@ -1397,7 +1425,7 @@ acc_db_request("$var(code) Error: $avp(reason)", "SomeTable");
This function can be used from ANY_ROUTE.
- Example 1.53. acc_diam_request usage
+ Example 1.54. acc_diam_request usage
...
acc_diam_request("Some comment");
acc_diam_request("$var(code) Error: $avp(reason)");
<!--
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.
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).
-->
### Description
Im using the path module on loadbalancer, the update to the path module, seems to break the default behavior.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
```
/* ----- rr params --------------------------------------------------------- */
/** add value to ;lr param (helps with some UAs) */
modparam("rr", "enable_full_lr", 1)
modparam("rr", "append_fromtag", 1)
/* ----- maxfwd params ----------------------------------------------------- */
modparam("maxfwd", "max_limit", 70)
/* ----- path params ------------------------------------------------------- */
modparam("path", "use_received", 1)
```
#### Debugging Data
#### 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).
-->
```
2(71369) DEBUG: rr [loose.c:85]: is_preloaded(): is_preloaded: Yes
2(71369) DEBUG: <core> [core/socket_info.c:564]: grep_sock_info(): checking if host==us: 12==12 && [x.x.x.126] == [x.x.x.126]
2(71369) DEBUG: <core> [core/socket_info.c:567]: grep_sock_info(): checking if port 5060 (advertise 0) matches port 5060
2(71369) DEBUG: rr [loose.c:788]: after_loose(): Topmost route URI: 'sip:x.x.x.126;lr;received=sip:y.y.y.y:47056%3Btransport%3Dtls' is me
2(71369) DEBUG: <core> [core/parser/msg_parser.c:89]: get_hdr_field(): found end of header
2(71369) DEBUG: rr [loose.c:180]: find_next_route(): No next Route HF found
2(71369) DEBUG: rr [loose.c:813]: after_loose(): No next URI found
2(71369) DEBUG: rr [rr_cb.c:95]: run_rr_callbacks(): callback id 0 entered with <lr;received=sip:y.y.y.y:47056%3Btransport%3Dtls>
2(71369) DEBUG: <core> [core/strutils.c:214]: unescape_user(): unescaped string is <sip:y.y.y.y:47056;transport=tls>
2(71369) DEBUG: path [path.c:424]: path_rr_callback(): setting dst uri: sip:sip:y.y.y.y:47056%3Btranspo
2(71369) DEBUG: pv [pv_core.c:951]: pv_get_useragent(): no User-Agent header
2(71369) DEBUG: rr [loose.c:1068]: check_route_param(): route params checking against [;lr;received=sip:y.y.y.y:47056%3Btransport%3Dtls] (orig: [lr;received=sip:y.y.y.y:47056%3Btransport%3Dtls])
2(71369) DEBUG: rr [loose.c:1073]: check_route_param(): params are <;lr;received=sip:y.y.y.y:47056%3Btransport%3Dtls>
2(71369) DEBUG: tm [t_lookup.c:1302]: t_newtran(): msg id=4 , global msg id=4 , T on entrance=0x0
2(71369) DEBUG: tm [t_lookup.c:459]: t_lookup_request(): start searching: hash=16463, isACK=0
2(71369) DEBUG: tm [t_lookup.c:417]: matching_3261(): RFC3261 transaction matching failed
2(71369) DEBUG: tm [t_lookup.c:641]: t_lookup_request(): no transaction found
2(71369) DEBUG: <core> [core/md5utils.c:67]: MD5StringArray(): MD5 calculated: 076837eff630cf1e80bed191da066432
2(71369) DEBUG: <core> [core/parser/parse_uri.c:1262]: parse_uri(): parse_uri: bad char ':' in state 3 parsed: <sip:sip:y.y.y.y> (21) / <sip:sip:y.y.y.y:47056%3Btranspo> (37)
2(71369) ERROR: tm [./ut.h:245]: uri2dst2(): bad_uri: [sip:sip:y.y.y.y:47056%3Btranspo]
2(71369) ERROR: tm [t_fwd.c:1735]: t_forward_nonack(): failure to add branches
2(71369) DEBUG: tm [t_funcs.c:330]: t_relay_to(): t_forward_nonack returned error -478 (-478)
2(71369) DEBUG: tm [t_funcs.c:348]: t_relay_to(): -478 error reply generation delayed
2(71369) DEBUG: <core> [core/msg_translator.c:159]: check_via_address(): (x.x.x.124, x.x.x.124, 0)
2(71369) ERROR: sl [sl_funcs.c:362]: sl_reply_error(): stateless error reply used: Unresolvable destination (478/SL)
2(71369) DEBUG: <core> [core/receive.c:283]: receive_msg(): request-route executed in: 2594 usec
2(71369) DEBUG: tm [t_lookup.c:1458]: t_unref(): delayed error reply generation(-478)
2(71369) DEBUG: <core> [core/msg_translator.c:159]: check_via_address(): (x.x.x.124, x.x.x.124, 0)
2(71369) DEBUG: tm [t_reply.c:1631]: cleanup_uac_timers(): RETR/FR timers reset
2(71369) DEBUG: tm [t_reply.c:598]: _reply_light(): reply sent out. buf=0x8018e77b0: SIP/2.0 478 Unresolv..., shmem=0x8086bbc30: SIP/2.0 478 Unresolv
2(71369) DEBUG: tm [t_reply.c:608]: _reply_light(): finished
```
#### 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).
-->
```
2017/08/04 10:27:55.690224 x.x.x.124:5060 -> x.x.x.126:5060
OPTIONS sip:user@y.y.y.y:43098;transport=TLS SIP/2.0
Via: SIP/2.0/UDP x.x.x.124:5060;branch=z9hG4bK2840489
Route: <sip:x.x.x.126;lr;received=sip:y.y.y.y:43098%3Btransport%3Dtls>
From: sip:pinger@hostname-xxx;tag=uloc-7c-5982da6d-4c09-11-0-7d68
To: sip:user@y.y.y.y:43098;transport=TLS
Call-ID: 1e57ca12-c3d5f614-8b5c49(a)5.159.56.124
CSeq: 1 OPTIONS
Content-Length: 0
```
### 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`
```
# kamailio -v
version: kamailio 5.1.0-dev5 (x86_64/freebsd)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, select, kqueue.
id: unknown
compiled on 23:35:16 Aug 3 2017 with clang 3.8
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
# uname -a
FreeBSD hostname-xxx 11.0-RELEASE-p9 FreeBSD 11.0-RELEASE-p9 #0: Tue Apr 11 08:48:40 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
```
--
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/issues/1205
### Description
I am currently implementing a dynamic forwarding server in Kamailio. As a logic consequence, I wanted to name it "forward.ng-voice.com" and I added it as an Alias:
alias=forward.ng-voice.com
#### Reproduction
Add any Alias with the "forward" in it's domain-name (e.g. "ims.forward.ng-voice.com" fails too).
#### Log Messages
```
0(20620) CRITICAL: <core> [core/cfg.y:3427]: yyerror_at(): parse error in config file forward.cfg, line 11, column 7-13: syntax error
0(20620) CRITICAL: <core> [core/cfg.y:3427]: yyerror_at(): parse error in config file forward.cfg, line 11, column 7-13: hostname expected
0(20620) CRITICAL: <core> [core/cfg.y:3430]: yyerror_at(): parse error in config file forward.cfg, line 11, column 14:
```
### Possible Solutions
Use a different Domain-Name like "fwd" or "forwarder".
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.1.0-dev5 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 4.9.2
```
* **Operating System**:
Debian 8
--
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/issues/1207