Personal computing discussed

Moderators: renee, Flying Fox, morphine

 
roncat
Gerbil First Class
Topic Author
Posts: 148
Joined: Wed Dec 14, 2016 8:29 am

AMD Ryzen 3xxx - RDRAND bug

Tue Oct 29, 2019 6:58 am

Anyone experience this bug? What issues is it causing? Should I avoid my upgrade until this is patched?
 
just brew it!
Administrator
Posts: 53996
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: AMD Ryzen 3xxx - RDRAND bug

Tue Oct 29, 2019 9:46 am

Ouch. No, I have not hit this, since I don't have a 3000 series Ryzen. And yeah, it might be worth waiting until your motherboard has a BIOS update to patch the microcode.

https://xkcd.com/221/
Nostalgia isn't what it used to be.
 
Waco
Grand Gerbil Poohbah
Posts: 3348
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: AMD Ryzen 3xxx - RDRAND bug

Tue Oct 29, 2019 1:10 pm

It's already fixed in new BIOS revisions.
Desktop: X570 Gaming X | 3900X | 32 GB | Alphacool Eisblock Radeon VII | Heatkiller R3 | Samsung 4K 40" | 1 TB SX8200 Pro + 2 TB 660p + 2 TB SATA SSD
NAS: 1950X | Designare EX | 32 GB ECC | 7x8 TB RAIDZ2 | 8x2 TB RAID10 | FreeNAS | ZFS | LSI SAS
 
just brew it!
Administrator
Posts: 53996
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: AMD Ryzen 3xxx - RDRAND bug

Tue Oct 29, 2019 1:23 pm

Waco wrote:
It's already fixed in new BIOS revisions.

But those haven't been rolled out for all motherboards yet (e.g. the one the guy in the Ars article was using).
Nostalgia isn't what it used to be.
 
dragontamer5788
Gerbil Elite
Posts: 657
Joined: Mon May 06, 2013 8:39 am

Re: AMD Ryzen 3xxx - RDRAND bug

Tue Oct 29, 2019 3:11 pm

This is why I like to get my equipment 6-months (or later) after a release... so that these little issues are worked out. Plus its usually cheaper by then.
 
just brew it!
Administrator
Posts: 53996
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: AMD Ryzen 3xxx - RDRAND bug

Tue Oct 29, 2019 3:16 pm

dragontamer5788 wrote:
This is why I like to get my equipment 6-months (or later) after a release... so that these little issues are worked out. Plus its usually cheaper by then.

Ditto. Let someone else trip over all the "early adopter" bugs!
Nostalgia isn't what it used to be.
 
Igor_Kavinski
Gerbil Jedi
Posts: 1747
Joined: Fri Dec 22, 2006 2:34 am

Re: AMD Ryzen 3xxx - RDRAND bug

Tue Oct 29, 2019 11:57 pm

0xFFFFFFFF looks like the CPU saying F you! to the user 8 times before being extinguished by the multiplication with zero. No way this could have been missed during testing. They are not supposed to release CPU's without testing if every instruction is working like it's supposed to. I say intentional sabotage by a former disgruntled engineer.
 
just brew it!
Administrator
Posts: 53996
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: AMD Ryzen 3xxx - RDRAND bug

Wed Oct 30, 2019 7:22 am

Possible (though unlikely IMO)... it boggles my mind that this got past validation testing, sabotage or not.
Nostalgia isn't what it used to be.
 
Waco
Grand Gerbil Poohbah
Posts: 3348
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: AMD Ryzen 3xxx - RDRAND bug

Wed Oct 30, 2019 10:12 am

just brew it! wrote:
Waco wrote:
It's already fixed in new BIOS revisions.

But those haven't been rolled out for all motherboards yet (e.g. the one the guy in the Ars article was using).

Right, but it's not like this hasn't been covered. It's pretty easy to avoid, and the article is very much unfairly targeting AMD (at least it was initially, and still reads that way since the update is at the end of the article).

