FS#63736 - Havged service stopped working.

Attached to Project: Arch Linux
Opened by Arun (arun321) - Thursday, 12 September 2019, 13:08 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 13 October 2019, 13:43 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
After updating haveged to version 1.9.6-3, it fails to start at boot.



Additional info:
package version: 1.9.6-3

#systemctl status haveged
● haveged.service - Entropy Daemon based on the HAVEGE algorithm
Loaded: loaded (/etc/systemd/system/haveged.service; enabled; vendor preset: disabled)
Active: inactive (dead)
Condition: start condition failed
└─ ConditionVirtualization=!container was not met
Docs: man:haveged(8)
http://www.issihosts.com/haveged/
Process: 262 ExecStart=/usr/sbin/haveged -w 1024 -v 1 --Foreground (code=exited, status=143)
Main PID: 262 (code=exited, status=143)

haveged.service: Couldn't determine result for ConditionVirtualization=!container, assuming failed: Input/output error

This task depends upon

Closed by  Jelle van der Waa (jelly)
Sunday, 13 October 2019, 13:43 GMT
Reason for closing:  Not a bug
Comment by Christian Hesse (eworm) - Thursday, 12 September 2019, 13:15 GMT
That's not a haveged issue. What does `systemd-detect-virt --container` give you?
Comment by Arun (arun321) - Thursday, 12 September 2019, 13:25 GMT
systemd-detect-virt --container
Failed to check for container: Input/output error

kernel version: 5.2.14-1-ck-skylake #1 SMP PREEMPT Tue Sep 10 17:23:47 EDT 2019 x86_64 GNU/Linux
Comment by Christian Hesse (eworm) - Thursday, 12 September 2019, 13:46 GMT
Possibly related to your kernel?
Comment by helle vaanzinn (glitsj16) - Thursday, 12 September 2019, 18:44 GMT
https://bugs.archlinux.org/task/63740 got marked as a duplicate of this, so I'll respond here. The haveged failure might be [url=https://bbs.archlinux.org/viewtopic.php?id=111715&p=140]linux-ck[/url] related, but simply uncommenting 'ConditionVirtualization=!container' in /usr/lib/systemd/system/haveged.service (or using a drop-in under /etc/systemd/system to the same effect) does get it working on linux-ck. Just adding that here for other users.
Comment by god geu (ghodgeuk) - Monday, 16 September 2019, 20:29 GMT
I have a different problem with haveged 1.9.6-3. When I start the system with custom kernel without initramfs, the service starts too soon. Before the file system is remount into write mode.

systemd[122]: haveged.service: Failed at step NAMESPACE spawning /usr/sbin/haveged: Read-only file system
systemd[132]: haveged.service: Failed at step NAMESPACE spawning /usr/sbin/haveged: Read-only file system
systemd[135]: haveged.service: Failed at step NAMESPACE spawning /usr/sbin/haveged: Read-only file system
systemd[137]: haveged.service: Failed at step NAMESPACE spawning /usr/sbin/haveged: Read-only file system
systemd-fsck[124]: e2fsck 1.45.3 (14-Jul-2019)
systemd-fsck[124]: /dev/sda3: clean, ...
systemd[138]: haveged.service: Failed at step NAMESPACE spawning /usr/sbin/haveged: Read-only file system
systemd[1]: Starting Remount Root and Kernel File Systems...
systemd[1]: haveged.service: Service RestartSec=100ms expired, scheduling restart.
systemd[1]: haveged.service: Scheduled restart job, restart counter is at 5.
systemd[1]: Stopped Entropy Daemon based on the HAVEGE algorithm.
systemd[1]: haveged.service: Start request repeated too quickly.
systemd[1]: haveged.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Entropy Daemon based on the HAVEGE algorithm.

Comment by Christian Hesse (eworm) - Tuesday, 17 September 2019, 10:15 GMT
Possibly a problem with the kernel as well... Did you enable the required options CONFIG_NAMESPACES and CONFIG_*_NS?
Can you start the service if system is booted up?
Comment by god geu (ghodgeuk) - Tuesday, 17 September 2019, 11:10 GMT
CONFIG_NAMESPACES=y, CONFIG_UTS_NS=y, CONFIG_IPC_NS=y, CONFIG_USER_NS=y, CONFIG_PID_NS=y, CONFIG_NET_NS=y

Restarted haveged service after system startup, works as correctly as possible.
Comment by god geu (ghodgeuk) - Tuesday, 17 September 2019, 11:48 GMT
After a few more reboots, I can say that the service starts correctly at the system startup after commenting on this line.
#PrivateDevices=on
In this particular case without initramfs.

Edit:
The previous version of haveged (1.9.4-3) also included "PrivateDevices=on" and did not adversely affect its start.
Comment by god geu (ghodgeuk) - Thursday, 19 September 2019, 15:18 GMT
Finally, I chose another modification that solves my problem.
After=systemd-tmpfiles-setup-dev.service

Loading...