<p></p>
<p><strong>Description</strong></p>
<p>facing crashes the server, raised by qm_debug_check_frag().</p>
<p><strong>Troubleshooting</strong></p>
<p>The error message:</p>
<p>Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbdc31f360, fd 31166<br>
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbcbf232a8, fd 31326<br>
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbd990b9e8, fd 31327<br>
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbd89cd1d8, fd 31360<br>
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbcf0bab28, fd 31434<br>
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbc6e031b0, fd 31471<br>
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbdb7fd598, fd 31472<br>
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbdeb334c8, fd 31494<br>
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbddee6de8, fd 31524<br>
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbdb91ef70, fd 31576<br>
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbc76a1da8, fd 31690<br>
Jan 23 12:27:31 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: CRITICAL: [core/io_wait.h:596]: io_watch_del(): invalid fd 31327, not in [0, 2054)<br>
Jan 23 12:27:31 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: CRITICAL: [core/io_wait.h:596]: io_watch_del(): invalid fd 31360, not in [0, 2054)<br>
Jan 23 12:27:31 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: CRITICAL: [core/io_wait.h:596]: io_watch_del(): invalid fd 31434, not in [0, 2054)<br>
Jan 23 12:28:09 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2809]: ALERT: [main.c:777]: handle_sigs(): child process 2858 exited by a signal 6<br>
Jan 23 12:28:09 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2809]: ALERT: [main.c:780]: handle_sigs(): core was generated<br>
Jan 23 12:28:09 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2809]: CRITICAL: [core/mem/q_malloc.c:138]: qm_debug_check_frag(): BUG: qm: fragm. 0x7fdbd7e8a0e8 (address 0x7fdbd7e8a120) end overwritten (5fd4cd2e, abcdefed)! Memory allocator was called from core: core/usr_avp.c:626. Fragment marked by core: core/usr_avp.c:175. Exec from core/mem/q_malloc.c:511.</p>
<p>The output from GDB:</p>
<p>GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-110.el7<br>
Copyright (C) 2013 Free Software Foundation, Inc.<br>
License GPLv3+: GNU GPL version 3 or later <a href="http://gnu.org/licenses/gpl.html" rel="nofollow">http://gnu.org/licenses/gpl.html</a><br>
This is free software: you are free to change and redistribute it.<br>
There is NO WARRANTY, to the extent permitted by law. Type "show copying"<br>
and "show warranty" for details.<br>
This GDB was configured as "x86_64-redhat-linux-gnu".<br>
For bug reporting instructions, please see:<br>
<a href="http://www.gnu.org/software/gdb/bugs/" rel="nofollow">http://www.gnu.org/software/gdb/bugs/</a>...<br>
Reading symbols from /usr/local/fep-kamailio/sbin/kamailio...done.<br>
[New LWP 2809]<br>
[Thread debugging using libthread_db enabled]<br>
Using host libthread_db library "/lib64/libthread_db.so.1".<br>
Core was generated by <code>/usr/local/fep-kamailio/sbin/kamailio -f /usr/local/fep-kamailio/etc/kamailio/k'. Program terminated with signal 6, Aborted. #0 0x00007fde7acbf277 in raise () from /lib64/libc.so.6 Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.26-21.el7.x86_64 glibc-2.17-222.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-19.el7.x86_64 libcom_err-1.42.9-12.el7_5.x86_64 libcurl-7.29.0-54.el7.x86_64 libgcc-4.8.5-36.el7_6.1.x86_64 libidn-1.28-4.el7.x86_64 libselinux-2.5-12.el7.x86_64 libssh2-1.4.3-10.el7_2.1.x86_64 libstdc++-4.8.5-36.el7_6.1.x86_64 libunistring-0.9.3-9.el7.x86_64 nspr-4.21.0-1.el7.x86_64 nss-3.44.0-4.el7.x86_64 nss-softokn-freebl-3.44.0-5.el7.x86_64 nss-util-3.44.0-3.el7.x86_64 openldap-2.4.44-5.el7.x86_64 openssl-libs-1.0.2k-12.el7.x86_64 pcre-8.32-17.el7.x86_64 zlib-1.2.7-17.el7.x86_64 (gdb) bt #0 0x00007fde7acbf277 in raise () from /lib64/libc.so.6 #1 0x00007fde7acc0968 in abort () from /lib64/libc.so.6 #2 0x00000000006d7c95 in qm_debug_check_frag (qm=0x7fdbc25ae000, f=0x7fdbd7e8a0e8, file=0x817155 "core: core/usr_avp.c", line=626, efile=0x83f7c5 "core/mem/q_malloc.c", eline=511) at core/mem/q_malloc.c:140 #3 0x00000000006db99e in qm_free (qmp=0x7fdbc25ae000, p=0x7fdbd7e8a120, file=0x817155 "core: core/usr_avp.c", func=0x8189a0 <__FUNCTION__.8526> "destroy_avp_list_unsafe", line=626, mname=0x817150 "core") at core/mem/q_malloc.c:511 #4 0x00000000005e7ede in destroy_avp_list_unsafe (list=0x7fdbd7e8a950) at core/usr_avp.c:626 #5 0x00007fde38d4bd8f in free_cell_helper (dead_cell=0x7fdbd7e8a750, silent=1, fname=0x7fde38e4267f "h_table.c", fline=466) at h_table.c:255 #6 0x00007fde38d4c9e1 in free_hash_table () at h_table.c:466 #7 0x00007fde38df9cd0 in tm_shutdown () at t_funcs.c:88 #8 0x0000000000581960 in destroy_modules () at core/sr_module.c:746 #9 0x000000000041cda7 in cleanup (show_status=1) at main.c:563 #10 0x000000000041e682 in shutdown_children (sig=15, show_status=1) at main.c:706 #11 0x0000000000421715 in handle_sigs () at main.c:806 #12 0x000000000042b9a7 in main_loop () at main.c:1817 #13 0x0000000000433b96 in main (argc=9, argv=0x7ffea05cd2c8) at main.c:2856 (gdb) bt full #0 0x00007fde7acbf277 in raise () from /lib64/libc.so.6 No symbol table info available. #1 0x00007fde7acc0968 in abort () from /lib64/libc.so.6 No symbol table info available. #2 0x00000000006d7c95 in qm_debug_check_frag (qm=0x7fdbc25ae000, f=0x7fdbd7e8a0e8, file=0x817155 "core: core/usr_avp.c", line=626, efile=0x83f7c5 "core/mem/q_malloc.c", eline=511) at core/mem/q_malloc.c:140 p = 0x7ffea05cc3b0 __FUNCTION__ = "qm_debug_check_frag" #3 0x00000000006db99e in qm_free (qmp=0x7fdbc25ae000, p=0x7fdbd7e8a120, file=0x817155 "core: core/usr_avp.c", func=0x8189a0 <__FUNCTION__.8526> "destroy_avp_list_unsafe", line=626, mname=0x817150 "core") at core/mem/q_malloc.c:511 qm = 0x7fdbc25ae000 f = 0x7fdbd7e8a0e8 size = 408 next = 0x7fdbd7e8a5c8 prev = 0x7fdbd7e8a1d8 __FUNCTION__ = "qm_free" #4 0x00000000005e7ede in destroy_avp_list_unsafe (list=0x7fdbd7e8a950) at core/usr_avp.c:626 avp = 0x7fdbd7e8a080 foo = 0x7fdbd7e8a120 __FUNCTION__ = "destroy_avp_list_unsafe" #5 0x00007fde38d4bd8f in free_cell_helper (dead_cell=0x7fdbd7e8a750, silent=1, fname=0x7fde38e4267f "h_table.c", fline=466) at h_table.c:255 b = 0x0 i = 1 rpl = 0x0 tt = 0x0 foo = 0x7fde34a5df80 <__FUNCTION__.7259> cbs = 0x0 cbs_tmp = 0x7fde388fe570 __FUNCTION__ = "free_cell_helper" #6 0x00007fde38d4c9e1 in free_hash_table () at h_table.c:466 p_cell = 0x7fdbd7e8a750 tmp_cell = 0x7fdbc27e3060 i = 40845 __FUNCTION__ = "free_hash_table" #7 0x00007fde38df9cd0 in tm_shutdown () at t_funcs.c:88 __FUNCTION__ = "tm_shutdown" #8 0x0000000000581960 in destroy_modules () at core/sr_module.c:746 t = 0x7fde3c51e4c0 foo = 0x7fde3c51e020 __FUNCTION__ = "destroy_modules" #9 0x000000000041cda7 in cleanup (show_status=1) at main.c:563 memlog = 0 __FUNCTION__ = "cleanup" #10 0x000000000041e682 in shutdown_children (sig=15, show_status=1) at main.c:706 __FUNCTION__ = "shutdown_children" #11 0x0000000000421715 in handle_sigs () at main.c:806 chld = 0 chld_status = 134 any_chld_stopped = 1 memlog = -1027733624 __FUNCTION__ = "handle_sigs" #12 0x000000000042b9a7 in main_loop () at main.c:1817 i = 10 pid = 2893 si = 0x0 si_desc = "udp receiver child=9 sock=10.50.7.18:5060\000:0:0:1]:5060\000:5060)\000\000\000\004\000\000\000\000\000\000\000\000\340Z\302\333\177\000\000\000\000\000\000\000\000\000\000 \006\276\302\333\177\000\000</code>\315\\240\376\177\000\000\220\006\276\302\333\177\000\000r\fb3\336\177\000\000P\246\222<\336\177\000"<br>
nrprocs = 10<br>
woneinit = 1<br>
<strong>FUNCTION</strong> = "main_loop"<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="52784350" data-permission-text="Title is private" data-url="https://github.com/kamailio/kamailio/issues/13" data-hovercard-type="pull_request" data-hovercard-url="/kamailio/kamailio/pull/13/hovercard" href="https://github.com/kamailio/kamailio/pull/13">#13</a> 0x0000000000433b96 in main (argc=9, argv=0x7ffea05cd2c8) at main.c:2856</p>
<p><strong>Additional Information</strong></p>
<p>Kamailio Version - output of Kamailio -v</p>
<p>version: kamailio 5.4.2 (x86_64/linux) f8885c<br>
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<br>
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB<br>
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.<br>
id: f8885c<br>
compiled on 04:30:53 Dec 16 2020 with gcc 4.8.5</p>
<p><strong>Operating System:</strong></p>
<p>NAME="CentOS Linux"<br>
VERSION="7 (Core)"<br>
ID="centos"</p>
<p><strong>Note:</strong><br>
It looks similar to the following issue</p>
<p><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="718055250" data-permission-text="Title is private" data-url="https://github.com/kamailio/kamailio/issues/2503" data-hovercard-type="issue" data-hovercard-url="/kamailio/kamailio/issues/2503/hovercard" href="https://github.com/kamailio/kamailio/issues/2503">#2503</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/2607">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZOPS2GFUNBT3O4AEHLS3UYNNANCNFSM4WRNODQA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZJTNEIMP3QLBCZGFVTS3UYNNA5CNFSM4WRNODQKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4L2HENEA.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/2607",
"url": "https://github.com/kamailio/kamailio/issues/2607",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>