### Description
After upgrading from Kamailio 5.2.x, a high volume Kamailio 5.4.4 instance randomly crashes with either a general protection or segfault error message in `siptrace.so` during use of `sip_trace` function from one of its child processes (which cascades to the parent crashing). This appears to occur once about every 36 hours on average, but has not yet appeared to correspond with any particular event.
We are continuing to collect debug information and will be populating this ticket as more information becomes available. However, this issue has been observed.
Sip trace function is applied in this example snippet:
```
# ------- siptrace --------
modparam("siptrace", "hep_mode_on", 1)
modparam("siptrace", "hep_version", 3)
modparam("siptrace", "trace_to_database", 0)
modparam("siptrace", "trace_flag", 22)
modparam("siptrace", "trace_on", 1)
request_route {
#....
if ( is_method("INVITE") && !has_totag() ) {
# Only start sip_trace on initial INVITE
sip_trace("HEP_URL","$ci-MY_IP","d");
}
setflag(22);
#...
}
```
### Troubleshooting
We attempted packet collection with Homer v5 and Homer v7 and changed between HEP protocol v2 and v3.
#### Reproduction
We have not determined a means of reproducing this issue without simply letting the server run until a crash occurs. There are four almost identical servers all experiencing the same random crashing but not at the same time.
#### Debugging Data
Our next troubleshooting case will be to simply comment out the `sip_trace` function, but this effectively disables the `siptrace` module completely rather than addressing an underlying problem.
Core dumps are still in-progress for retrieval. Debug logs should also be more readily available soon. There will be delays since these are high volume production servers.
<!--
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.
-->
#### Log Messages
All of them have randomly crashed with the following example log entry. Regardless of troubleshooting tactics to date:
```
kernel: traps: kamailio[7579] general protection ip:7fb1a64e2dbf sp:7ffc60f04180 error:0 in siptrace.so[7fb1a64b8000+4e000]
systemd: kamailio.service: main process exited, code=exited, status=1/FAILURE
systemd: Unit kamailio.service entered failed state.
systemd: kamailio.service failed.
```
#### SIP Traffic
To date, there is no corresponding SIP Traffic with the crash.
### Possible Solutions
To date, only disabling the `siptrace` module seems to be the solution.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.4.4 (x86_64/linux) e16352
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, 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_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: e16352
compiled on 15:56:46 Feb 15 2021 with gcc 4.8.5
```
* **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`)
-->
```
Linux <hostname> 3.10.0-957.27.2.el7.x86_64 #1 SMP Mon Jul 29 17:46:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
```
--
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/2718
The db_redis module seems to only support connecting with a single redis instance. It is not evident from the documentation if it implements support for native redis cluster by honouring 'MOVED' replies.
ndb_redis seems to have support for native redis clusters, and supports both automatic (see allow_dynamic_nodes parameter of ndb_redis) and manual configuration of redis nodes.
Since both modules are based on the hiredis library, is it safe to assume this support could be easily implemented, with some code sharing between the two modules perhaps?
If db_redis supports clusters with automatic configuration only (by processing MOVED replies), perhaps the module's documentation should be updated to reflect that.
--
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/1997
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for feature requests.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.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.kamailio.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) 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
Kamailio recently added JSON logging support, described on these two pages:
https://www.kamailio.org/w/2020/04/structured-json-logging/https://www.kamailio.org/wiki/cookbooks/devel/core#log_engine_cli_parameter
Structured logging is particularly useful when:
1. there are multiple applications involved in a call (e.g. Kamailio, Kurento, coTurn, Apache)
2. all the applications create JSON logs using identical field names
I recently made contributions to reSIProcate, GStreamer and Kurento to support the JSON CEE field names. It would be very easy to replicate in Kamailio.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/847https://github.com/Kurento/kurento-media-server/pull/17https://github.com/resiprocate/resiprocate/commit/d1df9aeb956be79253560fe36…
Notice that ```rsyslog``` can receive legacy Syslog events from VoIP hardware, Cisco and Polycom phones and it can convert them to JSON CEE and push them into the document store where they will meet the records from Kamailio. This is another case where it is really useful if all the JSON from different applications is using CEE.
Here are the JSON CEE field names:
https://cee.mitre.org/language/1.0-beta1/core-profile.html
### Expected behavior
Extend the config setting so that people can request CEE on the command line.
#### Actual observed behavior
#### Debugging Data
```
(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
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a improvement.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
(paste your output here)
```
* **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`)
-->
```
(paste your output here)
```
--
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/2797
we are getting the following errors in Kamailio logs
**kamailio.log**
Jun 29 08:08:14 fep-1 /usr/local/fep-kamailio/sbin/kamailio[14111]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7f524f7862d0, fd 30406
Jun 29 08:08:14 fep-1 /usr/local/fep-kamailio/sbin/kamailio[14111]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7f525a6c5f90, fd 30407
Jun 29 08:08:14 fep-1 /usr/local/fep-kamailio/sbin/kamailio[14111]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7f52449e0978, fd 30415
Jun 29 08:06:27 fep-1 /usr/local/fep-kamailio/sbin/kamailio[14111]: CRITICAL: <core> [core/io_wait.h:596]: io_watch_del(): invalid fd 30355, not in [0, 4607)
Jun 29 08:06:27 fep-1 /usr/local/fep-kamailio/sbin/kamailio[14111]: CRITICAL: <core> [core/io_wait.h:596]: io_watch_del(): invalid fd 30356, not in [0, 4607)
Jun 29 08:06:27 fep-1 /usr/local/fep-kamailio/sbin/kamailio[14111]: CRITICAL: <core> [core/io_wait.h:596]: io_watch_del(): invalid fd 30358, not in [0, 4607)
**Description**
On checking this issue we found that Kamailio was not accepting TLS connections. We were getting an error which is mentioned above.
We double-checked TLS and TCP connections and they were normal. We have 5000+ TLS connections and the max connection limit is 30,000. So we were not exceeding the TLS connection limit.
We also verified open_files_limits. It is around 1 million which is more than enough.
**Kamailio Version** - output of kamailio -v
version: kamailio 5.4.2 (x86_64/linux) f8885c
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, 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_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: f8885c
**Operating System:**
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
--
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/2796
I have some problems。the kamailio version is 5.3.0. My linux version is centos 7. the kamailio log:
ERROR: <core> [core/tcp_main.c:3508]: send_fd_queue_run(): send_fd failed on socket 63 , queue entry 1, retries 90, connection 0x7ff46e6b1b60, tcp socket 218, errno=11 (Resource temporarily unavailable)
ERROR: {1 12529 MESSAGE 359bf0410a7e471c950623e3f7a3b17b} <core> [core/kemi.c:94]: sr_kemi_core_err(): 202->408
CRITICAL: <core> [core/tcp_main.c:4218]: send2child(): tcp child 6, socket 65: queue full, 291 requests queued (total handled 10665748)
This problem does not happen every time。When the number of user registrations increases significantly, errors will appear。I tried to set the parameter tcp_children is adjusted to 8, it will not appear frequently, but when the number of user registrations increases to about 5000, errors will still appear. My kamailio.cfg global parameters are set as follows:tls_max_connections=65536,tcp_max_connections=65536,open_max_files=65536。
--
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/2806
<!-- 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 -->
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Extends the msg parsing fuzzer to reach some of the parsing routines we currently miss.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2851
-- Commit Summary --
* misc: fuzz: extend msg parsing fuzzer
-- File Changes --
M misc/fuzz/fuzz_parse_msg.c (12)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2851.patchhttps://github.com/kamailio/kamailio/pull/2851.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/2851