<p></p>

<h3>Description</h3>
<p>I've been trying the new in-memory only presence feature in 5.4.x but have run into an issue:</p>
<pre><code>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
</code></pre>
<p>I have this set <code>modparam("presence", "publ_cache", 2)</code> 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.</p>
<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<p>Starting kamailio with these mod params can re-produce the issue.</p>
<pre><code>#!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
</code></pre>
<h4>Debugging Data</h4>

<pre><code>(paste your debugging data here)
</code></pre>
<h4>Log Messages</h4>

<pre><code>(paste your log messages here)
</code></pre>
<h4>SIP Traffic</h4>

<pre><code>(paste your sip traffic here)
</code></pre>
<h3>Possible Solutions</h3>

<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>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
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>

<pre><code>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
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2642">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZOXX3TPWYN2NG4HYKDS7K5HJANCNFSM4XW63BPQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZJNG3JFY3ERENKOV4TS7K5HJA5CNFSM4XW63BP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4MCA7A7A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2642",
"url": "https://github.com/kamailio/kamailio/issues/2642",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>