Memtest86


MemTest86 and Memtest86+ are memory test software programs designed to test and stress test an x86 architecture computer's random access memory for errors, by writing test patterns to most memory addresses, reading back the data, and comparing for errors. Each tries to verify that the RAM will accept and correctly retain arbitrary patterns of data written to it, that there are no errors where different bits of memory interact, and that there are no conflicts between memory addresses.

History

MemTest86 was developed by Chris Brady in 1994. After MemTest86 remained at version 3.0 for two years, Samuel Demeulemeester created the Memtest86+ fork to add support for newer CPUs and chipsets. the latest version of Memtest86+ is 5.01.
MemTest86 is written in C and x86 assembly. The source code of MemTest86 and of the MemTest86+ fork is released under the GNU General Public License. The bootloading code was originally derived from Linux 1.2.1. The program is compiled as position-independent code so as to be able to move itself around and test all the memory regions. Both versions now support current multi-core processors and the corresponding chipsets.
Starting from MemTest86 2.3 and Memtest86+ 1.60, the program can output a list of bad RAM regions in the format expected by the BadRAM patch for the Linux kernel. GRUB2 is able to supply this same information to an unpatched kernel, making the BadRAM patch unnecessary. Microsoft Windows has a similar feature, but manual conversion is required for setting it up.
In February 2013, the original MemTest86 was sold to PassMark. The BIOS version was updated under GPL until version 4.3.7. By then the feature set of the two forks were approximately equal.
MemTest86 Version 5.0 was rewritten for UEFI booting, allowing for secure boot approval and mouse support. All UEFI versions are released under a proprietary freeware license. When UEFI is not available, Version 5.0 fall back to BIOS booting and loads the old version 4.3.7. Version 6.0.0 adds support for DDR4 RAM, and a row-hammer test based on research from Yoongu Kim, et al.
MemTest86+ Version 5.31b was released almost 6 years after the prior official release, "with many bug fixes in the core functions. This build is not ready for production yet, because it lacks some feedbacks from beta-testers. Additional features and updated detection code will follow soon, as soon I have access to my lab with all the reference test platforms. It's currently inaccessible due to the COVID19 lockdown."

Description

There are two development streams of Memtest86. The original is simply known as MemTest86. The other, known as Memtest86+, is a development fork of the original MemTest86. Their on-screen appearance and functionality were almost identical up until the v4 releases. However, version 5 of MemTest86 added a mouse-driven graphical user interface and UEFI support.
These programs work with nearly all PC-compatible computers from 80386- and 80486-based systems to the latest systems with 64-bit processors. Each new release adds support for newer processors and chipsets.
MemTest86 is designed to run as a stand-alone, self-contained program from a bootable USB flash drive, CD-ROM, floppy disk, or from a suitable boot manager without an operating system present. This is because the program must directly control the hardware being tested and leave as much of the RAM space as possible for examination.
MemTest86's testing is very comprehensive so it can find otherwise hidden problems on machines that appear to work normally. With many chipsets, MemTest86 allows counting of failures even in error-correcting ECC DRAM.
Some errors manifest intermittently or depend on the precise bits being stored, and do not occur on each pass; such errors may be revealed by running many passes over an extended period. Some tests use different data each pass to reveal data-dependent errors.

Adoption

MemTest86+ is a part of many Linux distributions, including Debian, the derived Ubuntu, and Arch Linux. Ubuntu includes it as part of the default installation if the machine is booting in BIOS mode; it is available from the GRUB OS-select menu. These distributions include many types of "patches" to keep the 2013 code base functional. For example, Debian has patches that update the makefile for GCC version 5 and makes the program Multiboot compliant.