<p>This is the <code>NGCP</code> version of 4.4.5<br>
sources at <a href="https://github.com/sipwise/kamailio/tree/mr4.5.4">https://github.com/sipwise/kamailio/tree/mr4.5.4</a> but be aware that list of patches are at <a href="https://github.com/sipwise/kamailio/blob/mr4.5.4/debian/patches/series">https://github.com/sipwise/kamailio/blob/mr4.5.4/debian/patches/series</a><br>
and I changed the sensible data from the paste</p>
<p>In order you to see the source easily I pasted dlg_handlers.c already patched at <a href="https://paste.debian.net/926240/">https://paste.debian.net/926240/</a></p>
<pre><code>(gdb) f 4
#4  0x00007fae32c3457e in dlg_onroute (req=0x7fae3def7ac8, route_params=0x7fad006e9b1e, 
    param=0x7fff717dab10) at dlg_handlers.c:1350
1350    dlg_handlers.c: No such file or directory.
(gdb) info locals
val = {
  s = 0x9aaf79 <buf+1465> "c68.0d81;ice_caller=strip;ice_callee=strip;aset=50;rtpprx=yes;vsf=Y3Z5enJeQmp8bVRNYGQtEwxdZHR2LHRwc1RAaX0hWEFyMw1mZg-->\r\nP-NGCP-Src-Ip: 172.17.65.99\r\nP-NGCP-Src-Port: 5060\r\nP-NGCP-Src-Proto: udp\r\nP-NG"..., len = 8}
ftag = {
  s = 0x9aabaa <buf+490> "C03675F3E457BC60\r\nTo: <sip:00000000000@sip.local:5060>;tag=0FC4E4CA-58E4A7D4000A8034-123E3700\r\nCall-ID: 3A477FD70434C083@10.10.10.18\r\nCSeq: 5709 BYE\r\nProxy-Authorization: Digest username=\"2233"..., len = 16}
old_state = 4
dir = 1
ret = 0
callid = {
  s = 0x9aac1a <buf+602> "3A477FD70434C083@10.10.10.18\r\nCSeq: 5709 BYE\r\nProxy-Authorization: Digest username=\"1111111111\", realm=\"sip.local\", nonce=\"WOUBrFjkp9Qj4YjEwa9jvelH7ty68fD/\", uri=\"sip:00000000000@172.17.66.118"..., len = 28}
new_state = 5
unref = 1
event = 10498440
dlg = 0x7fad74f20258
ttag = {
  s = 0x9aabed <buf+557> "0FC4E4CA-58E4A7D4000A8034-123E3700\r\nCall-ID: 3A477FD70434C083@10.10.10.18\r\nCSeq: 5709 BYE\r\nProxy-Authorization: Digest username=\"1111111111\", realm=\"sip.local\", nonce=\"WOUBrFjkp9Qj4YjEwa9jvelH"..., len = 34}
h_id = 854147520
dlg = 0x7fad00000000
</code></pre>
<p>So relevant code is too</p>
<pre><code>                 LM_WARN("inconsitent dlg timer data on dlg %p [%u:%u] "
                                "with clid '%.*s' and tags '%.*s' '%.*s'\n",
                                dlg, dlg->h_entry, dlg->h_id,
                                dlg->callid.len, dlg->callid.s,
                                dlg->tag[DLG_CALLER_LEG].len, dlg->tag[DLG_CALLER_LEG].s,
                                dlg->tag[DLG_CALLEE_LEG].len, dlg->tag[DLG_CALLEE_LEG].s);
</code></pre>
<blockquote>
<p>So no strlen() to be used there.</p>
</blockquote>
<p>but the <code>strlen()</code> is coming from <code>syslog()</code></p>
<p>I would say the problem is  <code>dlg</code> is gone from memory when trying to use the string</p>

