<h4>Reproduction</h4>
<p>Install newest Kamailio 5.2.</p>
<p>Change date e.g. 2 Years into the future. (Make sure you have no daemon running which prohibits those operations):</p>
<pre><code>sudo date -s "2014-12-25 $(date +%H:%M:%S)"
</code></pre>
<pre><code>sudo date -s "2016-12-25 $(date +%H:%M:%S)"
</code></pre>
<p>Kamailio now uses the whole CPU to do stuff:</p>
<pre><code>top - 08:10:35 up 14 days,  1:29,  2 users,  load average: 3.77, 1.83, 1.05
Tasks: 212 total,  11 running, 201 sleeping,   0 stopped,   0 zombie
%Cpu(s): 95.9 us,  1.5 sy,  2.2 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.4 si,  0.0 st
MiB Mem :    926.1 total,    116.3 free,    382.5 used,    427.3 buff/cache
MiB Swap:    100.0 total,     40.4 free,     59.6 used.    423.4 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                         
13264 root      20   0   89720   3944   2676 R  44.9   0.4   0:05.15 kamailio                                        
13266 root      20   0   89720   4000   2736 R  37.3   0.4   0:04.63 kamailio                                        
13267 root      20   0   89720   4912   3488 R  36.0   0.5   0:04.37 kamailio                                        
13270 root      20   0   89720   4540   3240 R  36.0   0.5   0:05.85 kamailio                                        
13269 root      20   0   89720   4000   2736 R  34.7   0.4   0:04.81 kamailio                                        
13265 root      20   0   89720   3944   2680 R  34.4   0.4   0:04.61 kamailio                                        
13261 root      20   0   89720   3952   2676 R  32.2   0.4   0:04.44 kamailio                                        
13262 root      20   0   89720   3944   2676 R  31.8   0.4   0:04.72 kamailio                                        
13256 root      20   0   89720   4752   3540 R  30.3   0.5   0:07.04 kamailio                                        
13268 root      20   0   89720   4000   2736 R  30.3   0.4   0:04.49 kamailio                                        
18021 root      20   0   40116  11884   5728 D  13.7   1.3   0:01.11 apt-get 
</code></pre>
<p>There are multiple mailing list entries regarding this issue:<br>
<a href="https://lists.kamailio.org/pipermail/sr-users/2015-October/090465.html" rel="nofollow">https://lists.kamailio.org/pipermail/sr-users/2015-October/090465.html</a><br>
<a href="https://lists.kamailio.org/pipermail/sr-users/2015-November/090487.html" rel="nofollow">https://lists.kamailio.org/pipermail/sr-users/2015-November/090487.html</a><br>
<a href="https://lists.kamailio.org/pipermail/sr-users/2019-June/105967.html" rel="nofollow">https://lists.kamailio.org/pipermail/sr-users/2019-June/105967.html</a><br>
<a href="https://lists.kamailio.org/pipermail/sr-users/2019-August/106428.html" rel="nofollow">https://lists.kamailio.org/pipermail/sr-users/2019-August/106428.html</a></p>
<p>I was able to get rid of the issue with uncommenting the mentioned part of the code. But I'm quite sure that's not a fix :)<br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/11159719/63680341-b6d67880-c7f3-11e9-825b-529e7ec26b2e.png"><img src="https://user-images.githubusercontent.com/11159719/63680341-b6d67880-c7f3-11e9-825b-529e7ec26b2e.png" alt="image" style="max-width:100%;"></a></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/2046?email_source=notifications&email_token=ABO7UZMVXXAK6MVJLJ4LHBLQGOOIJA5CNFSM4IPNVPUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHKTXVA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZO4QFBJVVNH22MGVYDQGOOIJANCNFSM4IPNVPUA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZJEGF5I5W4KQKQX7EDQGOOIJA5CNFSM4IPNVPUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHKTXVA.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/2046?email_source=notifications\u0026email_token=ABO7UZMVXXAK6MVJLJ4LHBLQGOOIJA5CNFSM4IPNVPUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHKTXVA",
"url": "https://github.com/kamailio/kamailio/issues/2046?email_source=notifications\u0026email_token=ABO7UZMVXXAK6MVJLJ4LHBLQGOOIJA5CNFSM4IPNVPUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHKTXVA",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>