Memtest86+ in Ubuntu 20.04 doesn't work, switch to Coreboot branch or package new release v5.31b is available since 12/04/2020

Bug #1876157 reported by Boris Gjenero
114
This bug affects 18 people
Affects Status Importance Assigned to Milestone
memtest86+ (Baltix)
Medium
Mantas Kriaučiūnas
memtest86+ (Debian)
Confirmed
Unknown
memtest86+ (Ubuntu)
Undecided
Unassigned

Bug Description

Memtest in Ubuntu is very old, not updated since 2013, new Memtest86+ release v5.31b is available at http://memtest.org , dated 12/04/2020

*** Enhancements in v5.31b : ***
I've started compiling many codes branches to release public builds again! Here is Memtest86+ 5.31b, with many bug fixes in the core functions.

Also there is updated Memtest86+ branch at https://www.coreboot.org/Memtest86%2B - several people told, that this branch does work, where original Memtest 5.01 doesn't, see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=943752

---- Original bugreport ----
I ran it twice, and both times it hung at exactly 79% in the first test. Even fail safe mode hung exactly at that point.

Then I booted with the floppy image from memtest86+-4.10.floppy.zip and it worked fine.

Today I installed memtest86+_5.01-3ubuntu2_amd64.deb from Ubuntu 19.10 and that worked fine too.

The failing version is 5.01-3.1ubuntu1.

Memory configuration is 2 * 2 GB (F2-6400CL5-2GBPQ) and 2 * 1 GB (OCZ2G8001G) working in dual channel mode. CPU is Harpertown Xeon X5470 running at stock speed (3.33 GHz).

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: memtest86+ 5.01-3.1ubuntu1
ProcVersionSignature: Ubuntu 5.4.0-28.32-generic 5.4.30
Uname: Linux 5.4.0-28-generic x86_64
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: XFCE
Date: Thu Apr 30 13:51:01 2020
SourcePackage: memtest86+
UpgradeStatus: Upgraded to focal on 2020-04-06 (24 days ago)

Revision history for this message
Boris Gjenero (boris-gjenero) wrote :
Revision history for this message
Boris Gjenero (boris-gjenero) wrote :

Source package differences between memtest86+ 3ubuntu2 (which does a whole pass without errors) and 3.1ubuntu1 (which locks up at 79% in test 1) don't seem to explain this.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in memtest86+ (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastian Schleitzer (schleitzer) wrote :

memtest86+ 5.01 integrated in xubuntu 20.04 is crashing. It crashs at 30% (16GB) in the first test, after ~5s running. It is completely frozen.

I tried three PCs (all PCs: lagacy-boot, NO UEFI)

1.PC: memtest freeze , Desktop xubuntu 20.04 i7-2600, 16GB (4x4GB)

2.PC: memtest freeze , Thinkpad xubuntu 20.04 Thinkpad T520, i7-2670QM, 16GB (2x8GB)

3.PC: memtest is running fine: Thinkpad x220, xubuntu 18.04 i5-2520M 8GB (2x4GB)
I upgraded 3.PC to 20.04 - now memtest is also frozen at 60% (picture in attachment)

Revision history for this message
Sebastian Schleitzer (schleitzer) wrote :
summary: - memtest86+ hang on GA-P35-DS3R with X5470 and 6 GB
+ memtest86+ hang on GA-P35-DS3R with X5470 and 6 GB + 3 other PCs
summary: - memtest86+ hang on GA-P35-DS3R with X5470 and 6 GB + 3 other PCs
+ memtest86+ freeze on 4 different PCs
Revision history for this message
Sebastian Schleitzer (schleitzer) wrote : Re: memtest86+ freeze on 4 different PCs
Revision history for this message
Wes Newell (wesnewell) wrote :

memtest86+ freezes on my am4 ryzen 3 2200G and 3200G systems. Runs fine on all my older systems. And Theirs nothing wrong with the memory on the amd system. Multiple passes with another tester.

summary: - memtest86+ freeze on 4 different PCs
+ memtest86+ freeze on 6 different PCs
Revision history for this message
Mantas Kriaučiūnas (mantas) wrote : Re: memtest86+ freeze on 6 different PCs

Memtest in Ubuntu is very old, not updated since 2013, new Memtest86+ release v5.31b is available at http://memtest.org , dated 12/04/2020

*** Enhancements in v5.31b : ***
I've started compiling many codes branches to release public builds again! Here is Memtest86+ 5.31b, with many bug fixes in the core functions.

