<p>Here is the code fragment that was executing in async process when crash happened,</p>
<pre><code>            xlog("L_NOTICE", "[$pr:$fU@$si:$sp]: Found '$avp(rows)' db records for SIP SCI command '$avp(sip_sci_cmd)' \n");
            append_to_reply("X-Message-Count: $avp(rows)\r\n");
            $avp(reason) = "Accepted: sending " + $avp(rows) + " messages";
            send_reply("201", "$avp(reason)");
...
            perl_exec("get_chat_sessions", $fU);
            xlog("L_INFO", "[$pr:$fU@$si:$sp]: Updated Chat History Summary: $avp(new_body) \n");

            #### self message with json body ####
            $uac_req(all)=$null;
            $uac_req(method)="MESSAGE";
            $uac_req(furi)=$fu;
            $uac_req(turi)=$fu;
            #$uac_req(evroute)=1;
            $uac_req(callid)=$uuid(r);
            $uac_req(hdrs)="Content-Type: application/json\r\nDate: " + $TF + "\r\n";
            $uac_req(body)=$avp(new_body);

            $uac_req(ruri)=$avp(sender_ruri);
            $uac_req(ouri)=$avp(sender_duri);
            $uac_req(sock)=$avp(sender_sock);

            uac_req_send();
</code></pre>
<p>Note that variable <strong>$avp(new_body)</strong> was set by PERL script. There is a theory from one of my developers is that since REDIS failed to connect so this variable was never set and when UAC tried to set NULL as JSON body for SIP MESSAGE request, the crashed must have happened. However, the core dump attached in this ticket does not confirm that.</p>
<p>This resulted in this syslog messages,</p>
<pre><code>Sep  3 02:59:56 webrtc-service kamailio[5987]: NOTICE: <script>: [wss:xxxxxxxx@x.x.x.x:52025]: Found '26' db records for SIP SCI command 'chat_summary'
Sep  3 03:02:03 webrtc-service kamailio[5987]: ERROR: app_perl [kamailioxs.xs:1041]: XS_Kamailio__Message_log(): perl error: Could not connect to Redis server at 172.16.x.x:6379: Connection timed out at /usr/share/perl5/Redis.pm line 420#012#011Redis::__build_sock('Redis=HASH(0x93a1948)') called at /usr/share/perl5/Redis.pm line 407#012#011eval {...} called at /usr/share/perl5/Redis.pm line 407#012#011Redis::__connect('Redis=HASH(0x93a1948)') called at /usr/share/perl5/Redis.pm line 65#012#011Redis::new('Redis', 'server', '172.16.x.x:6379', 'reconnect', 2, 'every', 100, 'encoding', undef, ...) called at /usr/local/kamailio/etc/kamailio/chat_history.pl line 2272#012#011main::get_chat_sessions('Kamailio::Message=SCALAR(0x8cddb64)', 502100012130) called at /usr/local/kamailio/etc/kamailio/chat_history.pl line 0#012#011eval{...} called at /usr/local/kamailio/etc/kamailio/chat_history.pl line 0#012#011...propagated at /usr/share/perl5/Redis.pm line 410.#012
Sep  3 03:02:03 webrtc-service kernel: [7785063.653846] kamailio[5987]: segfault at 318 ip b4ec
</code></pre>
<p>Let know if you have any further queries.</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/2055?email_source=notifications&email_token=ABO7UZPHLSHS3DYHTI5NASLQJNF4ZA5CNFSM4ITGY4MKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6ULN6I#issuecomment-531150585">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZIF7BTNAMMLTEFAJW3QJNF4ZANCNFSM4ITGY4MA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZOAZANG6YLULN6WE33QJNF4ZA5CNFSM4ITGY4MKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6ULN6I.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/2055?email_source=notifications\u0026email_token=ABO7UZPHLSHS3DYHTI5NASLQJNF4ZA5CNFSM4ITGY4MKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6ULN6I#issuecomment-531150585",
"url": "https://github.com/kamailio/kamailio/issues/2055?email_source=notifications\u0026email_token=ABO7UZPHLSHS3DYHTI5NASLQJNF4ZA5CNFSM4ITGY4MKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6ULN6I#issuecomment-531150585",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>