<p>I'm observing a segmentation fault when mongodb & tls enabled. It doesn't happen when one of the module is disabled.<br>
OS: centos 6.7   kamailio 4.3.2  mongo-c-driver version 1.1.10.</p>

<p>It happens immediately after i register a subscriber. The location table is updated with the new data and in parallel core is generated as well.<br>
I'm running with the offical kamailio script by just enabling mongo modules. It happens for NDB as well.</p>

<p>How did you build the mongo driver when you implemented it? May be i can try the same.</p>

<p>Please find the scripts used for testing in the email.</p>

<p>Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio.pid -m 64 -M 8'.</p>

<p>Program terminated with signal 11, Segmentation fault.</p>

<p>#0  0x00007f85a21da075 in lock_udomain (_d=0x7f859c7b5f08, _aor=0x7fff6de7ef70) at udomain.c:1017</p>

<p>1017    lock_get(_d->table[sl].lock);</p>

<p>Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64 cyrus-sasl-plain-2.1.23-15.el6_6.2.x86_64 db4-4.7.25-19.el6_6.x86_64 glibc-2.12-1.166.el6_7.1.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-42.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64 libselinux-2.0.94-5.8.el6.x86_64 nss-softokn-freebl-3.14.3-22.el6_6.x86_64 openssl-1.0.1e-42.el6.x86_64 zlib-1.2.3-29.el6.x86_64</p>

<p>(gdb) bt</p>

<p>#0  0x00007f85a21da075 in lock_udomain (_d=0x7f859c7b5f08, _aor=0x7fff6de7ef70) at udomain.c:1017</p>

<p><a href="https://github.com/kamailio/kamailio/issues/1" class="issue-link" title="API for ruby">#1</a>  0x00007f85a1d7069b in add_contacts (_m=0x7f85a3f054b8, _d=0x7f859c7b5f08, _a=0x7fff6de7ef70, _mode=0, _use_regid=1) at save.c:831</p>

<p><a href="https://github.com/kamailio/kamailio/pull/2" class="issue-link" title="Fix some typos and capitalisation in INSTALL">#2</a>  0x00007f85a1d72602 in save (_m=0x7f85a3f054b8, _d=0x7f859c7b5f08, _cflags=0, _uri=0x0) at save.c:986</p>

<p><a href="https://github.com/kamailio/kamailio/pull/3" class="issue-link" title="usrloc_dmq: add module for usrloc sync via dmq">#3</a>  0x00007f85a1d5975a in w_save2 (_m=0x7f85a3f054b8, _d=0x7f859c7b5f08 "h^{\234\205\177", _cflags=0x0) at reg_mod.c:414</p>

<p><a href="https://github.com/kamailio/kamailio/pull/4" class="issue-link" title="Update pcscf.cfg">#4</a>  0x000000000041decb in do_action (h=0x7fff6de7f720, a=0x7f85a3edd830, msg=0x7f85a3f054b8) at action.c:1059</p>

<p><a href="https://github.com/kamailio/kamailio/issues/5" class="issue-link" title='dialplan: using $(avp("key")[*]) on match/subst rules'>#5</a>  0x000000000042a553 in run_actions (h=0x7fff6de7f720, a=0x7f85a3edd830, msg=0x7f85a3f054b8) at action.c:1548</p>

<p><a href="https://github.com/kamailio/kamailio/issues/6" class="issue-link" title="usrloc: REGISTER with new callid gets updated on memory but not on DB">#6</a>  0x000000000042abb8 in run_actions_safe (h=0x7fff6de80a10, a=0x7f85a3edd830, msg=0x7f85a3f054b8) at action.c:1613</p>

<p><a href="https://github.com/kamailio/kamailio/issues/7" class="issue-link" title="avpops: avp_copy add xavp">#7</a>  0x0000000000543d50 in rval_get_int (h=0x7fff6de80a10, msg=0x7f85a3f054b8, i=0x7fff6de7fbf8, rv=0x7f85a3edf478, cache=0x0) at rvalue.c:912</p>

