<div dir="ltr">Solved it. Thank you for your help<br><br>Ido<br><br>On Thu, Nov 17, 2011 at 16:25, Nadav Har&#39;El <span dir="ltr">&lt;<a href="mailto:nyh@math.technion.ac.il">nyh@math.technion.ac.il</a>&gt;</span> wrote:<br>

<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Thu, Nov 17, 2011, ik wrote about &quot;Re: Detecting runaway process&quot;:<br>
<div class="im">&gt; Can&#39;t use gdb, it&#39;s a Ruby daemon (I didn&#39;t wrote it).<br>
&gt; And strace gives different outputs on each crash :(<br>
&gt;<br>
&gt; I can&#39;t figure out what is wrong.<br>
<br>
</div>The first step is to figure out if it exits because of a signal (e.g.<br>
SIGSEGV) or because it decides to exit on its own. Try to run it in a<br>
shell prompt, not in the background, and see if you see any message when<br>
it ends, and see what the exit status ($?) is at the end of the run.<br>
<br>
While it is running, see if its memory use is growing out of control<br>
(use ps or top to find this out). Perhaps it uses too much memory and<br>
gets killed by the oom-killer.<br>
<br>
See if you see any relevant messages in /var/log/messages.<br>
<br>
Try with strace, what is the last few lines? Is there an exit() at the<br>
end?<br>
If it appears it just exists on its own accord, maybe this is not a bug,<br>
but a feature? :-) Look at the code and try to find any place it might<br>
exit without any message. In certain languages (I don&#39;t know about Ruby)<br>
it is possible for uncought exceptions to kill the program without a<br>
message - can it be the cause here too?<br>
<br>
Anyway, good luck.  In general, it&#39;s NOT FUN to debug a program that<br>
someone else wrote... There is no magic bullet, just sweat.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Nadav Har&#39;El                        |                  Thursday, Nov 17 2011,<br>
<a href="mailto:nyh@math.technion.ac.il">nyh@math.technion.ac.il</a>             |-----------------------------------------<br>
Phone <a href="tel:%2B972-523-790466" value="+972523790466">+972-523-790466</a>, ICQ 13349191 |Isn&#39;t Disney World a people trap operated<br>
<a href="http://nadav.harel.org.il" target="_blank">http://nadav.harel.org.il</a>           |by a mouse?<br>
</font></span></blockquote></div><br></div>