-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sporadic excessive CPU usage on RPi4B #136
Comments
what version of the jitterentropy library was this rng-tools package built with? If the jitter library has external thread support but not the ability to register external handlers, this will be the result. Fix is to update to the head of the jitterentropy-library tree |
3.0.2 from https://github.com/smuellerDD/jitterentropy-library/tags It was built like this:
Not sure if that gets at the external thread support/no ability to register external handlers? |
grrr, something is going on here. That should be recent enough to handle all the thread creation/management work, but it appears that @smuellerDD may have forced pushed something to the master branch, as a symbol rng-tool was using is now missing I was going to suggest that you build the latest rng-tools and latest jitterentropy together, but its not going to work, I need to co-ordinate with @smuellerDD |
oh wait, never mind, I see whats happened. The rng-code that makes use of the exported soft timer thread interface is dependent on code in the jitterentropy external_threading branch. @smuellerDD hasn't merged it yet, so the software timer on arm systems like yours still suffers from issue #117 . Until @smuellerDD merges that code and its backported into arch, you probably want to either (a) run rngd with the -x jitter option (which disables the jitter entropy source), and use some other source (rtlsdr or a hwrng perhaps), or reduce the jitterentropy library version on your system to version 2.2.0 or earlier (in which the software timer doesn't exist, though that will probably just cause jittereentropy to not initialize due to an overly coarse hardware timer) |
Thanks for digging into this. I added the following to
I wanted to verify stability. Can you describe how I can intentionally trigger this bug? |
on the system you are running on, it should be sufficient to simply run rngd -n jitter (to ensure that jitter is enabled). As long as you are running with the versions of the jitter library you have now, you should hit the problem |
You are right... running
Can you point me to the PR you referenced for tracking purposes? |
Am Dienstag, 29. Juni 2021, 20:52:56 CEST schrieb Neil Horman:
Hi Neil,
oh wait, never mind, I see whats happened. The rng-code that makes use of
the exported soft timer thread interface is dependent on code in the
jitterentropy external_threading branch. @smuellerDD hasn't merged it yet,
The code has now been merged.
Thanks for the patience as I now finished work on a different project.
so the software timer on arm systems like yours still suffers from issue
#117 . Until @smuellerDD merges that code and its backported into arch,
you probably want to either (a) run rngd with the -x jitter option (which
disables the jitter entropy source), and use some other source (rtlsdr or a
hwrng perhaps), or reduce the jitterentropy library version on your system
to version 2.2.0 or earlier (in which the software timer doesn't exist,
though that will probably just cause jittereentropy to not initialize due
to an overly coarse hardware timer)
Ciao
Stephan
|
thank you @smuellerDD ! @graysky2 if you update to the latest rng-tools and jitterentropy library, things should be somewhat better for you (at least you wont have to explicitly disable jitterentropy) |
I built smuellerDD/jitterentropy-library@e20a40a and installed it. Then I rebuilt rng-tools v6.13 against it. Is it normal for
|
Its not uncommon to see that happen. At startup the jitter threads are all spinning the cpus to fill up their entropy pools, and that can take a few seconds. Once that work is done through, especially if you're using AES conditioning, that should subside , and not occur again, unless you completely exhaust the entropy pool |
OK, then I believe this issue has been fixed by smuellerDD/jitterentropy-library@e20a40a |
According to [1], older rng-tools jitterentropy RNG can max CPUs on boot. This has since been fixed in the jitterentropy library [2], however the i.MX and STM32MP1 both have dedicated hardware RNG. Disable jitterentropy RNG altogether and use only the HW RNG to fill the RNG pool. [1] nhorman/rng-tools#136 [2] smuellerDD/jitterentropy-library#37 Signed-off-by: Marek Vasut <marex@denx.de>
I am experiencing times of
rngd
saturating all 4 cores of my RPi4B and am wondering what is the cause. I see nothing in the logs nor in the journal. It happened when the headless box was just sitting idle just now. Other times, it can go for days without issue.Distro: Arch ARM aarch64
rng-tools: 6.13-1
Note that the failure around
opensc-pkcs11.so
is not to blame. If I installopensc
the problem will still occur.The text was updated successfully, but these errors were encountered: