<div>Hiya, just wanted to say thanks, will leave it at that and do some debugging I think :).</div>
<div> </div>
<div>Cheers all, Ian<br><br> </div>
<div><span class="gmail_quote">On 10/4/05, <b class="gmail_sendername">Mark Belanger</b> <<a href="mailto:mark_belanger@ltx.com">mark_belanger@ltx.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Ian mu wrote:<br>> Hiya, redid the crontab file and still crashed, had the strace running<br>> on it and compared the run without cron to the run from cron. It does
<br>> actually run the stats script so was misleading before, so I'm guessing<br>> previously just hadn't got as far as outputting it to file or something.<br><br>Hmm,,, if you're echoing in the stats script it should show up
<br>some place.<br><br>> Crashing server from cron strace, 10297 is the script, 10296 is a mrtg<br>> running from a different account which runs fine whatever...<br><br>First off, I'd remove mrtg from the equation(cron) and strip it down
<br>to just your program.<br><br>I guess then I'd focus on the portion of your script that<br>follows "### MODS ##################".<br><br>You might try different strace flags - make sure you are following<br>all forks.
<br><br>One trick I've used before is to replace the call to<br>the perl program in the stats script to open up the program<br>inside the perl debugger.  For instance, if the stats<br>script is running<br>/usr/local/bin/myscript.pl
<br>You could change it to:<br>typeset -x DISPLAY=mydisplay:0<br>xterm -e 'perl -d /usr/local/bin/myscript.pl'<br><br>Once it comes up, you can just continue to see if the<br>crash happens and if so you could step through the code
<br>until you find the offending lines.  If you're a "debug with print"<br>kind of guy you could still do the xterm trick but just insert<br>sleeps and prints into the perl program to narrow down<br>the exact line that is causing the problem.  After realize how
<br>much time was wasted with print statements, you can spend a couple<br>of hours learning the perl debugger :)<br><br>I'm afraid I'm running out of helpful(and intelligent)<br>feedback on this problem.  One thing I did notice, the mrtg script
<br>seemed to go through a fair amount of gyrations to find<br><a href="http://integer.pm">integer.pm</a> - though it's probably not related to the problem.<br><br>><br>> 10297 read(4, ",\n            \'*\' => \'ae181a\',\n "..., 4096) = 4096
<br>> 10297 read(4, ">[0] eq \'COMT\' and $r >= $floor;"..., 4096) = 4096<br>> 10297 brk(0)                            = 0x870a000<br>> 10297 brk(0x872b000)                    = 0x872b000<br>> ENOENT (No such file or directory)
<br>> -1 ENOENT (No such file or directory)<br>> file or directory)<br>> such file or directory)<br>> 0xbfff9ba0) = -1 ENOENT (No such file or directory)<br>> O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
<br>> (No such file or directory)<br>> (Inappropriate ioctl for device)<br>> 10297 read(4,  <unfinished ...><br>> 10297 <... read resumed> "\n}\n\n### MODS ###################"..., 4096)<br>
> = 3988<br>> = 3266<br>> 10297 read(4, "", 4096)                 = 0<br>> 10297 close(4)                          = 0<br>> 10297 open("", O_RDONLY|O_LARGEFILE <unfinished ...><br>
> <strace stopped here><br><br>-Mark<br><br><br>--<br>Mark Belanger<br>LTX Corporation<br>_______________________________________________<br>CentOS mailing list<br><a href="mailto:CentOS@centos.org">CentOS@centos.org
</a><br><a href="http://lists.centos.org/mailman/listinfo/centos">http://lists.centos.org/mailman/listinfo/centos</a><br></blockquote></div><br>