<p></p>
<h3>Description</h3>
<p>I would like to use <code>http_async_query</code> and after enabling the module, I notice Kamailio's main process crashes on exit or restart.  I have searched and find a number of tickets regarding http_async and crashes, but none related to exit/restart.</p>
<h3>Troubleshooting</h3>
<pre><code># coredumpctl info 410246
           PID: 410246 (kamailio)
           UID: 985 (kamailio)
           GID: 983 (kamailio)
        Signal: 11 (SEGV)
     Timestamp: Mon 2021-02-01 00:28:29 CST (11h ago)
  Command Line: /usr/sbin/kamailio -DD --loadmodule=systemdops.so -m 128 -M 8
    Executable: /usr/sbin/kamailio
 Control Group: /system.slice/kamailio.service
          Unit: kamailio.service
         Slice: system.slice
       Boot ID: 88a3838cfde647a29b3bd62f1e294ce2
    Machine ID: e71248e5a94b42069b4603dde95c99b4
       Storage: /var/lib/systemd/coredump/core.kamailio.985.88a3838cfde647a29b3bd62f1e294ce2.410246.1612160909000000.zst
       Message: Process 410246 (kamailio) of user 985 dumped core.
                
                Stack trace of thread 410246:
                #0  0x00007fd57d84383a BN_clear_free (libcrypto.so.1.1 + 0xb183a)
                #1  0x00007fd573f9d275 ssh_dh_finalize.part.0 (libssh.so.4 + 0x1e275)
                #2  0x00007fd573f8ec40 libssh_destructor (libssh.so.4 + 0xfc40)
                #3  0x00007fd57ead8cd3 _dl_fini (ld-linux-x86-64.so.2 + 0x10cd3)
                #4  0x00007fd57e7a4237 __run_exit_handlers (libc.so.6 + 0x40237)
                #5  0x00007fd57e7a43e0 exit (libc.so.6 + 0x403e0)
                #6  0x000000000041f61a handle_sigs (kamailio + 0x1f61a)
                #7  0x000000000042c61c main_loop (kamailio + 0x2c61c)
                #8  0x0000000000434cbd main (kamailio + 0x34cbd)
                #9  0x00007fd57e78c1e2 __libc_start_main (libc.so.6 + 0x281e2)
                #10 0x000000000041bbde _start (kamailio + 0x1bbde)
</code></pre>
<h4>Reproduction</h4>
<p>This happens at every kamailio shutdown.</p>
<h4>Debugging Data</h4>

<p><a href="https://github.com/kamailio/kamailio/files/5905920/gdb.txt">gdb.txt</a></p>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>version: kamailio 5.4.3-5.git06bd17a838.fc33.2 (x86_64/linux) e19ae3
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: e19ae3 
compiled on 00:00:00 Jan 24 2021 with gcc 10.2.1
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>Linux 5.10.10-200.fc33.x86_64 #1 SMP Sun Jan 24 19:58:54 UTC 2021 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/2616">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZKS2BJDNIJJYN5D77LS43YJTANCNFSM4W5IVWZQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZOF7XKVSAM4USBSDHDS43YJTA5CNFSM4W5IVWZ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4L4Z2FLQ.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/2616",
"url": "https://github.com/kamailio/kamailio/issues/2616",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>