FS#59807 - [rng-tools] 6.3.1-2 broke all hardware entropy gathering

Attached to Project: Community Packages
Opened by Dan McGee (toofishes) - Saturday, 25 August 2018, 20:33 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Sunday, 26 August 2018, 22:59 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Massimiliano Torromeo (mtorromeo)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

This changeset was made for #59774 : https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/rng-tools&id=7f73e07125ca74e9040c34c0dec5fb6d9dc8cad8

Adding `PrivateDevices=on` to the unit file broke expected behavior. The rngd daemon can no longer access `/dev/hwrng` and fails to start on something like a Raspberry Pi, or anything with a hardware entropy source.

Additionally, it looks like changing the `WantedBy` directive introduced a circular dependency, as I'm seeing warnings like this in my journal now:

Jul 05 19:46:42 wicklow systemd[1]: rngd.service: Found ordering cycle on sysinit.target/start
Jul 05 19:46:42 wicklow systemd[1]: rngd.service: Found dependency on rngd.service/start
Jul 05 19:46:42 wicklow systemd[1]: rngd.service: Job rngd.service/start deleted to break ordering cycle starting with rngd.service/start
This task depends upon

Closed by  Massimiliano Torromeo (mtorromeo)
Sunday, 26 August 2018, 22:59 GMT
Reason for closing:  Fixed
Additional comments about closing:  rng-tools-6.3.1-3

Comment by Dan McGee (toofishes) - Saturday, 25 August 2018, 20:35 GMT
Forgot the logs from failing to open hardware entropy sources:

Aug 25 20:19:55 wicklow rngd[13124]: Failed to init entropy source 0: Hardware RNG Device
Aug 25 20:19:55 wicklow rngd[13124]: Failed to init entropy source 1: TPM RNG Device
Aug 25 20:19:55 wicklow rngd[13124]: can't open any entropy source
Aug 25 20:19:55 wicklow rngd[13124]: Maybe RNG device modules are not loaded
Aug 25 20:19:55 wicklow rngd[13124]: Initalizing available sources
Aug 25 20:19:55 wicklow systemd[1]: rngd.service: Main process exited, code=exited, status=1/FAILURE
Aug 25 20:19:55 wicklow systemd[1]: rngd.service: Failed with result 'exit-code'.

Compare that to the normal expected behavior, if I override and remove the PrivateDevices bit:

Aug 25 20:28:19 wicklow systemd[1]: Started Hardware RNG Entropy Gatherer Daemon.
Aug 25 20:28:19 wicklow rngd[14020]: Failed to init entropy source 1: TPM RNG Device

"0: Hardware RNG Device" is no longer listed, and the daemon is running as expected.
Comment by Ash (eta-carinae) - Sunday, 26 August 2018, 08:20 GMT
I'm seeing the same circular dependency problems:

Aug 26 03:51:23 regulus systemd[1]: sysinit.target: Found ordering cycle on rngd.service/start
Aug 26 03:51:23 regulus systemd[1]: sysinit.target: Found dependency on basic.target/start
Aug 26 03:51:23 regulus systemd[1]: sysinit.target: Found dependency on snapper-cleanup.timer/start
Aug 26 03:51:23 regulus systemd[1]: sysinit.target: Found dependency on sysinit.target/start
Aug 26 03:51:23 regulus systemd[1]: sysinit.target: Job rngd.service/start deleted to break ordering cycle starting with sysinit.target/start

Downgrading to 6.3.1-1 fixes this behavior.
Comment by Massimiliano Torromeo (mtorromeo) - Sunday, 26 August 2018, 08:36 GMT
Should be fixed in rng-tools-6.3.1-3

Loading...