Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 217324 - sys-apps/memtest86 and sys-apps/memtest86+ both fail when built with gcc-4.2 but work with gcc-4.1
Summary: sys-apps/memtest86 and sys-apps/memtest86+ both fail when built with gcc-4.2 ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-11 18:49 UTC by J.Taimr
Modified: 2008-09-28 11:02 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixed patch replacing -Os with -O1 (memtest86+-2.01-hardcoded_cc.patch,1.18 KB, patch)
2008-09-25 08:54 UTC, Keith Harrison
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description J.Taimr 2008-04-11 18:49:26 UTC
Gigabyte P35-DS3R MB (Bearlake), 8 GB Ram (Geil 800 MHz), Intel E8400 (Wolfdale) processor:
- memtest86 up to 2.01 incluseive freezes immediately after loading with the sensless detection of the memory speed (~ 19000 MB/s), approx. after 18 seconds during the first test (it goes to 50%, then it stops)
- memtest86+ up to 3.3 (inclusive) freezes similarly as like as memtest86. memtest86+-3.4 detects correctly hw params of the system, but freezes immediately (during first test) without testing anything.
System stays frozen in both cases.

Reproducible: Always

Steps to Reproduce:
1.boot memtest86 or memtest86+ at the next hw: E8400, P35-DS3R, 8 GB RAM
2.any of these programs produces hardlock of the system immediately
3.nothing but power-off can restore functionality of the PC

Actual Results:  
Totaly frozen PC, keyboard has numlock on, no key works (ESC, CapsLock, NumLock)

Expected Results:  
properly running memory tests

The same PC with the same MB, RAM e.t.c. with E6300 instead of E8400 can run both tests without problems.
- memtester-4.0.7 does not report any error after running overnight ( 7GB RAM tested at once in the passes).
Comment 1 Michal Januszewski (RETIRED) gentoo-dev 2008-04-11 20:05:29 UTC
Could you please try to download a precompiled binary from http://www.memtest.org/download/2.01/memtest86+-2.01.bin.gz to see whether it behaves in the same way as the one you're using now?
Comment 2 J.Taimr 2008-04-11 20:54:57 UTC
(In reply to comment #1)
> Could you please try to download a precompiled binary from
> http://www.memtest.org/download/2.01/memtest86+-2.01.bin.gz to see whether it
> behaves in the same way as the one you're using now?
Solved.
The distributed binary works as expected. Ditto memtest86+ compiled by gcc-4.1.2. So, it seems, gc-4.2.3 does not produce correct code in the case of memtest86+ (and likely this version of gcc should be blocked in the ebuild, if there are similar cases).
Thx a lot for fast reply.
Comment 3 Michal Januszewski (RETIRED) gentoo-dev 2008-04-13 14:00:16 UTC
Reassigning to base-system since the bug affects two packages.
Comment 4 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-07-17 21:24:08 UTC
Looks like I've hit the same problem today, with gcc-4.3. memtest86 repeatedly ended with "unexpected interrupt" shortly after starting first test (always in 20%), memtest86+ first reported thousands of memory errors and then also dumped and locked. Now it runs downloaded precompiled memtest86 without such problems. First I thought I've produced bad binary because of the memory I try to test and is probably bad, but then I saw this bug...
Comment 5 Michal Terepeta 2008-09-17 18:52:13 UTC
(In reply to comment #4)
> Looks like I've hit the same problem today, with gcc-4.3. memtest86 repeatedly
> ended with "unexpected interrupt" shortly after starting first test (always in
> 20%), memtest86+ first reported thousands of memory errors and then also dumped
> and locked. Now it runs downloaded precompiled memtest86 without such problems.

I had almost the same problem with both memtest86 and memtest86+ when compiled with gcc 4.3.1-r1. Both reporting thousands of errors and freezing. The precompiled versions work just fine.
Comment 6 Keith Harrison 2008-09-25 08:54:05 UTC
Created attachment 166360 [details, diff]
Fixed patch replacing -Os with -O1

Replacing -Os with -O1 fixes the problem for me. I'm running x86_64 with 4G memory.  Looks like using -O1 fixes the problem for others as well: https://bugs.launchpad.net/ubuntu/+source/memtest86+/+bug/246412

I fixed the attached patch to replace -Os with -O1
Comment 7 Michal Januszewski (RETIRED) gentoo-dev 2008-09-28 11:02:24 UTC
Thanks for the patch. Both memtest86 and memtest86+ should now be fixed in CVS.