PSA: If you're randomly getting "signal: 11, SIGSEGV invalid memory reference" during compilation, run MemTest86

321 points AndreVallestero

I recently set up a test bench for running my benchmark suite, however I noticed that I would randomly get signal: 11, SIGSEGV invalid memory reference every few days when building my docker images. After running MemTest86, I was able to verify that it was a bad stick of RAM, and once I replaced it, I haven't seen any issues.

This post is to raise awareness of the behavior of bad RAM when compiling Rust, as I wasn't able to find anything that helped me when searching for this error.

If your MemTest86 tests fail, I would recommend the following these troubleshooting steps:

  1. Disable any overclocks
  2. Disable XMP
  3. CMOS clear (reset BIOS to default settings)
  4. Update motherboard firmware
  5. Use one stick of RAM
  6. Try that one stick in each memory socket
  7. Replace that one stick with a different, preferably known working one
  8. Try the new stick in each memory socket