<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    for this specific crash issue, just upgrade to 4.1.3, it should be
    fixed there.<br>
    <br>
    For automatic restart, look at 'monit' tool - open source, available
    in most distros. It can supervise processes by pid and restart, and,
    iirc, in its docs the should be an entry for openser. Anyhow, is
    rather simple, the basic cfg for kamailio in monit is something
    like:<br>
    <br>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    check process kamailio with pidfile /var/run/kamailio/kamailio.pid<br>
        start program = "/etc/init.d/kamailio start"<br>
        stop  program = "/etc/init.d/kamailio stop"<br>
        if 5 restarts within 5 cycles then timeout<br>
    <br>
    Also, it can do sip keepalives, being able to discover when kamailio
    is stuck.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 07/05/14 17:46, JR Richardson wrote:<br>
    </div>
    <blockquote
cite="mid:CA+U74VO9WRPO4r3irurLzp=QTvSbaC5XOa7t5c3TGfhKX1+tfQ@mail.gmail.com"
      type="cite">
      <pre wrap="">Hi All,

Just had a strange occurrence where kamailio has been up and running
fine for several months and just died with a strange error:

root@sip-router3:~# kamailio -V
version: kamailio 4.1.1 (x86_64/linux) ac7d55

May  7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2275]: : <core>
[mem/q_malloc.c:468]: qm_free(): BUG: qm_free: freeing already freed
pointer (0x7faf565586d0), called from <core>: mem/shm_mem.c:
sh_realloc(88), first free <core>: mem/shm_mem.c: sh_realloc(88) -
aborting
May  7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2271]: ALERT:
<core> [main.c:775]: handle_sigs(): child process 2275 exited by a
signal 6
May  7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2271]: ALERT:
<core> [main.c:778]: handle_sigs(): core was not generated
May  7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2271]: INFO:
<core> [main.c:790]: handle_sigs(): INFO: terminating due to SIGCHLD
May  7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2279]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May  7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2277]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May  7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2273]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May  7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2272]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May  7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2274]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May  7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2276]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May  7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2278]: INFO:
<core> [main.c:841]: sig_usr(): INFO: signal 15 received
May  7 10:09:51 sip-router3 /usr/local/sbin/kamailio[2271]: ERROR: ctl
[ctl.c:379]: mod_destroy(): ERROR: ctl: could not delete unix socket
/tmp/kamailio_ctl: Operation not permitted (1)


Not sure what that means, memory leak? I started started it right back
up with no indication of a problem.  Running Kamailio for many years,
I have never had an instance of it just shut down before.  So I'm
wondering if there are any safe scripts that check the running process
for kamailio and restart if automatically if not running?

I dug around a bit but not seeing any hits for auto start kamailio scripts.

And another question would be if this occurrence of shutting down
should be of concern or not?

Thanks.

JR
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>