shell script segment fault when executed by crontab

Jan-Benedict Glaw jbglaw at
Sat Jun 17 19:41:43 GMT 2006

On Sat, 2006-06-17 09:54:07 -0400, Matt McCutchen <hashproduct+rsync at> wrote:
> On Sat, 2006-06-17 at 16:27 +0800, Reddragon Wang wrote:
> > I encounter a problem, program will segment fault when executed in a
> > shell by crontab. [...] The abstract is a program that uses shared
> > memory to compute the bill.
> This doesn't seem to have anything to do with rsync.  You should ask the
> authors of "abstract" why it is crashing.  However, I can think of two
> ways in general that you might be able to find out more about the crash:
> - Run "abstract" in a debugger, such as GDB.
> - Run "abstract" under valgrind.

Since it runs when being attended, this doesn't help all that much. My
initial guess was that the locale variables are wrong within/different
inside the shell script (when being run from crond) and that the
table(?) name is wrong. However, the format looks foolproof.

Though this kind of error (script runs when called manually but fails
when being called from cron) usually arises when environment variables
are wrong.

I'd use the `set' command (with output redirection) once on the
command line and once from within the script and compare both outputs.
Probably where are missing PATH entries or some other variables

Oh, the `ltrace' tool should visualize accesses to environment
variables, so its use might be an alternative approach.


Jan-Benedict Glaw       jbglaw at    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the rsync mailing list