Also there is updated Memtest86+ branch at https://www.coreboot.org/Memtest86%2B - several people told, that this branch does work, where original Memtest 5.01 doesn't, see

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=943752

description: updated
summary: - memtest86+ freeze on 6 different PCs
+ Memtest86+ in Ubuntu 20.04 doesn't work, switch to Coreboot branch or
+ package new release v5.31b is available since 12/04/2020
Changed in memtest86+ (Baltix):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Mantas Kriaučiūnas (mantas)
milestone: none → baltix-18.04
Revision history for this message
Dave Chiluk (chiluk) wrote :

Get memtest into debian, and it will get pulled in to Ubuntu ... eventually. The reason it hasn't been updated is that Ubuntu does not wish to fork memtest from Debian.

Revision history for this message
Sebastian Schleitzer (schleitzer) wrote :

I think it is not the problem of the memtest version 5.01.

When I boot memtest 5.01 via USB-Stick it is working. No problems.

Only the integrated memtest 5.01 is making problems (started via grub, ubuntu 20.04)

memtest 5.01 was also working in ubuntu 18.04 (via grub). Then I upgraded to 20.04 -> Freeze problem

Changed in memtest86+ (Debian):
status: Unknown → Confirmed
Revision history for this message
Matthias Ferdinand (mf+ubuntu1) wrote :

Installed binary package memtest86+ from Debian Stable (memtest86+_5.01-3.1_amd64.deb) in the Ubuntu 20.04 installation, that version runs fine on all my systems where the Focal Fossa version hangs.

No source code changes between these versions, just differences in the generated grub menu entries and some translations.

Might actually be a toolchain (compiler, linker) issue.

Revision history for this message
Esokrates (esokrarkose) wrote :

Can confirm the issue with a Dell Precision M4700: While memtest of Ubuntu 18.04.5 server iso works, memtest of Ubuntu 20.04.1 server iso freezes instantly after 1 second.

Revision history for this message
Agent24 (tda7000) wrote :

I have a similar problem.

I have Ubuntu Studio 20.04 installed.
The included Memtest86+ 5.01 freezes at 55% on test #2 every single time.

Memtest86+ 4.20 from an Ubuntu 14.04 DVD passes without error.
Memtest86+ 5.31b downloaded and burned to a CD-RW passes without error.

I have also encountered the issue where Memtest86+ 5.01 freezes on many machines with SMP activated. I do not trust v5.01 to give reliable results any more.

Revision history for this message
Aapo Rantalainen (aapo-rantalainen) wrote :

Same problem with HP Elitebook 745 G2, 2x8GB DDR3-1600.

memtest from ubuntu 20.04.1 installer (memtest-5.01) freezes after two seconds (first test at 51%). This happers every time. Tested single RAM chip at a time.

memtest from ubuntu 18.04.2 installer (memtest-5.01) works. I run it for 10h with both RAM chips attached without problems.

Revision history for this message
Bernd Edlinger (bernd-edlinger) wrote :

Hi,

I am also affected by this problem. It is an overflow check
using undefined behavior in an overflow check in test.c
that looks like "if (pe + SPINSZ > pe && pe != 0)"
but with >4G memory pe + SIINSZ wraps around.

I think the most simple fix would be the following:

2020-12-15 Bernd Edlinger <email address hidden>

 * Makefile: Use -fwrapv-pointer for test.c.

diff -u memtest86+-5.01.orig/Makefile memtest86+-5.01/Makefile
--- memtest86+-5.01.orig/Makefile 2020-12-15 06:50:42.000000000 +0100
+++ memtest86+-5.01/Makefile 2020-12-15 06:54:08.941390803 +0100
@@ -58,7 +58,8 @@
  $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c

 test.o: test.c