<p><a href="https://github.com/kamailio/kamailio/issues/8" class="issue-link" title="debugger: config test report">#8</a>  0x0000000000547f88 in rval_expr_eval_int (h=0x7fff6de80a10, msg=0x7f85a3f054b8, res=0x7fff6de7fbf8, rve=0x7f85a3edf470) at rvalue.c:1906</p>

<p><a href="https://github.com/kamailio/kamailio/issues/9" class="issue-link" title='sipcapture: "core parsing of SIP message failed" with tcp defragmented message '>#9</a>  0x000000000054837e in rval_expr_eval_int (h=0x7fff6de80a10, msg=0x7f85a3f054b8, res=0x7fff6de80080, rve=0x7f85a3edfb70) at rvalue.c:1914</p>

<p><a href="https://github.com/kamailio/kamailio/pull/10" class="issue-link" title="pkg/kamailio: Initial Travis CI configuration">#10</a> 0x000000000041d927 in do_action (h=0x7fff6de80a10, a=0x7f85a3ee0270, msg=0x7f85a3f054b8) at action.c:1029</p>

<p><a href="https://github.com/kamailio/kamailio/issues/11" class="issue-link" title="issue notifying subscribers with transport tcp/tls">#11</a> 0x000000000042a553 in run_actions (h=0x7fff6de80a10, a=0x7f85a3edc990, msg=0x7f85a3f054b8) at action.c:1548</p>

<p><a href="https://github.com/kamailio/kamailio/pull/12" class="issue-link" title="Support for custom number of successful probing requests before moving a destination from 'inactive' to 'active' state">#12</a> 0x000000000041a8c3 in do_action (h=0x7fff6de80a10, a=0x7f85a3ebdd98, msg=0x7f85a3f054b8) at action.c:677</p>

<p><a href="https://github.com/kamailio/kamailio/pull/13" class="issue-link" title="dispatcher: fixing some misspelled words and adding support for custom number of successful probing requests">#13</a> 0x000000000042a553 in run_actions (h=0x7fff6de80a10, a=0x7f85a3ebdb08, msg=0x7f85a3f054b8) at action.c:1548</p>

<p><a href="https://github.com/kamailio/kamailio/pull/14" class="issue-link" title="Improve for correct working with all RADIUS AV pairs">#14</a> 0x000000000042ac80 in run_top_route (a=0x7f85a3ebdb08, msg=0x7f85a3f054b8, c=0x0) at action.c:1634</p>

<p><a href="https://github.com/kamailio/kamailio/issues/15" class="issue-link" title='ERROR: topoh  th_mask_decode(): invalid input  string"1-4289383-6930886-1692777-3284@127.0.1.1" '>#15</a> 0x000000000050a9f4 in receive_msg (</p>

<pre><code>buf=0xa70b00 "REGISTER sip:192.168.2.142 SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.2.119:60887;branch=z9hG4bK-524287-1---d670bd2004732b4a;rport\r\nMax-Forwards: 70\r\nContact: <sip:usera@192.168.2.119:60887;rinstance=d9f6274d7"..., len=534, rcv_info=0x7fff6de80d00) at receive.c:196
</code></pre>

<p><a href="https://github.com/kamailio/kamailio/pull/16" class="issue-link" title="modules/cdp: added src_addr parameter in peer definition">#16</a> 0x000000000060a4a6 in udp_rcv_loop () at udp_server.c:495</p>

<p><a href="https://github.com/kamailio/kamailio/pull/17" class="issue-link" title="dialplan: skip check subexpressions on expressions with pvs">#17</a> 0x00000000004a7fb3 in main_loop () at main.c:1573</p>

<p><a href="https://github.com/kamailio/kamailio/pull/18" class="issue-link" title='dialplan: using $(avp("key")[*]) on match/subst rules'>#18</a> 0x00000000004ae38e in main (argc=7, argv=0x7fff6de81138) at main.c:2533</p>

<p>(gdb) quit</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/360">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZY5X0B_brS3Y7juxIZCCHgdAr8yNks5o4_TdgaJpZM4GJ6zl.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/360"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>