Bug 773569

Summary: memtest+ 4.20 from 12.2/rc1 iso booted from an usb stick always errors in test #7, but same 4.20 from 12.1/x86 booted from iso written to dvd doesnt
Product: [openSUSE] openSUSE 12.2 Reporter: andreas bittner <abittner>
Component: OtherAssignee: Torsten Duwe <duwe>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P2 - High CC: arvidjaar, avallach2000, bjoernv, contezero, corax2.05, forgotten_KSYEYC9iJz, Greg.Freemyer, jeremy.figgins, kairo, koenig, mrmazda, Peter.Seiderer, suse-beta, walter.haidinger
Version: Final   
Target Milestone: ---   
Hardware: i686   
OS: openSUSE 12.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: source file test.c form memtest86+-4.20
working assembler file
broken assembler file
reverse patch, from working to broken
Declare that the asm snippet clobbers ecx.

Description andreas bittner 2012-07-29 13:40:48 UTC
User-Agent:       Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11

I was building a new test system described in my other bug over at
https://bugzilla.novell.com/show_bug.cgi?id=773565

smolts is:
http://www.smolts.org/client/show/pub_73920daf-1fba-42ec-be09-adb113ce053d

and I first thought I had serious hardware trouble as the memtest test number 7 resulted in endless errors. Changing ram modules, using only single modules or completely different ones for example different in speed and latencies always resulted in the same test number 7 failing seriously

I was using the memtest+ 4.20 from the 12.2/rc1/x86 image written to a usb key / usb stick and booted from that stick on that uefi system from above.


Eventually I used my older 12.1/x86 dvd iso booting via dvd rom drive and dvd rom, also having memtest+ version 4.20 and this now runs flawlessly on this same uefi machine, same configuration, only booting the memtest entry from the initial boot menu at pre-installation.

This machine has uefi, but maybe there is a problem with booting the later generation iso image from usb keys / usb sticks in general at suse or maybe this is slightly a different memtest+ 4.20 and not really identical on 12.1 and 12.2 iso images?

I am not really sure what to make of this behavior and where to pinpoint the source for this bug.

maybe related bugs:
http://bugzilla.novell.com/show_bug.cgi?id=773565
http://bugzilla.novell.com/show_bug.cgi?id=753574

maybe there is even some relation to:
http://bugzilla.novell.com/show_bug.cgi?id=771552

