From: Edwin Fine Date: 2007-02-20T06:33:12+09:00 Subject: Re: Bus errors & segfaults Blake Miller wrote: > I've been getting daily Bus Errors on various ruby classes, which is > crashing our Mongrel server pretty much every day. > > Here is an example error: > > ruby(15833,0xa000ed88) malloc: *** error for object 0x41b20d0: pointer > being reallocated was not allocated A bus error can occur if there is misaligned data on certain processor architectures, or if a physical address being accessed does not exist. If the virtual address does not exist, a segmentation fault occurs. You seem to be getting both. In this case, I believe that these errors are indicative of a serious software incompatibility issue, possibly between Ruby and its shared libraries. For example, if Ruby calls an into extension shared library, and the library functions are not at the expected addresses, you may get this kind of problem. The .so file might be corrupted. The .so file might have been compiled with different flags than Ruby was compiled with. All these could cause issues. * Has this been happening right from the start? * When did you first notice this behavior? * Do you have any Ruby extensions that might have been compiled with different compiler flags to the ones used to compile Ruby? Without more information, I would recommend recompiling all the Ruby and third-party extensions C code, ensuring that they are all compiled with the same compiler options. If you still get these issues, then more information would be needed, such as the processor in your server (PowerPC or Intel?), which compiler version you are using, which version of Ruby, etc. Good luck! -- Posted via http://www.ruby-forum.com/.