0

I have cron jobs and every now and then they fail. Just after log message that the command has started, there is grandchild #X failed with exit status 3 message.

On the next run scripts finishes correctly. It happens to different scripts with different run periods (from minutely to once-a-day scripts). There seems to be no pattern.

Any suggestions?

EDIT:

I ran scripts in crontab in strace. The problem is the script gets killed because of SIGBUS:

--- SIGBUS (Bus error) @ 0 (0) ---
exit_group(3)                           = ?

However, still don't know why this is happening.

  • You have to post some crontab entries. This kind of error occurs when crond finds a syntax error in the command itself, like doing something fun with the date command. crontab syntax is NOT the same as bash or ksh. For example, the % character has to be escaped. – jim mcnamara Nov 5 '14 at 2:52
  • @jimmcnamara It cannot be wrong crontab syntax, because one minute the script ran, the very next it failed and the minute after it ran again. See my edit, the problem is SIGBUS. – Jakub Kulhan Nov 5 '14 at 7:59
  • This is likely not a problem with cron, grandchild if cron would be what you told cron to run. SIGBUS is the kernel/cpu/hardware telling your program it made a funky memory access. Can you tell us about what cron runs ? The full strace would be neat if you can post it (may contain sensitive info, so you may not want to post it). – Kjetil Joergensen Nov 5 '14 at 8:43
  • One more time: please post at least one line of the crontab entry - one that has failed. – jim mcnamara Nov 5 '14 at 13:12
  • As mentioned by @jimmcnamara and others. Please post the crontab entry/entries that are exhibiting the problem. If they point to a script, you might want to post that as well. – Signal15 Dec 8 '14 at 17:36
0

According to the man page for Signal (man 7 signal) a SIGBUS means Bus error (bad memory access). Since the problem is random or not easily reproduced 100% of the time, this means either;

  1. The Cron job is calling a program or script that is randomly failing
  2. A memory problem exists and should be checked for

If it is the former (#1), then check the program / script for any irregularities. However, it could be a RAM problem, so you might want to get a Boot-disk with MemTest86 on it and run a check for an hour or so.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.