Hi !
This issue appears when ndb_redis module connect to redis via proxy, in my case haproxy.
Haproxy keeps front socket always open, when all backend redis servers become unavailable, haproxy just send RST to front,
redisCommand function in tis case return NULL poiner, redisc_check_auth try to dereference it without NULL checking.
kamailio log:
`kernel: [7250430.508827] kamailio[21749]: segfault at 0 ip 00007f00d7bb106f sp 00007fffc523c620 error 4 in ndb_redis.so[7f00d7b94000+36000]`
gdb:
```
# gdb /usr/sbin/kamailio core
GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/kamailio...(no debugging symbols found)...done.
[New LWP 21752]
[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 /run/kamailio/kamailio.pid -f /etc/kamailio/kamailio.cfg'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f00d7bb106f in redisc_check_auth () from /usr/lib64/kamailio/modules/ndb_redis.so
(gdb) bt
#0 0x00007f00d7bb106f in redisc_check_auth () from /usr/lib64/kamailio/modules/ndb_redis.so
#1 0x00007f00d7b9937a in redisc_init () from /usr/lib64/kamailio/modules/ndb_redis.so
#2 0x00007f00d7bb4300 in print_redis_reply () from /usr/lib64/kamailio/modules/ndb_redis.so
#3 0x0000561825796935 in ?? ()
#4 0x0000561825796550 in ?? ()
#5 0x0000561825796550 in ?? ()
#6 0x0000561825796550 in ?? ()
#7 0x0000561825796550 in ?? ()
#8 0x0000561825796550 in ?? ()
#9 0x0000561825796550 in ?? ()
#10 0x0000561825796550 in ?? ()
#11 0x0000561825796550 in ?? ()
#12 0x0000561825796550 in ?? ()
#13 0x0000561825796550 in ?? ()
#14 0x0000561825796550 in ?? ()
#15 0x0000561825796550 in ?? ()
#16 0x0000561825796550 in ?? ()
#17 0x000056182579722c in init_child ()
#18 0x00005618256f4520 in fork_process ()
#19 0x00005618255cfbf3 in main_loop ()
#20 0x00005618255dd095 in main ()
```
<!-- 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
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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
- [ ] 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
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2834
-- Commit Summary --
* ndb_redis: fix SIGSEGV in redisc_check_auth
-- File Changes --
M src/modules/ndb_redis/redis_client.c (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2834.patchhttps://github.com/kamailio/kamailio/pull/2834.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/2834
Hi sr-dev,
I have a pointer from one child process A that is available to another
child process B (this is a custom module I am developing). The object
should have been allocated in shared memory by A using ser_malloc and
friends and thus accessible from B.
However B is encountering a segfault when accessing this object.
Given a pointer how can I tell whether the memory it is pointing to is
valid in all children, i.e, the target is in kamailio shared memory?
Thanks
Anthony Alba
Hello,
Kamailio SIP Server v5.5.2 stable release is out.
This is a maintenance release of the latest stable branch, 5.5, that
includes fixes since the release of v5.5.1. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.5.x. Deployments running previous v5.5.x
versions are strongly recommended to be upgraded to v5.5.2.
For more details about version 5.5.2 (including links and guidelines to
download the tarball or from GIT repository), visit:
* https://www.kamailio.org/w/2021/08/kamailio-v5-5-2-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Many thanks to all contributing and using Kamailio!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
we trying to configurate the pcscf.cfg file and we the following error
Do you have an idea of the reason of this error?,
78(12285)ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[NATPING] c=[/etc/kamailio_pcscf/kamailio_pcscf.cfg] l=836 a=5 n=route
78(12285) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[preload_pcscf] c=[/etc/kamailio_pcscf/kamailio_pcscf.cfg] l=895 a=16 n=if
78(12285) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[preload_pcscf] c=[/etc/kamailio_pcscf/kamailio_pcscf.cfg] l=894 a=2 n=return
78(12285) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[NATPING] c=[/etc/kamailio_pcscf/kamailio_pcscf.cfg] l=838 a=26 n=sht_iterator_start
78(12285) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[NATPING] c=[/etc/kamailio_pcscf/kamailio_pcscf.cfg] l=848 a=23 n=while
78(12285) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[NATPING] c=[/etc/kamailio_pcscf/kamailio_pcscf.cfg] l=839 a=25 n=sht_iterator_next
78(12285) ERROR: *** cfgtrace:dbg_cfg_trace(): request_route=[NATPING] c=[/etc/kamailio_pcscf/kamailio_pcscf.cfg] l=849 a=25 n=sht_iterator_end
--
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/2835