<p>Running <code>Kamailio 4.4.7:97f308</code> with heavy <code>app_perl</code> usage, <code>usrloc</code> (<code>db_mode</code> 3) and not much else.</p>
<p>After an upgrade from 4.1, getting periodic death like this:</p>
<pre><code>Sep 25 20:54:28 switch /sbin/kamailio[29771]: CRITICAL: <core> [pass_fd.c:277]: receive_fd(): EOF on 9
</code></pre>
<p>Also happens on 4.2.x.</p>
<p>It happens every 30-31 minutes or so on the dot, which suggests that there is some sort of background operation on this operator's system elsewhere that is causing this, but I haven't been able to find it.</p>
<p>Anyway, the PID is that of the TCP main marshalling process, i.e.</p>
<pre><code># kamcmd ps | grep -i tcp
15716   tcp receiver (generic) child=0
15717   tcp receiver (generic) child=1
15718   tcp receiver (generic) child=2
15719   tcp receiver (generic) child=3
15720   tcp receiver (generic) child=4
15721   tcp receiver (generic) child=5
15722   tcp receiver (generic) child=6
15723   tcp receiver (generic) child=7
15724   tcp receiver (generic) child=8
15725   tcp receiver (generic) child=9
15726   tcp receiver (generic) child=10
15727   tcp receiver (generic) child=11
15728   tcp receiver (generic) child=12
15729   tcp receiver (generic) child=13
15730   tcp receiver (generic) child=14
15731   tcp receiver (generic) child=15
15732   tcp main process
</code></pre>
<p>In this case, that would be <code>15732</code>.</p>
<p>I assume this is because one of the TCP receiver processes dies, but I haven't been able to find any evidence of that. This is a high-volume system, so I can't reduce the worker thread pool too much, but I tried reducing the number of child processes per listener from 16 to 3, and attaching GDB to each one. They all die normally upon receipt of <code>SIGTERM</code>:</p>
<pre><code>Program received signal SIGTERM, Terminated.
0x00002b1517a436f3 in __epoll_wait_nocancel () from /lib64/libc.so.6
</code></pre>
<p>Yet, it is the TCP distributor thread that shows the EOF in <code>receive_fd()</code>.</p>
<p>Because it's not a crash per se, I don't have a core dump or a way of grabbing the state of the program at the exact moment of the crash. All the processes seem to exit normally.</p>
<p>I have read some past issues that mention this, but their ultimate causes don't seem to be relevant here (e.g. no <code>dialog</code> usage). Moreover, the commits made to address this issue in other forms are present in the latest 4.4.x.</p>
<p>For reasons related to the high traffic volume, running with a higher debug verbosity level or some other fairly obvious ideas (e.g. no forking) aren't practical at all.</p>
<p>Any suggestions welcome!</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/2075?email_source=notifications&email_token=ABO7UZMEZRY4AWYXCQ2CVRTQLQFD5A5CNFSM4I2TXIFKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HNYANSQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPA7GEDFB5EZQG7IADQLQFD5ANCNFSM4I2TXIFA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZLI63CRJWIVAZAAU33QLQFD5A5CNFSM4I2TXIFKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HNYANSQ.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/2075?email_source=notifications\u0026email_token=ABO7UZMEZRY4AWYXCQ2CVRTQLQFD5A5CNFSM4I2TXIFKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HNYANSQ",
"url": "https://github.com/kamailio/kamailio/issues/2075?email_source=notifications\u0026email_token=ABO7UZMEZRY4AWYXCQ2CVRTQLQFD5A5CNFSM4I2TXIFKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HNYANSQ",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>