Thanks and regards.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Forgotten User KSYEYC9iJz 2012-08-18 01:09:13 UTC
I ran into this yesterday after experiencing some system errors with no explanation. This system is a Intel motherboard with 8GB RAM (DDR3 - 4 2GB modules. 

I rotated the modules, removed so4 GB, changed slots for the pairs, etc. Always reports error at 0x08100000 even with 1 2GB module installed. This always occurs at start of test 7. 

Since this memory has worked for four years, and never had errors. I think its a test 7 problem. Also both 12.2 RC2 and 12.1 boot and work. 

openSUSE 12.2(3.4.6-1.1-desktop x86_64)|KDE 4.8.4
"release 2"|Intel core2duo 2.5 MHZ,|8GB
DDR3|GeForce 8400GS(NVIDIA-Linux-x86_64-295.71)
Comment 2 Forgotten User KSYEYC9iJz 2012-08-18 01:11:06 UTC
Ops just noticed the fact it is occuring from thumb drive version. Mine is doing it from the iso written to DVD, memtest option on boot.
Comment 3 andreas bittner 2012-08-18 07:40:46 UTC
Btw, update, at that timeframe when I originally reported this bug, I actually found some pre-release beta1 it was I think version of memtestplus on those original developers folks forum site, there was a beta forum there, and I think it was beta1 of 5.0.0 or so

I put that onto a usb stick and booted it and that ran flawlessly on this system.

This version 5.0.0 has different tests though and more extensive hardware support and detection. it didnt report errors on this same hardware in any of its tests.

I was scared that my system was defective so I used that memtest+ 5 to verify this rather new hardware as I had thought it was a compatibility problem with 4.20, although it was odd.

Its still weird that the newer 4.20 of 12.2 reports problems but the older 4.20 from the 12.1 doesnt have trouble


http://forum.memtest.org/
redirects to
http://forum.canardpc.com/forums/73-Memtest86-Official-forum
then there is thread
http://forum.canardpc.com/threads/68001-Memtest86-5.00-Beta-available-%21-Need-betatesters-%21

it can do 64bit support, and multicpucore tests and so on
greetings.
Comment 4 Forgotten User KSYEYC9iJz 2012-08-18 17:08:17 UTC
Thanks for the update. I will try the 12.1 disc version and also download the newer version. I have a thumb drive Ill try to install it on. Never create a bootable thumb drive , will learn.

Thanks.
Comment 5 Felix Miata 2012-08-18 23:28:12 UTC
With 176760 byte 4.20-7.1.2 this also happens on Kairo's Sandy Bridge Intel, and a K10 @2813MHz loaded via Grub Legacy from HD. The Sandy Bridge works fine with the memtest.org 4.20. The K10 works fine on the 180856 byte 2011/05/13 4.20 which I suppose came from 11.4.
Comment 6 Michele Cherici 2012-09-13 13:47:43 UTC
I've the same problem with 12.2/x86 final iso image from usb key.
Comment 7 Harald Koenig 2012-09-26 06:23:05 UTC
(In reply to comment #6)
> I've the same problem with 12.2/x86 final iso image from usb key.

me too:-(  

I just wanted to test a PC with memtest using the official dual-sided 12.2 DVD.
both 32bit and 64bit throw zillions errors for test # (random number sequence) starting at 129MB (PC has 2*2GB DIMMs).

using the memtest on official 12.1 DVD works fine -- no errors at all, so the hw is ok and 12.2 media is broken.  pitty:-((
Comment 8 Torsten Duwe 2012-09-26 16:30:34 UTC
qemu-kvm -m 512 -kernel memtest-12.2-DVD
nicely shows the problem. Anyone who still sees a dependency on the source medium type (USB vs. DVD) please speak up now or remain silent.

There were _no_ source code changes AFAIK between 12.1 and 12.2 so we're most likely facing a compiler bug here.

Maybe I can be more precise before handing this over to the gcc maintainers.
Comment 10 Torsten Duwe 2012-10-04 14:20:54 UTC
Created attachment 508246 [details]
source file test.c form memtest86+-4.20

discriminating file.
compile with
gcc -S -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding test.c
Comment 11 Torsten Duwe 2012-10-04 14:22:49 UTC
Created attachment 508248 [details]
working assembler file

Built with
gcc (SUSE Linux) 4.6.2
from 12.1
Comment 12 Torsten Duwe 2012-10-04 14:24:54 UTC
Created attachment 508250 [details]
broken assembler file

Built with
gcc (SUSE Linux) 4.7.1 20120723 [gcc-4_7-branch revision 189773]
on Factory/head
Comment 13 Torsten Duwe 2012-10-04 14:27:42 UTC
Injecting the broken / working  compiler output into the other build environment fixes or breaks it, respectively.
Comment 14 Torsten Duwe 2012-10-04 14:35:41 UTC
<sys/io.h> and <inttypes.h> differ slightly; the test.i files are otherwise
identical.
Comment 15 Torsten Duwe 2012-10-04 14:55:13 UTC
Created attachment 508256 [details]
reverse patch, from working to broken

This patch, applied reverse, fixes a broken build.
Auto label numbers raised by 9900, to avoid clashes.
Comment 16 Torsten Duwe 2012-10-05 12:55:57 UTC
The bug is triggered by a different register allocation.
gcc-4.6 uses ebp for the volatile ulong *start (remember, -fomit-frame-pointer), where gcc-4.7 prefers ecx.

ECX is, AFAIK "caller-save" by the ABI calling convention; and the asm inline calls rand(), which it does not declare. Rand() is free to clobber ecx.
Comment 17 Torsten Duwe 2012-10-05 12:58:59 UTC
Created attachment 508365 [details]
Declare that the asm snippet clobbers ecx.

Suggested fix.
Comment 18 Torsten Duwe 2012-10-05 13:25:55 UTC
Applied.
Comment 19 Bernhard Wiedemann 2012-10-05 14:00:09 UTC
This is an autogenerated message for OBS integration:
This bug (773569) was mentioned in
https://build.opensuse.org/request/show/137248 Factory / memtest86+
Comment 20 Robert Kaiser 2012-10-05 14:39:13 UTC
I hope steps are being made to contribute this fix back to the upstream. ;-)

That said, thanks for figuring this out!
Comment 21 Andrei Borzenkov 2012-10-05 15:20:54 UTC
Will there be update for 12.2? I understand that DVD won't change, but users still have it also installed as bootloader menu.
Comment 22 t. f. 2012-10-06 06:24:51 UTC
I really hope you make an update and make a new ISO!
I bought a new RAM and a new board because of this damn bug.
Comment 23 andreas bittner 2012-10-09 12:59:25 UTC
in 12.3/x64/milestone0 (iso image) the memtest+ still immediately fails when directly selecting test #7

has this fix not made it into 12.3/milestone0 yet?
do we need a new bug for 12.3?
thanks.
Comment 24 andreas bittner 2012-10-09 14:33:59 UTC
*** Bug 784206 has been marked as a duplicate of this bug. ***
Comment 25 Christian Boltz 2012-10-11 20:08:16 UTC
It's unlikely that fixed ISOs for 12.2 are published, therefore the next-best solution is an entry in the release notes. I just requested this - see bug 784757.

This bug is also mentioned on the "most annoying bugs" page in the wiki, but I doubt too many people read it...
Comment 26 Greg Freemyer 2013-01-21 02:47:03 UTC
Just confirming this seems fixed for the 12.3 DVDs.

I just checked this on the 12.3 build 0347 DVD.  (The latest milestone as of Jan 19, 2013).

I had no issues.  The same laptop with a 12.2 DVD shows the memtest86+ failure.
Comment 27 Peter Seiderer 2013-02-15 19:00:18 UTC
*** Bug 803806 has been marked as a duplicate of this bug. ***