Bus Error in cron job
I have set up a cron job for se开发者_Go百科nding emails from my site using php. It was working fine. Today I got one error message like this "/bin/sh: line 1: 29681 Bus error". Could you please tell me what is this bus error and its solutions?
Thanks In Advance
Rose
'bus error' probably means that the program that is being invoked is trying to dereference a null pointer or some similarly invalid memory address. It usually comes from using an uninitialised value (dereferencing a null pointer), or from using a value that has been accidentally overwritten (e.g. when the stack is pushed with saved values, but lengths are miscalculated or the wrong data type used to extract the data).
IME, there is rarely any implication of a hardware fault. It's usually a bug - so 'gdb' will usually help much more than 'dmesg'; that said, I was involved in some research on UNIX Systems back in 1991 that suggests that some cores and kernel panics are a consequence of power supply glitches (thunder storms in Austin, Texas), but those don't show up in 'dmesg' output despite being "hardware" :)
I'm currently getting this message in a SugarCRM installation, sometimes. About 99% of the time the cron.php works as expected. Sometimes I get a 'bus error - core dumped' message. I'm not getting a core dumped in the directory named in the crontab, though. That makes debugging this slightly more complex - I need to make sure that the core dump is being captured! I'm not too worried, as everything appears to be working. So it is a low priority task... I may find and fix it, eventually, but it is more likely that we'll upgrade to a newer version of PHP, MySQL and Sugar - and those changes may make the problem go away.
Seem a couple of threads about all sorts of causes.
Here is one I would try:
Some kind of hardware trouble is going on.
Try
`dmesg`
If that can't read it's own binary, you gotta reboot and hope that /var/log/messages has something useful from before the reboot.
I got this when the disk was full. Try df
to see.
精彩评论