<h3>Description</h3>
<p>Hi all,<br>
i’m using kamailio 4.4.6 , and when I call the rpc dialog   “profile_list_dlgs” , sometimes I have a segmentation fault.<br>
Can you help me to understand why it happened ?<br>
Thanks for  your support</p>

<h3>Troubleshooting</h3>
<h4>Reproduction</h4>

<h4>Debugging Data</h4>

<pre><code>This is the dump:
 
 
Program terminated with signal 11, Segmentation fault.
#0  0x00007f49ee062e07 in internal_rpc_print_dlg (rpc=0x7f49ed99e9c0, c=0x7f49ed99e960, dlg=0x7f49ef89ba38, with_context=0) at dialog.c:1548
1548                    if (pl->profile->has_value) {
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.192.el6.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-57.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64 libselinux-2.0.94-7.el6.x86_64 libxml2-2.7.6-21.el6_8.1.x86_64 lua-5.1.4-4.1.el6.x86_64 mysql-libs-5.1.73-7.el6.x86_64 nss-softokn-freebl-3.14.3-23.3.el6_8.x86_64 openssl-1.0.1e-48.el6_8.3.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt full
#0  0x00007f49ee062e07 in internal_rpc_print_dlg (rpc=0x7f49ed99e9c0, c=0x7f49ed99e960, dlg=0x7f49ef89ba38, with_context=0) at dialog.c:1548
        rpc_cb = {rpc = 0x3031ea0, c = 0x400}
        h = 0x2d21e60
        sh = 0x2d1db70
        ssh = 0x2d20050
        pl = 0x7f49ef18c588
        var = 0x0
        __FUNCTION__ = "internal_rpc_print_dlg"
#1  0x00007f49ee0637b3 in internal_rpc_profile_print_dlgs (rpc=0x7f49ed99e9c0, c=0x7f49ed99e960, profile_name=0x7fff65fcb1a0, value=0x0)
    at dialog.c:1681
        profile = 0x7f49ee5aca88
        ph = 0x7f49eeb5b670
        i = 2
#2  0x00007f49ee063e64 in rpc_profile_print_dlgs (rpc=0x7f49ed99e9c0, c=0x7f49ed99e960) at dialog.c:1785
        profile_name = {s = 0x3031e80 "outbound", len = 8}
        value = {s = 0x0, len = 0}
#3  0x00007f49ed78960f in jsonrpc_dispatch (msg=0x7fff65fcc5a0, s1=0x0, s2=0x0) at jsonrpc-s_mod.c:1098
        rpce = 0x7f4a13212d30
        ctx = 0x7f49ed99e960
        ret = 0
        nj = 0x3031ab0
        val = {s = 0x3032030 "dlg.profile_list", len = 16}
        __FUNCTION__ = "jsonrpc_dispatch"
#4  0x000000000041f75d in do_action (h=0x7fff65fcc4c0, a=0x7f4a13189e28, msg=0x7fff65fcc5a0) at action.c:1054
</code></pre>
<h4>Log Messages</h4>

<pre><code>the result to the commands p *pl and p *pl->profile

#0  0x00007f49ee062e07 in internal_rpc_print_dlg (rpc=0x7f49ed99e9c0, c=0x7f49ed99e960, dlg=0x7f49ef89ba38, with_context=0) at dialog.c:1548
1548                    if (pl->profile->has_value) {
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.192.el6.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-57.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64 libselinux-2.0.94-7.el6.x86_64 libxml2-2.7.6-21.el6_8.1.x86_64 lua-5.1.4-4.1.el6.x86_64 mysql-libs-5.1.73-7.el6.x86_64 nss-softokn-freebl-3.14.3-23.3.el6_8.x86_64 openssl-1.0.1e-48.el6_8.3.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) p *pl
$1 = {hash_linker = {value = {s = 0x113ef180024 <Address 0x113ef180024 out of bounds>, len = -277948848}, dlg = 0x7f49ef18c5b8, 
    puid = "\n\000\000\000-5a9\303\305\030\357I\177\000\000S\000\000\000\060\062\060\063in_routing\000CR=6@", puid_len = 1598313555, 
    expires = 3977578104333875508, flags = 876097589, linker = 0x422d30263936313d, next = 0x3d50542c36343d4f, prev = 0x52542c3634303730, 
    hash = 1028345429}, next = 0x50542c36343d4f42, profile = 0x542c36343037303d}
(gdb) p *pl->profile
Cannot access memory at address 0x542c36343037303d

</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>(paste your output here)
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>

<pre><code>(paste your output here)
</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/1482">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZeS1UUlopAwM3ziSGJjZiUaPQju9ks5td_sqgaJpZM4SpFJO">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZaCY19ijiBNGNcf2hbbga6_tpeH_ks5td_sqgaJpZM4SpFJO.gif" height="1" width="1" alt="" /></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/1482"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Segmentation fault Dialog RPC (#1482)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1482"}}}</script>