The kamailio port crashes after some amount of time, between minutes and 2 hours. Only happens with the port the source from github compiled on my own doesn't crash. I had a issue opened on the kamailio github repository and the developer had responded to it. https://github.com/kamailio/kamailio/issues/604 Log: ---- Jun 21 15:46:34 <local0.crit> voip kamailio[8776]: CRITICAL: <core> [pass_fd.c:275]: receive_fd(): EOF on 13 Jun 21 15:46:34 <kern.info> voip kernel: pid 8763 (kamailio), uid 986: exited on signal 6 (core dumped) Jun 21 15:46:34 <kern.info> voip kernel: pid 8764 (kamailio), uid 986: exited on signal 6 (core dumped) Jun 21 15:46:34 <local0.alert> voip kamailio[8760]: ALERT: <core> [main.c:739]: handle_sigs(): child process 8763 exited by a signal 6 Jun 21 15:46:34 <local0.crit> voip kamailio[8776]: CRITICAL: <core> [pass_fd.c:275]: receive_fd(): EOF on 14 Jun 21 15:46:34 <local0.alert> voip kamailio[8760]: ALERT: <core> [main.c:742]: handle_sigs(): core was generated Backtrace: ---------- (gdb) bt #0 0x000000080110235a in thr_kill () from /lib/libc.so.7 #1 0x0000000801102346 in raise () from /lib/libc.so.7 #2 0x00000008011022c9 in abort () from /lib/libc.so.7 #3 0x0000000800e3195a in pthread_attr_getaffinity_np () from /lib/libthr.so.3 #4 0x0000000800e2d046 in pthread_mutex_destroy () from /lib/libthr.so.3 #5 0x0000000805b436b5 in rpc_reply () from /usr/local/lib/kamailio/modules/tm.so #6 0x0000000805b23f18 in tm_reply_mutex_lock () from /usr/local/lib/kamailio/modules/tm.so #7 0x0000000805b34ba2 in reply_received () from /usr/local/lib/kamailio/modules/tm.so #8 0x000000000057146b in forward_reply () #9 0x0000000000570cca in forward_reply () #10 0x00000000004682a4 in receive_msg () #11 0x0000000000645023 in udp_rcv_loop () #12 0x0000000000543cad in main_loop () #13 0x00000000005519a5 in main ()
Can you test with 4.4.1 ? It was committed a few seconds ago.
(In reply to Kurt Jaeger from comment #1) I did test with the lastest but still the same happens after some time. From what I get back from the main developer of the project, "pthread_mutex_destroy ()" is never called in that moment, so it must be called from the threading library. With that in mind maybe the atomic operations patch is the problem? # kamailio -v version: kamailio 4.4.1 (amd64/freebsd) 90be8b flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_PTHREAD_MUTEX, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, select, kqueue. id: 90be8b compiled on 09:50:13 Jun 28 2016 with clang 3.4 (gdb) bt #0 0x000000080111835a in thr_kill () from /lib/libc.so.7 #1 0x0000000801118346 in raise () from /lib/libc.so.7 #2 0x00000008011182c9 in abort () from /lib/libc.so.7 #3 0x0000000800e4795a in pthread_attr_getaffinity_np () from /lib/libthr.so.3 #4 0x0000000800e43046 in pthread_mutex_destroy () from /lib/libthr.so.3 #5 0x0000000805b477d5 in rpc_reply () from /usr/local/lib/kamailio/modules/tm.so #6 0x0000000805b28038 in tm_reply_mutex_lock () from /usr/local/lib/kamailio/modules/tm.so #7 0x0000000805b38cc2 in reply_received () from /usr/local/lib/kamailio/modules/tm.so #8 0x000000000055887b in forward_reply () #9 0x00000000005580da in forward_reply () #10 0x0000000000468564 in receive_msg () #11 0x0000000000628f53 in udp_rcv_loop () #12 0x000000000052ca8d in main_loop () #13 0x000000000053a785 in main ()
I commented out the atomic_ops patch and now the kamailio port is keep running for over a day. So there seem to be an issue with atomic_ops patch, maybe just for some cases but to kamailio server pinging each other is no an unlikely use case.
A commit references this bug: Author: pi Date: Wed Aug 24 04:17:52 UTC 2016 New revision: 420759 URL: https://svnweb.freebsd.org/changeset/ports/420759 Log: net/kamailio: 4.4.1 -> 4.4.2 - commented out atomic_ops patches as suggested in PR#210439 PR: 210439 Changes: http://www.kamailio.org/pub/kamailio/4.4.2/ChangeLog Submitted by: r.barenthin@terralink.de Changes: head/net/kamailio/Makefile head/net/kamailio/distinfo
Committed, thanks!