I expect Ars to be better.
Desktop: X570 Gaming X | 3900X | 32 GB | Alphacool Eisblock Radeon VII | Heatkiller R3 | Samsung 4K 40" | 1 TB SX8200 Pro + 2 TB 660p + 2 TB SATA SSD
NAS: 1950X | Designare EX | 32 GB ECC | 7x8 TB RAIDZ2 | 8x2 TB RAID10 | FreeNAS | ZFS | LSI SAS
 
Igor_Kavinski
Gerbil Jedi
Posts: 1747
Joined: Fri Dec 22, 2006 2:34 am

Re: AMD Ryzen 3xxx - RDRAND bug

Thu Oct 31, 2019 2:18 am

Wondering why some developers rely on RDRAND solely? Shouldn't they at least have a fallback using RDSEED, or even combine their outputs to get better random numbers? Just seems outright lazy. "Hey, we need a random number. Just RDRAND and get it over with. We have other, better things to do!"
 
K-L-Waster
Gerbil XP
Posts: 499
Joined: Thu Feb 12, 2015 8:10 pm
Location: Hmmm, I was *here* a second ago...

Re: AMD Ryzen 3xxx - RDRAND bug

Thu Oct 31, 2019 6:23 am

Igor_Kavinski wrote:
Wondering why some developers rely on RDRAND solely? Shouldn't they at least have a fallback using RDSEED, or even combine their outputs to get better random numbers? Just seems outright lazy. "Hey, we need a random number. Just RDRAND and get it over with. We have other, better things to do!"


If the chip claims to have a function Devs should be able to trust that said function actually works. You would never develop something with the idea that "RDRAND is supposed to work, so we'll use it, but in case it doesn't we'll ALSO run RDSEED too." It's extra overhead, and besides if they both return a result, which one do you use?

AFAIK, the problem here is that RDRAND *does* report that it works, and it *does* give you output -- it's just that that output is always 0xFFFFFFFF.
Main System: i7-8700K, ASUS ROG STRIX Z370-E, 16 GB DDR4 3200 RAM, MSI GTX 1080 TI, 1 TB CRUCIAL MX500, Corsair 550D

HTPC: I5-4460, ASUS H97M-E, 8 GB RAM, GTX 970, CRUCIAL 256GB MX100, SILVERSTONE GD09B
 
just brew it!
Administrator
Posts: 53996
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: AMD Ryzen 3xxx - RDRAND bug

Thu Oct 31, 2019 8:01 am

K-L-Waster wrote:
Igor_Kavinski wrote:
Wondering why some developers rely on RDRAND solely? Shouldn't they at least have a fallback using RDSEED, or even combine their outputs to get better random numbers? Just seems outright lazy. "Hey, we need a random number. Just RDRAND and get it over with. We have other, better things to do!"

If the chip claims to have a function Devs should be able to trust that said function actually works. You would never develop something with the idea that "RDRAND is supposed to work, so we'll use it, but in case it doesn't we'll ALSO run RDSEED too." It's extra overhead, and besides if they both return a result, which one do you use?

AFAIK, the problem here is that RDRAND *does* report that it works, and it *does* give you output -- it's just that that output is always 0xFFFFFFFF.

Yeah, basically this. Since RDRAND is a (relatively speaking) recent addition to the x86 ISA, software that requires random numbers generally *does* have a fallback for when it isn't present. It isn't any different from other newer extensions like, say, AVX2 - software that uses AVX2 will generally have a non-AVX2 fallback code path that still gives the same results (just more slowly).

There's a standard mechanism for CPUs to report what extensions they support, and this is how software that leverages those extensions decides which code paths to use. The problem occurs when the CPU *claims* to support an extension, but then does not implement that extension correctly (as appears to be the case here). In this situation, you'll either get incorrect results, or a crash of the application (or OS, if it is in kernel code).
Nostalgia isn't what it used to be.
 
K-L-Waster
Gerbil XP
Posts: 499
Joined: Thu Feb 12, 2015 8:10 pm
Location: Hmmm, I was *here* a second ago...

Re: AMD Ryzen 3xxx - RDRAND bug

Thu Oct 31, 2019 8:30 am

