Jump to content

haveged fails to start (systemd)


dutchfish

Recommended Posts

Armbianmonitor:

root@odroidn2:~# journalctl -x | grep haveged
Mar 12 19:43:51 odroidn2 kernel: audit: type=1400 audit(1615574627.248:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/haveged" pid=1635 comm="apparmor_parser"
Mar 12 19:43:47 odroidn2 audit[1635]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/haveged" pid=1635 comm="apparmor_parser"
-- Subject: A start job for unit haveged.service has finished successfully
-- A start job for unit haveged.service has finished successfully.
Mar 12 19:43:52 odroidn2 haveged[1836]: haveged: Couldn't initialize HAVEGE rng 9
Mar 12 19:43:52 odroidn2 haveged[1836]: haveged starting up
Mar 12 19:43:52 odroidn2 systemd[1]: haveged.service: Main process exited, code=exited, status=1/FAILURE
-- An ExecStart= process belonging to unit haveged.service has exited.
Mar 12 19:43:52 odroidn2 systemd[1]: haveged.service: Failed with result 'exit-code'.
-- The unit haveged.service has entered the 'failed' state with result 'exit-code'.
 

Link to comment
Share on other sites

11 hours ago, lanefu said:

Yeah saw that on HC4 as well.   Not sure if it worked in earlier kernels.  Have you tried using an older kernel via armbian-config? 


It seems related to meson64 only. On RK3399 this feature works normally.

Link to comment
Share on other sites

I don't have a N2 or an HC4 handy, but these two links appear interesting ...

 

https://isolated.site/2019/07/08/debian-10-hangs-during-booting-on-phicomm-n1/

https://lists.opensuse.org/opensuse-bugs/2019-03/msg00250.html

 

Both have the same error code, and apparently the same solution. Notably, the phicomm N1 is also an Amlogic S905 ...

 

Any chance setting this in your /etc/default/haveged fixes it?

 

DAEMON_ARGS="-w 1024 -d16"

 

Apparently haveged is supposed to auto-detect CPU settings, but apparently doesn't always work, and the fallback doesn't either.

Link to comment
Share on other sites

I try that on my Helios4 with Armbian 21.08.0-trunk Hirsute.

Service can't start

Jun 15 20:58:54 helios4 kernel: audit: type=1326 audit(1623790734.437:21): auid=4294967295 uid=0 gid=0 ses=4294967295 subj==unconfined pid=2134 comm="haveged" exe="/usr/sbin/haveged" sig=31 arch=40000028 syscall=122 compat=0 ip=0xb6f9cb68 code=0x80000000

but I can be started from command line, with default options:

# haveged --Foreground --verbose=1
haveged: command socket is listening at fd 3
haveged starting up
haveged: ver: 1.9.8; arch: generic; vend: ; build: (gcc 10.2.1 CTV); collect: 128K
haveged: cpu: (VC); data: 16K (D); inst: 16K (D); idx: 12/40; sz: 15006/57790
haveged: tot tests(BA8): A:1/1 B:1/1 continuous tests(B):  last entropy estimate 7.99541
haveged: fills: 0, generated: 0

 

Edited by iav
fix board name
Link to comment
Share on other sites

This is actually is/was a bug in haveged, or the Debian build itself: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=985196

Strangely we only observed this on armv7l/armhf systems, not aarch64/arm64. However a cleaner solution is to apply the following to the systemd unit:

mkdir -p /etc/systemd/system/haveged.service.d
echo -e '[Service]\nSystemCallFilter=uname' > /etc/systemd/system/haveged.service.d/syscall.conf


But actually, the hardware random generator should work well, making haveged obsolete?
 

apt install rng-tools5 # modern
apt purge rng-tools # legacy
apt purge rng-tools-debian # legacy Debian port
apt purge haveged

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines