Comments (13)
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)
from rng-tools.
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
from rng-tools.
3.0.2 from https://github.com/smuellerDD/jitterentropy-library/tags
It was built like this:
LDFLAGS=-lpthread make jitterentropy
Not sure if that gets at the external thread support/no ability to register external handlers?
from rng-tools.
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
from rng-tools.
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)
from rng-tools.
Thanks for digging into this. I added the following to /etc/conf.d/rngd
and the daemon is running fine with it. That is passed along to rngd.service via ExecStart=/usr/bin/rngd -f $RNGD_OPTS
RNGD_OPTS="-x jitter -r /dev/hwrng"
I wanted to verify stability. Can you describe how I can intentionally trigger this bug?
from rng-tools.
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
from rng-tools.
You are right... running rngd -n jitter
does trigger it. Guess I will just run with the options you recommended above until the jitterentropy stuff is fixed.
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
Can you point me to the PR you referenced for tracking purposes?
from rng-tools.
smuellerDD/jitterentropy-library#37
from rng-tools.
from rng-tools.
I built smuellerDD/jitterentropy-library@e20a40a and installed it. Then I rebuilt rng-tools v6.13 against it. Is it normal for rngd
to max out all cores for 5-10 sec on startup?
systemctl status rngd
● rngd.service - Hardware RNG Entropy Gatherer Daemon
Loaded: loaded (/usr/lib/systemd/system/rngd.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2021-07-09 14:33:12 EDT; 53s ago
Main PID: 5429 (rngd)
Tasks: 5 (limit: 3936)
CPU: 1min 22.780s
CGroup: /system.slice/rngd.service
└─5429 /usr/bin/rngd -f
Jul 09 14:33:12 submyth rngd[5429]: Initializing available sources
Jul 09 14:33:12 submyth rngd[5429]: [hwrng ]: Initialized
Jul 09 14:33:12 submyth rngd[5429]: [rndr ]: No HW SUPPORT
Jul 09 14:33:12 submyth rngd[5429]: [rndr ]: Initialization Failed
Jul 09 14:33:12 submyth rngd[5429]: [jitter]: Initializing AES buffer
Jul 09 14:33:19 submyth rngd[5429]: [jitter]: Enabling JITTER rng support
Jul 09 14:33:19 submyth rngd[5429]: [jitter]: Initialized
Jul 09 14:33:19 submyth rngd[5429]: [pkcs11]: PKCS11 Engine /usr/lib64/opensc-pkcs11.so Error: No such file or directory
Jul 09 14:33:19 submyth rngd[5429]: [pkcs11]: Initialization Failed
Jul 09 14:33:19 submyth rngd[5429]: [rtlsdr]: Initialization Failed
from rng-tools.
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
from rng-tools.
OK, then I believe this issue has been fixed by smuellerDD/jitterentropy-library@e20a40a
from rng-tools.
Related Issues (20)
- v6.15 build fails with jitterentropy 3.4 HOT 4
- rng-tools stopped to build with jitterentropy v3.4.0 HOT 16
- kernel handling of hwrng versus rngd HOT 3
- [6.14] rngd --list not showing full list and hangs HOT 31
- rngd and the LRNG HOT 14
- rngtestjitter.sh failures after recent changes HOT 23
- building without qrypt fails HOT 1
- Is it useful with kernel 5.18 (new rng blake2 output - entropy_avail always equal to 256)? HOT 1
- rngd fails with gcrypt library HOT 2
- 'rngd -l' | sources associated to an incorrect index HOT 1
- Add mention of kernel version when referring to it in documentation HOT 6
- External tool as entropy source for Jetson devices HOT 3
- Consider a new release for compatibility with jitterentropy-3.4 HOT 1
- Is it possible to add an option to capture the random data from the source to a file rather than adding it to the kernel entropy pool ? HOT 2
- 6.16: test suie runs forever HOT 2
- Change poolsize definition for recent Linux kernels? HOT 5
- Socket interface for hardware TRNGs HOT 7
- JITTER_OPT_TIMEOUT default value is too low HOT 4
- Coarse mixing of multiple entropy sources HOT 3
- xread_jitter bails out with EWOULDBLOCK in init_jitter_entropy_source (rngd_jitter.c) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rng-tools.