I've been running Kamailio 4.2.2/4.2.3 in a FreeBSD 10.1 jail for a few weeks, 
thanks to a recent port in the FreeBSD ports tree. However, it has been a bit 
unstable. It crashes randomly. It's hard to debug since it can go three days 
without crashing, and there is no obvious trigger.

I'm also running 4.1.0 on FreeBSD 8.3, compiled from source manually. It is 
rock solid for a long time now.

So, I have 2 theories:

1) My FreeBSd ports patch for ip_addr.h is wrong. I was having to define 
INADDR_LOOPBACK since compile would fail with 'undeclared identifier'. My patch 
was to define INADDR_LOOPBACK in ip_addr.h as a 'long' as such:

#define INADDR_LOOPBACK (long) 0x7F000001

However, it appears this should have been:

#define INADDR_LOOPBACK (unsigned long) 0x7F000001

The previous patch seemed to work, but could have caused the crashes I'm seeing.

2.) The NAT SIPPing feature defined with WITH_NATSIPPING is a new feature since 
4.1.0. So my 4.1.0 installation does not use it. Now that I am using it on 
4.2.3, I am getting this random crash. I suspect that the feature uses an ICMP 
ping at some stage. In FreeBSD jails, by default ping is not allowed (security 
feature). If you really need to ping then you need to explicitly allow raw 
sockets. So perhaps Kamailio doesn't know how to handle the "operation not 
permitted" and crashes.

I am going to test without NAT SIPping and see if it crashes. Although it's 
hard to test, since I have no trigger and it can be days between crashes.

** My question is: how do I force the ping behaviour in NAT SIPping feature? I 
need a trigger to further debug.



Output from /var/log/messages after crash:

Feb 19 05:39:56 sip /usr/local/sbin/kamailio[52610]: CRITICAL: <core> 
[pass_fd.c:293]: receive_fd(): EOF on 24
Feb 19 05:39:56 sip /usr/local/sbin/kamailio[52578]: ALERT: <core> 
[main.c:784]: handle_sigs(): child process 52606 exited by a signal 6
Feb 19 05:39:56 sip /usr/local/sbin/kamailio[52578]: ALERT: <core> 
[main.c:787]: handle_sigs(): core was generated


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to