- $(CC) -c -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding test.c
+ $(CC) -c -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
+ -ffreestanding -fwrapv-pointer test.c

 random.o: random.c
  $(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin -ffreestanding random.c

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "bug-fix for >4G memory" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Marius Nuennerich (mwrius) wrote :

I tried the patch from #15 but it still hangs for me, albeit after 3min and
not after a few seconds like without the patch.

I tried version 5.31b and it works fine.
Core i5-4570, 16 GiB RAM.

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

There is a fork and major rewrite of the Memtest86+: https://github.com/martinwhitaker/pcmemtest
Unlike Memtest86+, PCMemTest can be used with UEFI as well as with legacy BIOS.

I think Ubuntu and Debian should follow Mageia Linux distribution, where Memtest86 is replaced with PCMemTest, see Release Notes:

https://wiki.mageia.org/en/Mageia_8_Release_Notes#PCMemTest

PCMemTest
This is a fork and major rewrite of the Memtest86+ memory test utility. Unlike Memtest86+, PCMemTest can be used with UEFI as well as with legacy BIOS boot. PCMemTest replaces Memtest86+ as the memory test utility on all the Mageia ISOs. It may also be installed in a user's system.

PCMemTest can be started from GRUB EFI mode like Linux kernel:

menuentry "Memory Test (PCMemTest" {
 search --no-floppy --set=root --file /install/pcmemtest
 set gfxpayload=640x400,800x600,1024x768
 linux /install/pcmemtest
}

Revision history for this message
Andras Tim (tia) wrote :

I have the same issue as comment #6 on Ubuntu Server 20.04.1 installer that booted from a flash drive.

HW:

00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Desktop)
00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)
00:14.2 RAM memory: Intel Corporation Cannon Lake PCH Shared SRAM (rev 10)
00:16.0 Communication controller: Intel Corporation Cannon Lake PCH HECI Controller (rev 10)
00:17.0 SATA controller: Intel Corporation Cannon Lake PCH SATA AHCI Controller (rev 10)
00:1c.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #3 (rev f0)
00:1d.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #9 (rev f0)
00:1d.2 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #11 (rev f0)
00:1d.3 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #12 (rev f0)
00:1f.0 ISA bridge: Intel Corporation H370 Chipset LPC/eSPI Controller (rev 10)
00:1f.4 SMBus: Intel Corporation Cannon Lake PCH SMBus Controller (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller (rev 10)
02:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983
03:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 04)
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)

Revision history for this message
Richard Henschel (rhenschel) wrote :

Memtest86 5.01 hangs at 60% of first test on Ubuntu 21.04. The machine is Athlon II 640 on AMIBIOS 6.11 motherboard. I have seen another case just like this (hangs at 60%) on AskUbuntu. It worked fine when two 2 Gig DDR3 1333 MHZ SRAM sticks in place and failed when two more identical sticks (same vendor, same part number) were installed. I used 'memtester 6650M' (just leaves enough for OS) for 5 cycles with no errors.

Revision history for this message
Richard Henschel (rhenschel) wrote :

Addendum to comment #21:

sudo apt list --installed | grep memtest

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

memtest86+/hirsute,now 5.01-3.1ubuntu4 amd64 [installed]
memtester/hirsute,now 4.5.0-1 amd64 [installed]

Revision history for this message
Richard Henschel (rhenschel) wrote :

Addendum to comment #21:
The memtest86+ version 5.31b ISO image from http://www.memtest.org/ seems to work fine on this hardware. Source is there as well. Will they let Ubuntu use it?

Revision history for this message
H Buus (faginbagin) wrote :

I wasted a lot of time and angst on this issue. The 20.04 version works as long as I only test with 4GB installed, it hangs if there is more memory. Same memory works fine with PassMark's memtest86 v4.3.7 and with memtest86+ v5.31b. I haven't tried v5.01 directly downloaded from memtest86.org.

I can't help but wonder how may people think they've got bad memory because this tool is broken.

Revision history for this message
Alec Wright (alecjw) wrote :

Also encountering this same issue on ubuntu 20.04.2 with HP zbook 17 G2. Memtest loaded through grub freezes. I thought this was because my hardware was faulty. I nearly returned it under warranty.

But downloading memtest86+ 5.01 from memtest.org and loading via syslinux worked fine, and memtest reached 100%. I thought it might be a GRUB issue but copying /boot/memtest86+.bin to my USB drive and loading via syslinux caused the same freeze. So the problem is with the ubuntu build of memtest86+.

Memtest86+ is supposed to "completely reliable", according to their website. A diagnostic tool is near useless if it gives false positives, and a freeze of memtest86+ would seem to indicate a severe memory failure. Including this build in ubuntu is doing a disservice to upstream and to users.

Revision history for this message
Simon Déziel (sdeziel) wrote :

Here too, memtest86+ 5.01 version from Ubuntu would consistently freeze during test #2 (58% in). If test #2 was skipped, test #3 would trigger a reboot at some point. Those 2 problems only occurred when more than 4G was installed in the system.

Switching to the pre-compiled binary from https://www.memtest.org/ version 5.31b showed that there were no problem with the memory/board, the tests all completed successfully.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.