LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Bus Error? (http://www.linuxquestions.org/questions/linux-newbie-8/bus-error-127803/)

Chu 12-21-2003 10:34 AM

Bus Error?
 
I don't really know what to say/ask...

I try to run a binary a friend gave me, and I get this:
chu@darkstar:~/downloads$ ./server
Bus error

I've never seen, or heard of a Bus Error before.. If anyone knows anything, please help me.

michaelk 12-21-2003 02:16 PM

So what kind of application is server? Not enough information, the error isn't specific enough. Have you asked your friend who gave you the program?

MartinN 12-21-2003 05:06 PM

Please let me excel, now that I for once have a chance. :) I think that Chu is running Linux on something other than an x86 machine. Is that correct?

A bus error is when you try to access 32 bit data that is not aligned on 4 byte boundaries. Some CPUs refuse to do that, but not an x86. An x86 machine will read the 4 bytes but in two consecutive fetches from RAM.

In short; this is a program error similar to a "Segmentation Fault".

Regards
Martin (with a wise guy face)

h/w 12-21-2003 06:11 PM

a-ha! i got a bus error on my solaris machine yday. it was cos of a for loop (so check your loops) i had written which was trying to go beyond the limits(indexes) i had set. ask your friend to check that, or send u the src? so, as martinn said, its akin to a segmentation fault - ur trying to access mem you shouldnt.

Chu 12-21-2003 11:42 PM

Well it seems that the problem was:

The binary was on an FTP I started downloading the binary, but I cancelled it half-way through.
I tried to run the half-downloaded version and got the Bus Error.
I later went back and downloaded the full binary and it works fine.
Sorry I didn't state my standing very well.

Thanks for the answers :)


All times are GMT -5. The time now is 05:20 PM.