hel


From time to time (it does not depend upon traffic) we see in logs:

 ERROR: <core> [tcp_read.c:274]: tcp_read_data(): error reading: Bad file descriptor (9) ([ip_address]:49832 -> [ip_address]5060)
 ERROR: <core> [tcp_read.c:1303]: tcp_read_req(): ERROR: tcp_read_req: error reading
ERROR: <core> [io_wait.h:608]: io_watch_del(): trying to delete already erased entry 3031 in the hash(0, 0, (nil)) flags 10)
CRITICAL: <core> [tcp_read.c:1654]: handle_io(): io_watch_del failed for 0x7f8471c51820 id 867 fd 3031, state 0, flags 4018, main fd 179, refcnt 2 ([ip_address]:49832 -> [ip_address]:5060)

there are a lot of such TCP CRITICAL errors and the kamailio crushes

kamailio -v
version: kamailio 4.3.5 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 17:51:55 Mar  8 2016 with gcc 4.4.7

It is still not clear - what exactly causes such behaviour.

I want to recriate it in the lab - so what can cause it.?

May be a process erases the file descriptors of TCP connections?

Any help is appreciated.