<h3>Description</h3>
<p>We are experiencing sticky OOM state after an extended period (several days). <code>kamcmd</code> inspection of mem use shows memory consumed (leaked) via <code>pv_cache_add(347)</code> calls.</p>
<p>Inspection of that function suggests nothing can ever be dropped from the cache -- rendering it leaky. <code>_pv_cache_counter</code> is tested twice but after initialization (to zero) never appears to be assigned (incremented or otherwise) and so the conditions needed to call <code>pv_cache_drop</code> are never met.</p>
<h3>Troubleshooting</h3>
<h4>Debugging Data</h4>
<pre><code>May  5 23:55:40 eng-X X[1107]:  1(105) INFO: qm_sums:  count=     1 size=      2048 bytes from core: core/counters.c: cnt_hash_add(383)
May  5 23:55:40 eng-X X[1107]:  1(105) INFO: qm_sums:  count= 18473 size=   5571880 bytes from core: core/pvapi.c: pv_cache_add(347)
May  5 23:55:40 eng-X X[1107]:  1(105) INFO: qm_sums:  count=   162 size=      9344 bytes from core: core/pvapi.c: pv_parse_format(1150)
</code></pre>
<h3>Additional Information</h3>
<pre><code>kamcmd> ver
kamailio 5.2.2 (x86_64/linux)
kamcmd>
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>

<pre><code>Linux soak 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 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/1948">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZKV5UGEJ5PKCBUMV43PUIMXPANCNFSM4HLNNLBQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZOFBU2O2M2OEHXOCJ3PUIMXPA5CNFSM4HLNNLB2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GSQXSVA.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/1948",
"url": "https://github.com/kamailio/kamailio/issues/1948",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>