You are not logged in.

#1 2019-11-11 08:30:35

Jphillips
Member
Registered: 2019-08-23
Posts: 65

Warning on upgrade: CPU random generator seems to be failing

Since last week, whenever sometimes when I do a standard upgrade, the last line of the log file ends with:

[2019-11-11T09:23:50+0100] [ALPM-SCRIPTLET] WARNING: CPU random generator seem to be failing, disable hardware random number generation
[2019-11-11T09:23:50+0100] [ALPM-SCRIPTLET] WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff

I've searched in the forums but can't find an instance with this exact warning. Often times it seems to be related to slow boot times, but I'm not having that issue. Any suggestions on how to trouble shoot this message or what might be causing it?

Last edited by Jphillips (2019-11-13 09:33:18)

Offline

#2 2019-11-11 11:40:28

xerxes_
Member
Registered: 2018-04-29
Posts: 676

Re: Warning on upgrade: CPU random generator seems to be failing

What CPU do you have? Maybe AMD? If yes, than try to do what warning says (probably some kernel parameters entering when boot, maybe it is 'random.trust_cpu=off').

Last edited by xerxes_ (2019-11-11 11:44:12)

Offline

#3 2019-11-11 11:44:29

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: Warning on upgrade: CPU random generator seems to be failing

Which package produced the warning?  I am wondering what package provides the scriptlet producing the message.
Edit:
Is early microcode loading enabled?  Is there a firmware update for the motherboard?

Last edited by loqs (2019-11-11 12:02:54)

Offline

#4 2019-11-12 08:00:14

Jphillips
Member
Registered: 2019-08-23
Posts: 65

Re: Warning on upgrade: CPU random generator seems to be failing

I hadn't previously installed microcode loading, so I just took care of that. I also install rng-tools in case that helps.  It's an AMD CPU, 3700x running on a new x570 board.

I can't figure out what package caused it yet -- it was during an updated of about 20 different packages. And as I said, I can't find that exact error code reported elsewhere. But I'll keep searching around.

Is there a way to test the CPU random number generation, as in, request some sample bytes from rdrnd or similar?

Offline

#5 2019-11-12 08:46:21

seth
Member
Registered: 2012-09-03
Posts: 51,227

Online

#6 2019-11-12 09:15:22

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: Warning on upgrade: CPU random generator seems to be failing

https://arstechnica.com/gadgets/2019/10 … y-weekend/

pacman -Syu --debug

when run without the microcode update might provide more information on what is checking RDRND.

Offline

#7 2019-11-12 09:24:21

g2g591
Member
Registered: 2007-12-24
Posts: 54

Re: Warning on upgrade: CPU random generator seems to be failing

Jphillips wrote:

I hadn't previously installed microcode loading, so I just took care of that. I also install rng-tools in case that helps.  It's an AMD CPU, 3700x running on a new x570 board.

I can't figure out what package caused it yet -- it was during an updated of about 20 different packages. And as I said, I can't find that exact error code reported elsewhere. But I'll keep searching around.

Is there a way to test the CPU random number generation, as in, request some sample bytes from rdrnd or similar?

rdrand-test.c is a tiny program that spits out values from rdrand
eg

success: 1  value: ec71b849a6d32084

just compile it with gcc rdrand-test.c and run the resulting executable (a.out)

there definately is a rdrand bug with amd cpu's, it might be fixed by a microcode update (check for bios updates as well as they can include updated microcode as well), this article looks like it calls out your model in particular.

Last edited by g2g591 (2019-11-12 11:57:19)

Offline

#8 2019-11-13 08:12:01

Jphillips
Member
Registered: 2019-08-23
Posts: 65

Re: Warning on upgrade: CPU random generator seems to be failing

It seems I have the same amd bug talked about here https://arstechnica.com/gadgets/2019/10 … y-weekend/

Running the script provided on the page, I get:

$ ./test-rdrand 
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff
RDRAND() = 0xffffffff

Luckily I haven't had any issues with infinite loops when booting. A workaround, as suggested above and in the article, is to set "random.trust_cpu=off". But does this actually fix the problem, i.e., by forcing programs to use another source or entropy? Or does it just prevent issues from arising when loading?

Last edited by Jphillips (2019-11-13 08:13:03)

Offline

Board footer

Powered by FluxBB