Maybe it's just my cynical QA Analyst nature showing, but this sounds suspiciously like an early-development kludge didn't get commented out or somehow got merged back into a late release. Frequently when developers are initially coding new features, they'll put in a hard-coded response for a variable just to get everything up and running, with the intent that once it's stabilized they'll switch to the fully functional variable. But sometimes, that switch gets forgotten.
Main System: i7-8700K, ASUS ROG STRIX Z370-E, 16 GB DDR4 3200 RAM, MSI GTX 1080 TI, 1 TB CRUCIAL MX500, Corsair 550D

HTPC: I5-4460, ASUS H97M-E, 8 GB RAM, GTX 970, CRUCIAL 256GB MX100, SILVERSTONE GD09B
 
Waco
Grand Gerbil Poohbah
Posts: 3348
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: AMD Ryzen 3xxx - RDRAND bug

Thu Oct 31, 2019 10:13 am

Given the aggressive schedule they're following, I'm betting it was working at one point and a reduced set of tests later in the dev process didn't catch it when someone inadvertently broke that piece of silicon.
Desktop: X570 Gaming X | 3900X | 32 GB | Alphacool Eisblock Radeon VII | Heatkiller R3 | Samsung 4K 40" | 1 TB SX8200 Pro + 2 TB 660p + 2 TB SATA SSD
NAS: 1950X | Designare EX | 32 GB ECC | 7x8 TB RAIDZ2 | 8x2 TB RAID10 | FreeNAS | ZFS | LSI SAS
 
Wirko
Gerbil Team Leader
Posts: 257
Joined: Fri Jun 15, 2007 4:38 am
Location: Central Europe

Re: AMD Ryzen 3xxx - RDRAND bug

Thu Oct 31, 2019 1:27 pm

Igor_Kavinski wrote:
I say intentional sabotage by a former disgruntled engineer.


just brew it! wrote:
Possible (though unlikely IMO)... it boggles my mind that this got past validation testing, sabotage or not.


An engineer in the QA department, then.
 
just brew it!
Administrator
Posts: 53996
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: AMD Ryzen 3xxx - RDRAND bug

Thu Oct 31, 2019 1:33 pm

Wirko wrote:
Igor_Kavinski wrote:
I say intentional sabotage by a former disgruntled engineer.

just brew it! wrote:
Possible (though unlikely IMO)... it boggles my mind that this got past validation testing, sabotage or not.

An engineer in the QA department, then.

I'd say odds of a bug this egregious even making it to QA, *plus* a disgruntled QA engineer is rather unlikely.
Nostalgia isn't what it used to be.
 
Igor_Kavinski
Gerbil Jedi
Posts: 1747
Joined: Fri Dec 22, 2006 2:34 am

Re: AMD Ryzen 3xxx - RDRAND bug

Thu Oct 31, 2019 2:10 pm

Looks like AMD's been having trouble with RDRAND since at least 2014! Maybe they should just hire Jim Keller back to get it fixed.

https://news.ycombinator.com/item?id=19848953

By the way, the discussion there is a goldmine for anyone interested in the intricacies of RNG.
 
just brew it!
Administrator
Posts: 53996
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: AMD Ryzen 3xxx - RDRAND bug

Thu Oct 31, 2019 4:06 pm

Igor_Kavinski wrote:
Looks like AMD's been having trouble with RDRAND since at least 2014! Maybe they should just hire Jim Keller back to get it fixed.

Jim Keller was at AMD in 2014.
Nostalgia isn't what it used to be.
 
Igor_Kavinski
Gerbil Jedi
Posts: 1747
Joined: Fri Dec 22, 2006 2:34 am

Re: AMD Ryzen 3xxx - RDRAND bug

Thu Oct 31, 2019 5:14 pm

just brew it! wrote:
Igor_Kavinski wrote:
Looks like AMD's been having trouble with RDRAND since at least 2014! Maybe they should just hire Jim Keller back to get it fixed.

Jim Keller was at AMD in 2014.


This gets more and more suspicious. Someone better get him in here and explain what the heck is going on!

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On