<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/1059#issuecomment-292140868">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36Zf1xo4i4zctjOQEjjXV61UCdwJUrks5rtMchgaJpZM4M0eIN">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZUn5kg7HPKGFBnBfkgTP00FYfwQuks5rtMchgaJpZM4M0eIN.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/1059#issuecomment-292140868"></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":"PERSON","message":"@linuxmaniac in #1059: This is the ``NGCP`` version of 4.4.5\r\nsources at https://github.com/sipwise/kamailio/tree/mr4.5.4 but be aware that list of patches are at https://github.com/sipwise/kamailio/blob/mr4.5.4/debian/patches/series\r\nand I changed the sensible data from the paste\r\n\r\nIn order you to see the source easily I pasted dlg_handlers.c already patched at https://paste.debian.net/926240/\r\n\r\n```\r\n(gdb) f 4\r\n#4  0x00007fae32c3457e in dlg_onroute (req=0x7fae3def7ac8, route_params=0x7fad006e9b1e, \r\n    param=0x7fff717dab10) at dlg_handlers.c:1350\r\n1350\tdlg_handlers.c: No such file or directory.\r\n(gdb) info locals\r\nval = {\r\n  s = 0x9aaf79 \u003cbuf+1465\u003e \"c68.0d81;ice_caller=strip;ice_callee=strip;aset=50;rtpprx=yes;vsf=Y3Z5enJeQmp8bVRNYGQtEwxdZHR2LHRwc1RAaX0hWEFyMw1mZg--\u003e\\r\\nP-NGCP-Src-Ip: 172.17.65.99\\r\\nP-NGCP-Src-Port: 5060\\r\\nP-NGCP-Src-Proto: udp\\r\\nP-NG\"..., len = 8}\r\nftag = {\r\n  s = 0x9aabaa \u003cbuf+490\u003e \"C03675F3E457BC60\\r\\nTo: \u003csip:00000000000@sip.local:5060\u003e;tag=0FC4E4CA-58E4A7D4000A8034-123E3700\\r\\nCall-ID: 3A477FD70434C083@10.10.10.18\\r\\nCSeq: 5709 BYE\\r\\nProxy-Authorization: Digest username=\\\"2233\"..., len = 16}\r\nold_state = 4\r\ndir = 1\r\nret = 0\r\ncallid = {\r\n  s = 0x9aac1a \u003cbuf+602\u003e \"3A477FD70434C083@10.10.10.18\\r\\nCSeq: 5709 BYE\\r\\nProxy-Authorization: Digest username=\\\"1111111111\\\", realm=\\\"sip.local\\\", nonce=\\\"WOUBrFjkp9Qj4YjEwa9jvelH7ty68fD/\\\", uri=\\\"sip:00000000000@172.17.66.118\"..., len = 28}\r\nnew_state = 5\r\nunref = 1\r\nevent = 10498440\r\ndlg = 0x7fad74f20258\r\nttag = {\r\n  s = 0x9aabed \u003cbuf+557\u003e \"0FC4E4CA-58E4A7D4000A8034-123E3700\\r\\nCall-ID: 3A477FD70434C083@10.10.10.18\\r\\nCSeq: 5709 BYE\\r\\nProxy-Authorization: Digest username=\\\"1111111111\\\", realm=\\\"sip.local\\\", nonce=\\\"WOUBrFjkp9Qj4YjEwa9jvelH\"..., len = 34}\r\nh_id = 854147520\r\ndlg = 0x7fad00000000\r\n```\r\n\r\nSo relevant code is too\r\n```\r\n\t\t\tLM_WARN(\"inconsitent dlg timer data on dlg %p [%u:%u] \"\r\n\t\t\t\t\"with clid '%.*s' and tags '%.*s' '%.*s'\\n\",\r\n\t\t\t\tdlg, dlg-\u003eh_entry, dlg-\u003eh_id,\r\n\t\t\t\tdlg-\u003ecallid.len, dlg-\u003ecallid.s,\r\n\t\t\t\tdlg-\u003etag[DLG_CALLER_LEG].len, dlg-\u003etag[DLG_CALLER_LEG].s,\r\n\t\t\t\tdlg-\u003etag[DLG_CALLEE_LEG].len, dlg-\u003etag[DLG_CALLEE_LEG].s);\r\n```\r\n\r\n\u003e So no strlen() to be used there.\r\n\r\nbut the ``strlen() `` is coming from ``syslog()``\r\n\r\nI would say the problem is  ``dlg`` is gone from memory when trying to use the string "}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1059#issuecomment-292140868"}}}</script>