<p>I compiled brand new kamailio, and use my kamailio.cfg</p>

<pre><code>$> git branch -v
* master ec0ba37 jsonrpc-c: proper error handling for pipe cmd callback

$> kamcmd core.info
{
    version: kamailio 4.4.0-dev2
    id: ec0ba3 
    compiler: gcc 4.7.2
    compiled: 22:33:06 Aug 27 2015
    flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_F_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
}
</code></pre>

<h4>Strange Result</h4>

<ul>
<li><strong>It NEVER crash</strong></li>
<li>use <code>kamcmd core.shmmem</code> shows still consumed shmmem and did not free</li>
<li>when shmmem free reaches 0 ( or near 0 ), it frees all memory suddenly, and free mem restore max.</li>
<li>when restored all mem, the sipp shows:
<code>Error on TCP connection, remote peer probably closed the socket: Connection reset by peer.</code> 
and the test finished.</li>
<li>in the mean time, in kamailio syslog, it only shows:</li>
</ul>

<pre><code>ERROR: <core> [tcp_read.c:271]: tcp_read_data(): error reading: Connection reset by peer (104)
ERROR: <core> [tcp_read.c:1296]: tcp_read_req(): ERROR: tcp_read_req: error reading
</code></pre>

<p>seems like all fd were gone.</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/296#issuecomment-135462739">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZQMrq-P-hHiG50Jm1t4ClVmVk_ZBks5orx7KgaJpZM4Fw0dn.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/296#issuecomment-135462739"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>