[GRLUG] crontab not running a working script

Roberto Villarreal rvillarreal at mktec.com
Thu Jan 12 19:32:57 EST 2012


On Thursday, January 12, 2012 06:33:52 pm John-Thomas Richards wrote:
> > 
> > Okay, kill the quotes... I just ran a quick test with a command that took
> > an argument, and got a similar error... the quotes are making it look
> > like that whole thing is the command.  Kill the single quotes, and see
> > if you get your file.
> 
> Oh, my.  The file resulting from 'diff strace1 strace2 > strace.diff' is
> 24,700 lines.  Here are the first two lines.
> 
> 1,2c1,2
> < execve("/usr/bin/syncevolution", ["syncevolution", "memotoo"], [/* 6 vars
> */]) = 0 < brk(0)                                  = 0x227e000
> ---
> 
> > execve("/usr/bin/syncevolution", ["syncevolution", "memotoo"], [/* 32
> > vars */]) = 0 brk(0)                                  = 0x1b21000
> 
> I have very little idea what any of that means but "6 vars" vs "32 vars"
> seems, well, I have no idea.  It seems they should be the same, but then,
> see my .sig. What should I look for in this huge file?  Searching for
> "password" (since that's the error message) reveals three lines, all from
> the cron version of the strace file.

Appropriate sig!

What to look for... it's one of those "you know it when you see it".  But the 
fact that "password" only shows up in one file could be a start.  Really, you 
are looking for when they diverge... the first output is your "control" (when 
everything works), and as soon as they diverge, that's your clue as to what is 
different about running under cron vs. interactively.

Maybe stick with file open() calls... see if your cron version ever even 
attempts to open your config file.  That would confirm whether it even *tried* 
to open the file.... if it tried, whether it suceeded, if it suceeded, what it 
read, etc.  If it never even tried reading your config file, maybe other file 
reads from 'earlier' happened that didn't occur in your control run.

I told you your eyes would bleed!  Feel free to send the two files and I can 
take a quick look... but if you didn't know or didn't figure it out, strace 
basically shows you the *system calls* the program is making.  It's very 
possible or likely that your issue is a bug in the application and has nothing 
to do with the system, but how the application interacts with the system can 
yield clues.

Don't try to really "understand" all of it; I have no idea what the difference 
in that example is.  It's the patterns and discrepancies that will tell you 
something.

(Oh... keep in mind that there could be "personal" info could be in there... 
there could be data that was read from files that could show up in the read() 
calls.)

Roberto

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the grlug mailing list