1. Thinkpad t520; Ubuntu 12.04.1 LTS; 3.2.0-33-generic; 16GB of ram.
  2. Memtest86+ ran for 26 hours, 9 passes, no errors.
  3. Booted into "recovery mode": ran fsck all filesystems - no errors; "check all packages" - no errors.
  4. Apparent random memory corruption: perl/R/chrome segfault every now and then, seemingly at random; sort(1) produces corrupt unsorted files.

What could be possibly wrong and how do I debug it?

  • I have a high confidence that memtest86 will find faulty memory if it exists. Are you sure it's seeing all of the memory, and not just the first 4 GB? I believe it uses 32 bit code, so may not be addressing all of the memory? – fabricator4 Nov 18 '12 at 5:33
  • it reported that it was seeing and testing 16GB. – sds Nov 18 '12 at 7:13
  • If you want to exclude problem caused by defective memory modules, I'd definitely try testing one by one with memtest since if you test all of them, even if it detects errors you still wouldn't know which module has caused it. – Marcin Kaminski Nov 23 '12 at 23:32

Random memory corruption doesn't tell you that it's for sure memory module problem, there might be lots of other reasons. Starting with software and configuration...

  • You might have been unlucky and your package tree is 1-in-a-million-chance "internally consistent", while "externally inconsistent" (package and crc corruption resulting in valid package) <- purely theoretical.
  • Using not stable branch packages with a bug (software, system or kernel).
  • Using stable branch packages with a bug (system bug in your specific hardware and software conditions) or outdated versions.
  • Virus, that corrupts in-memory files, like libraries already cached from hdd.
  • Kernel problem - one of your kernel drivers is not as stable as it should be. Example? Virtualbox driver is known to cause some random memory problems in host. Other, especially custom (or beta) drivers might cause similar (or other) bad stuff happening.
  • Malfunctioning external devices, their drivers might not make some sanity checks... which are not needed for fully operational hardware.
  • Hardware problems, while not exactly memory module problem. Malfunctioning internal devices - your chips (like audio/graphics) or pci/pcie cards might be corrupted and might do bad things on your system memory, as they all share the hardware level memory access. Or they might corrupt other parts, that corrupt the memory.
  • Environmental problems - Your CPU or bridges might be overheated - (especially the north bridge which connects CPU with system memory, but lately is combined in CPU) - but mind you, they might get overheated from other actions taking place, like GPU-hungry applications (so you won't get any errors in memory-testing software running on VGA session).

So - as you see, there are many different possibilities, but most of the stuff above doesn't happen often in such cases. I'd recommend you trying running the system from liveCD and checking if it segfaults there, if it does, trying to unplug any hardware you don't really need (or disabling it in bios/uefi), then - checking memory module in another computer and checking your computer with different memory module.


There are other tools for RAM testing within Ubuntu. It is possible that they will detect errors that Memtest86+ doesn't, since the errors depend on the patterns written to memory.

MPrime is a popular RAM and CPU tester. If you use it to test RAM, make sure that you manually specify the amount of memory to use—otherwise it defaults to 1600 MB. E.g.,

Type of torture test to run (3): 13
Min FFT size (in K) (8): 
Max FFT size (in K) (4096): 
Memory to use (in MB, 0 = in-place FFTs) (1600): 15000

memtester is another RAM tester and is in the repository.

  • so you are suggesting that the problem is with the memory itself, not its compatibility with the laptop or something else? – sds Nov 22 '12 at 18:05
  • @sds I think that's possible. I have had memory errors in the past that showed up quickly in memtester, but not in (~10 repetitions of) Memtest86+. It would help to have some way of quickly reproducing these errors. Have you tried running with only one RAM module to see if the random memory corruption still occurs? – Vincent Yu Nov 22 '12 at 22:46

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.