[sr-dev] [kamailio/kamailio] Issue with new memory-only presence feature in 5.4.3 (#2642)

Joe Mordica notifications at github.com
Tue Feb 16 19:52:36 CET 2021


<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.

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 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

I've been trying the new in-memory only presence feature in 5.4.x but have run into an issue:
```
ERROR: presence [presence_dmq.c:109]: pres_dmq_init_proc(): dmq_worker_init: database not bound
kamailio[8404]: segfault at 0 ip 00007f4f8419c4d7 sp 00007ffd68ef0130 error 4 in presence.so[7f4f8418d000+fe000]
CRITICAL: <core> [core/pass_fd.c:277]: receive_fd(): EOF on 31
ALERT: <core> [main.c:777]: handle_sigs(): child process 8411 exited by a signal 11
```

I have this set `modparam("presence", "publ_cache", 2)` but had to comment it out in order to prevent kamailio from crashing. I have reverted back to using mysql for storing presentity records for now.

### Troubleshooting

#### Reproduction

Starting kamailio with these mod params can re-produce the issue.
```
#!ifdef WITH_PRESENCE
# ----- presence params -----
modparam("presence", "db_url", DBURL)
modparam("presence", "server_address", "sip:EXTERNAL_LISTEN_IP:EXTERNAL_UDP_PORT")
modparam("presence", "subs_db_mode", 0)
modparam("presence", "publ_cache", 2)
modparam("presence", "clean_period", 40)
modparam("presence", "max_expires", 3600010)
modparam("presence", "enable_dmq", 1)

# ----- presence_xml params -----
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)

# ----- presence_dialoginfo params -----
modparam("presence_dialoginfo", "force_dummy_dialog", 1)
#!endif
```

#### 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.
-->

```
(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 fix.
-->

### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

```
version: kamailio 5.4.3 (x86_64/linux) e19ae3
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: e19ae3 
compiled on 18:17:25 Dec 14 2020 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`)
-->

```
CentOS 7 - Linux hostname 3.10.0-1160.2.2.el7.x86_64 #1 SMP Tue Oct 20 16:53:08 UTC 2020 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/2642
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210216/8e9d243f/attachment.htm>


More information about the sr-dev mailing list